Eye of the Nile Docs
Everything you need to know to get started!
Loading...
Searching...
No Matches
PotionCounter Class Reference

Detailed Description

Updates the text display for how many health potions the player currently has.

Documentation updated 3/5/2024

Author
Stephen Nuttall

Private Member Functions

void Awake ()
 On Awake, get the potion count from the DataManager.
 
void OnEnable ()
 Subscribe to potionCountChanged event.
 
void OnDisable ()
 Unsubscribe from potionCountChanged event.
 
void UpdateCount (int newCount)
 Update text to display the new potion count.
 

Private Attributes

TMP_Text countText
 Reference to the text that displays the amount of potions.
 

Member Function Documentation

◆ Awake()

void PotionCounter.Awake ( )
private

On Awake, get the potion count from the DataManager.

◆ OnDisable()

void PotionCounter.OnDisable ( )
private

Unsubscribe from potionCountChanged event.

◆ OnEnable()

void PotionCounter.OnEnable ( )
private

Subscribe to potionCountChanged event.

◆ UpdateCount()

void PotionCounter.UpdateCount ( int newCount)
private

Update text to display the new potion count.

Member Data Documentation

◆ countText

TMP_Text PotionCounter.countText
private

Reference to the text that displays the amount of potions.


The documentation for this class was generated from the following file: