Package com.csse3200.game.components
Class AmmoStatsComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.AmmoStatsComponent
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.csse3200.game.components.Component
create, dispose, earlyUpdate, getEntity, getPrio, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
AmmoStatsComponent
public AmmoStatsComponent(int ammo)
-
-
Method Details
-
getAmmo
public int getAmmo()Gets the player's current amount off ammo (bullets they can fire)- Returns:
- player's ammo.
-
setAmmo
public void setAmmo(int ammo) Sets the player's current ammo count to a new value- Parameters:
ammo
- the desired amount ammo for the player to carry
-