Class StatManager
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.stats.StatManager
Class to store Stats and listen for events to update them.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Called when the component is disposed.void
incrementStat
(String statName, String operation, int value) Handler for event triggering an update of the a statMethods inherited from class com.csse3200.game.components.Component
create, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
StatManager
-
-
Method Details
-
incrementStat
Handler for event triggering an update of the a stat- Parameters:
statName
- : the string triggering the updatevalue
- : the new value of the stat
-
dispose
public void dispose()Description copied from class:Component
Called when the component is disposed. Dispose of any internal resources here.
-