Class StatReward
java.lang.Object
com.csse3200.game.missions.rewards.Reward
com.csse3200.game.missions.rewards.StatReward
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 Summary
ConstructorsConstructorDescriptionStatReward
(int healthToAdd) Creates a new StatReward with a specified value to modify health by. -
Method Summary
Modifier and TypeMethodDescriptionvoid
collect()
When called will set this Reward as having been collected and will modify the player's health as specified.Methods inherited from class com.csse3200.game.missions.rewards.Reward
isCollected, read, setCollected
-
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