Class MissionManager

java.lang.Object
com.csse3200.game.missions.MissionManager
All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable

public class MissionManager extends Object implements com.badlogic.gdx.utils.Json.Serializable
  • Constructor Details

    • MissionManager

      public MissionManager()
      Creates the mission manager, registered all game achievements and adds a listener for hourly updates
  • Method Details

    • acceptQuest

      public void acceptQuest(Quest quest)
      Accepts a quest by adding it to the list of active quests in the game. Also registers this quest in the game. If this Quest is in the List of selectable Quests, then this method will also remove the Quest from the List of selectable Quests.
      Parameters:
      quest - The Quest to be added and registered
    • getActiveQuests

      public List<Quest> getActiveQuests()
      Returns a List of currently active (tracked) Quests. This includes all Quests which have not expired (that is, they have been accepted, and they have been completed or not yet expired).
      Returns:
      The List of active Quests.
    • addQuest

      public void addQuest(Quest quest)
      Adds a Quest to the List of selectable Quests. Selectable Quests can be accepted by the player through the in-game quest NPC.
      Parameters:
      quest - The Quest to add (this Quest should not have already been registered).
    • getSelectableQuests

      public List<Quest> getSelectableQuests()
      Returns a List of selectable Quests. These Quests can be accepted in-game through interaction with the quest NPC.
      Returns:
      The list of selectable Quests.
    • getAchievements

      public Achievement[] getAchievements()
      Returns all in-game Achievements.
      Returns:
      All in-game Achievements.
    • getEvents

      public EventHandler getEvents()
      Returns the MissionManager's EventHandler, which is responsible for triggering events which update the state of Missions
      Returns:
      The EventHandler of the MissionManager, from which events can be triggered to update the state of relevant Missions.
    • write

      public void write(com.badlogic.gdx.utils.Json json)
      Writes the MissionManager to a Json object for saving
      Specified by:
      write in interface com.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 the MissionManager for the game
      Specified by:
      read in interface com.badlogic.gdx.utils.Json.Serializable
      Parameters:
      json -
      jsonMap -