Player Quest

The PlayerQuest is responsible for quest-related functionalities for a player. Player Quest maintains a list of quests and provides methods to add or remove quests, as well as to check the progress and completion of quests.

Properties

  • private PlayerWorker playerWorker: References the PlayerWorker associated with this PlayerQuest.

  • public List<Quest> quests: Represents the list of quests that the player is currently undertaking.

Constructor

  • public PlayerQuest(PlayerWorker playerWorker): Initializes a new instance of the PlayerQuest class, assigning the PlayerWorker.

Methods

  • public void AddQuest(Quest quest): Adds a new quest to the player's quest list.

  • public void RemoveQuest(Quest quest): Removes a quest from the player's quest list.

  • public void CheckQuests(): Checks the status of all quests in the player's quest list. If a quest is completed (its goals are achieved), it triggers the quest's reward mechanism.

Last updated