Class SpaceDebrisQuest
java.lang.Object
com.csse3200.game.missions.Mission
com.csse3200.game.missions.quests.Quest
com.csse3200.game.missions.quests.ClearDebrisQuest
com.csse3200.game.missions.quests.SpaceDebrisQuest
SpaceDebrisQuest is an extension of ClearDebrisQuest that spawns new debris to be cleared
Code adopted from spawnShipDebris in SpaceGameArea
-
Constructor Summary
ConstructorsConstructorDescriptionSpaceDebrisQuest
(String name, Reward reward, int numberOfDebrisToClear) A Quest where player is required to clear a certain amount of debris. -
Method Summary
Modifier and TypeMethodDescriptionvoid
registerMission
(EventHandler missionManagerEvents) Registers the Quest with theMissionManager
by listening to the DEBRIS_CLEAR Mission event.Methods inherited from class com.csse3200.game.missions.quests.ClearDebrisQuest
getDescription, getProgress, getShortDescription, isCompleted, readProgress, resetState
Methods inherited from class com.csse3200.game.missions.quests.Quest
collectReward, isExpired, isMandatory, isRewardCollected, read, resetExpiry, updateExpiry, write
Methods inherited from class com.csse3200.game.missions.Mission
getName, notifyUpdate
-
Constructor Details
-
SpaceDebrisQuest
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
Registers the Quest with theMissionManager
by listening to the DEBRIS_CLEAR Mission event. Also spawns in new debris at the specified location.- Overrides:
registerMission
in classClearDebrisQuest
- Parameters:
missionManagerEvents
- - A reference to theEventHandler
on theMissionManager
, with which relevant events should be listened to.
-