Class StatReward

java.lang.Object
com.csse3200.game.missions.rewards.Reward
com.csse3200.game.missions.rewards.StatReward

public class StatReward extends Reward
A StatReward that when called collect() on adds the specified health to the current player's health stat. NOTE: The CombatStatsComponent has not been updated from original provided code, if extended on this class may need to be adjusted to suit.
  • Constructor Details

    • StatReward

      public StatReward(int healthToAdd)
      Creates a new StatReward with a specified value to modify health by.
      Parameters:
      healthToAdd - Amount player's health is to be changed by. Can also be negative if desired.
  • Method Details

    • collect

      public void collect()
      When called will set this Reward as having been collected and will modify the player's health as specified.
      Specified by:
      collect in class Reward