TopDown Engine  v4.1
MoreMountains.TopDownEngine.AmmoDisplay Class Reference

A class that combines a progress bar and a text display and that can be used to display the current ammo level of a weapon More...

Inheritance diagram for MoreMountains.TopDownEngine.AmmoDisplay:
MoreMountains.Tools.MMProgressBar MoreMountains.Tools.MMMonoBehaviour

Public Member Functions

override void Initialization ()
 On init we initialize our string builder More...
 
virtual void UpdateTextDisplay (string newText)
 Updates the text display with the parameter string More...
 
virtual void UpdateAmmoDisplays (bool magazineBased, int totalAmmo, int maxAmmo, int ammoInMagazine, int magazineSize, bool displayTotal)
 Updates the ammo display's text and progress bar More...
 

Public Attributes

int AmmoDisplayID = 0
 the ID of the AmmoDisplay More...
 
Text TextDisplay
 the Text object used to display the current ammo numbers More...
 

Protected Attributes

int _totalAmmoLastTime
 
StringBuilder _stringBuilder
 
bool _isTextDisplayTextMeshProNotNull
 

Detailed Description

A class that combines a progress bar and a text display and that can be used to display the current ammo level of a weapon

Member Function Documentation

◆ Initialization()

override void MoreMountains.TopDownEngine.AmmoDisplay.Initialization ( )

On init we initialize our string builder

◆ UpdateAmmoDisplays()

virtual void MoreMountains.TopDownEngine.AmmoDisplay.UpdateAmmoDisplays ( bool  magazineBased,
int  totalAmmo,
int  maxAmmo,
int  ammoInMagazine,
int  magazineSize,
bool  displayTotal 
)
virtual

Updates the ammo display's text and progress bar

Parameters
magazineBasedIf set to true magazine based.
totalAmmoTotal ammo.
maxAmmoMax ammo.
ammoInMagazineAmmo in magazine.
magazineSizeMagazine size.
displayTotalIf set to true display total.

◆ UpdateTextDisplay()

virtual void MoreMountains.TopDownEngine.AmmoDisplay.UpdateTextDisplay ( string  newText)
virtual

Updates the text display with the parameter string

Parameters
newTextNew text.

Member Data Documentation

◆ _isTextDisplayTextMeshProNotNull

bool MoreMountains.TopDownEngine.AmmoDisplay._isTextDisplayTextMeshProNotNull
protected

◆ _stringBuilder

StringBuilder MoreMountains.TopDownEngine.AmmoDisplay._stringBuilder
protected

◆ _totalAmmoLastTime

int MoreMountains.TopDownEngine.AmmoDisplay._totalAmmoLastTime
protected

◆ AmmoDisplayID

int MoreMountains.TopDownEngine.AmmoDisplay.AmmoDisplayID = 0

the ID of the AmmoDisplay

◆ TextDisplay

Text MoreMountains.TopDownEngine.AmmoDisplay.TextDisplay

the Text object used to display the current ammo numbers


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