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 enum
An enum storing all possible events that theMissionManager
'sEventHandler
should 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 TypeMethodDescriptionvoid
acceptQuest
(Quest quest) Accepts a quest by adding it to the list of active quests in the game.void
Returns all in-gameAchievement
s.Returns theMissionManager
'sEventHandler
, which is responsible for triggering events which update the state ofMission
svoid
read
(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonMap) Method for loading theMissionManager
for the gamevoid
readReal
(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonMap) void
write
(com.badlogic.gdx.utils.Json json) Writes theMissionManager
to 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 thisQuest
is in theList
of selectableQuest
s, then this method will also remove theQuest
from theList
of selectableQuest
s.- Parameters:
quest
- TheQuest
to be added and registered
-
getActiveQuests
-
addQuest
-
getSelectableQuests
Returns aList
of selectableQuest
s. TheseQuest
s can be accepted in-game through interaction with the quest NPC.- Returns:
- The list of selectable
Quest
s.
-
getAchievements
Returns all in-gameAchievement
s.- Returns:
- All in-game
Achievement
s.
-
getEvents
Returns theMissionManager
'sEventHandler
, which is responsible for triggering events which update the state ofMission
s- Returns:
- The
EventHandler
of theMissionManager
, from which events can be triggered to update the state of relevantMission
s.
-
write
public void write(com.badlogic.gdx.utils.Json json) Writes theMissionManager
to a Json object for saving- Specified by:
write
in 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 theMissionManager
for the game- Specified by:
read
in interfacecom.badlogic.gdx.utils.Json.Serializable
- Parameters:
json
-jsonMap
-
-