Class FishingQuest


public class FishingQuest extends Quest
  • Constructor Details

    • FishingQuest

      protected FishingQuest(String name, Reward reward, int fishToCatch)
  • Method Details

    • registerMission

      public void registerMission(EventHandler missionManagerEvents)
      Description copied from class: Mission
      Registers the Mission to the MissionManager, by adding all event listeners to the service which the Mission needs to listen to in order to update its state.
      Specified by:
      registerMission in class Mission
      Parameters:
      missionManagerEvents - A reference to the EventHandler on the MissionManager, with which relevant events should be listened to.
    • isCompleted

      public boolean isCompleted()
      Description copied from class: Mission
      Returns a boolean value representing whether the Mission has been completed.
      Specified by:
      isCompleted in class Mission
      Returns:
      A boolean value representing whether the Mission has been completed.
    • getDescription

      public String getDescription()
      Description copied from class: Mission
      Returns a String description of the Mission. This can involve an explanation of what the player needs to do to complete the Mission, and may dynamically change depending on the progress the player has made. For instance, you might choose to include in your description: "You have currently harvested X out of N plants".
      Specified by:
      getDescription in class Mission
      Returns:
      A String description of the Mission, including any relevant details you would like the player to know about.
    • getShortDescription

      public String getShortDescription()
      Description copied from class: Mission
      Returns a short String description of the Mission. This description should be at most around 50 characters. This might simply contain progress information on the Mission, or a shortened form of Mission.getDescription().
      Specified by:
      getShortDescription in class Mission
      Returns:
      A short String description of the Mission
    • readProgress

      public void readProgress(com.badlogic.gdx.utils.JsonValue progress)
      Description copied from class: Mission
      Sets the internal progress of the Mission based on the JsonValue provided. The JsonValue provided should match the same JsonValue.ValueType returned by Mission.getProgress(). An Exception might be raised otherwise (depending on the methods you use to get the state of the JsonValue).
      Specified by:
      readProgress in class Mission
      Parameters:
      progress - The JsonValue representing the progress of the Mission as determined by the value returned in Mission.getProgress().
    • getProgress

      public Object getProgress()
      Description copied from class: Mission
      Gets the progress of the Mission as an Object, which contains all relevant information about the internal progress of the Mission. All stats which dynamically change should be stored in this Object in some way (i.e., all non-final values). Since this value will need to be read later using Mission.readProgress(JsonValue) as a JsonValue, you should make sure the returned Object's serialisation is known to you. This is easy for primitive types, lists, and maps, so try to make the data that you actively track of primitive type (or a list/map of primitive types). Note that for Quests, you do not need to store the time to expiry or whether the reward has been collected - you only need to store the changing state specific to the Quest.
      Specified by:
      getProgress in class Mission
      Returns:
      An Object, which stores the internal progress of the Mission. This Object should be serialisable, and the data should be able to be read as a JsonValue in Mission.readProgress(JsonValue).
    • resetState

      protected void resetState()
      Description copied from class: Quest
      Resets the internal state of the Quest, to what it was before being accepted/modified.
      Specified by:
      resetState in class Quest