Class AmmoStatsComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.AmmoStatsComponent

public class AmmoStatsComponent extends Component
  • 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