Package com.csse3200.game.missions
Class MissionManager
java.lang.Object
com.csse3200.game.missions.MissionManager
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAn enum storing all possible events that theMissionManager'sEventHandlershould listen to and trigger. -
Constructor Summary
ConstructorsConstructorDescriptionCreates the mission manager, registered all game achievements and adds a listener for hourly updates -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptQuest(Quest quest) Accepts a quest by adding it to the list of active quests in the game.voidReturns all in-gameAchievements.Returns theMissionManager'sEventHandler, which is responsible for triggering events which update the state ofMissionsvoidread(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonMap) Method for loading theMissionManagerfor the gamevoidreadReal(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonMap) voidwrite(com.badlogic.gdx.utils.Json json) Writes theMissionManagerto a Json object for saving
-
Constructor Details
-
MissionManager
public MissionManager()Creates the mission manager, registered all game achievements and adds a listener for hourly updates
-
-
Method Details
-
acceptQuest
Accepts a quest by adding it to the list of active quests in the game. Also registers this quest in the game. If thisQuestis in theListof selectableQuests, then this method will also remove theQuestfrom theListof selectableQuests.- Parameters:
quest- TheQuestto be added and registered
-
getActiveQuests
-
addQuest
-
getSelectableQuests
Returns aListof selectableQuests. TheseQuests can be accepted in-game through interaction with the quest NPC.- Returns:
- The list of selectable
Quests.
-
getAchievements
Returns all in-gameAchievements.- Returns:
- All in-game
Achievements.
-
getEvents
Returns theMissionManager'sEventHandler, which is responsible for triggering events which update the state ofMissions- Returns:
- The
EventHandlerof theMissionManager, from which events can be triggered to update the state of relevantMissions.
-
write
public void write(com.badlogic.gdx.utils.Json json) Writes theMissionManagerto a Json object for saving- Specified by:
writein interfacecom.badlogic.gdx.utils.Json.Serializable- Parameters:
json- Json object written to
-
readReal
public void readReal(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonMap) -
read
public void read(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonMap) Method for loading theMissionManagerfor the game- Specified by:
readin interfacecom.badlogic.gdx.utils.Json.Serializable- Parameters:
json-jsonMap-
-