GameQuestList Count() Methods

v4.0

Count by status of the quest

// Get the number of quests, pass in an optional uid
public int CountQuestsInProgress(string uid = null)
public int CountQuestsSucceeded(string uid = null)
public int CountQuestsFailed(string uid = null)
public int CountQuestsCompleted(string uid = null)

// Optionally pass in a Quest or GameQuest instead of uid
public int CountQuestsSucceeded(Quest quest)
public int CountQuestsSucceeded(GameQuest gameQuest)

Count the GameQuests which may have an impact on stats

// Get the number of quests that affect stats
public int CountModifyingStats(string uid = null)

Examples

Each can optionally include a Uid() to specify the quest to search for, or they will count all quests.

Debug.Log($"There are {gameQuestList.CountInProgress()} quests in progress");
Debug.Log($"Successfully completed {gameQuestList.CountSucceeded()} total quests");
Debug.Log($"There are {gameQuestList.CountFailed()} failed quests");
Debug.Log($"Completed quest {uid} {gameQuestList.CountComplete(uid)} times");
Debug.Log($"There are {gameQuestList.CountModifyingStats()} quests modifying stats.");

Last updated