Class ItemReward

java.lang.Object
com.csse3200.game.missions.rewards.Reward
com.csse3200.game.missions.rewards.ItemReward
Direct Known Subclasses:
ClueReward

public class ItemReward extends Reward
An ItemReward class for when a player completes a Quest and receives reward items as a result
  • Constructor Details

    • ItemReward

      public ItemReward(List<Entity> rewardItems)
      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

    • collect

      public void collect()
      When called, changes the isCollected variable to true and adds the reward items to the player's inventory.
      Specified by:
      collect in class Reward