Class SpaceDebrisQuest


public class SpaceDebrisQuest extends ClearDebrisQuest
SpaceDebrisQuest is an extension of ClearDebrisQuest that spawns new debris to be cleared

Code adopted from spawnShipDebris in SpaceGameArea

  • Constructor Details

    • SpaceDebrisQuest

      public SpaceDebrisQuest(String name, Reward reward, int numberOfDebrisToClear)
      A Quest where player is required to clear a certain amount of debris.
      Parameters:
      name - - Human-readable name of the Quest.
      reward - - Reward player will receive after completing the Quest.
      numberOfDebrisToClear - - Amount of debris the player is required to clear.
  • Method Details

    • registerMission

      public void registerMission(EventHandler missionManagerEvents)
      Registers the Quest with the MissionManager by listening to the DEBRIS_CLEAR Mission event. Also spawns in new debris at the specified location.
      Overrides:
      registerMission in class ClearDebrisQuest
      Parameters:
      missionManagerEvents - - A reference to the EventHandler on the MissionManager, with which relevant events should be listened to.