Class ItemReward
java.lang.Object
com.csse3200.game.missions.rewards.Reward
com.csse3200.game.missions.rewards.ItemReward
- Direct Known Subclasses:
ClueReward
An ItemReward class for when a player completes a Quest and receives reward items as a result
-
Constructor Summary
ConstructorsConstructorDescriptionItemReward
(List<Entity> rewardItems) Creates a new reward with a list of reward items for player to receive on collect() method call. -
Method Summary
Modifier and TypeMethodDescriptionvoid
collect()
When called, changes the isCollected variable to true and adds the reward items to the player's inventory.Methods inherited from class com.csse3200.game.missions.rewards.Reward
isCollected, read, setCollected
-
Constructor Details
-
ItemReward
Creates a new reward with a list of reward items for player to receive on collect() method call.- Parameters:
rewardItems
- Array of entities added to the reward.
-
-
Method Details