Class MultiReward

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

public class MultiReward extends Reward
The MultiReward is a Reward that can be added to a Quest in order to have multiple types of Reward in one class.
  • Constructor Details

    • MultiReward

      public MultiReward(List<Reward> rewards)
      A MultiReward which allows multiple types of Rewards to be added to a Quest.
      Parameters:
      rewards - - the rewards to be collected on collect() of the MultiReward
  • Method Details

    • collect

      public void collect()
      When called this method will call collect() on each of the rewards in the list. Note - they are called in the order they are specified in the List.
      Specified by:
      collect in class Reward