GameQuestList Get() Methods
v4.0
Get GameQuest objects by status & uid
GameQuest objects by status & uid// If there are multiple, will return the first found
public GameQuest GetInProgress(string uid)
public GameQuest GetSucceeded(string uid)
public GameQuest GetFailed(string uid)
public GameQuest GetCompleted(string uid)
// returns true or false, with the found GameQuest in the out value
public bool TryGetInProgress(string uid, out GameQuest found)
public bool TryGetSucceeded(string uid, out GameQuest found)
public bool TryGetFailed(string uid, out GameQuest found)
public bool TryGetCompleted(string uid, out GameQuest found)Get IEnumerable<GameQuest> results
// These can be turned into a List<GameQuest> or GameQuest[], or further queried using
// LINQ.
public IEnumerable<GameQuest> QuestsModifyingStats
public IEnumerable<GameQuest> QuestsInProgress
public IEnumerable<GameQuest> QuestsSucceeded
public IEnumerable<GameQuest> QuestsFailed
public IEnumerable<GameQuest> QuestsCompleted
// Example
foreach(var gameQuest in gameQuestList.QuestsModifyingStats)
Debug.Log($"{gameQuest.ObjectName()} is modifying {gameQuest.DirectlyAffectsList().Count} stats");
List<GameQuest> completedQuests = gameQuestList.QuestsCompleted.ToList();
GameQuest[] questsInProgress = gameQuestList.QuestsInProgress.ToArray();Additional Get Methods
Examples
You can Get and TryGet quests based on their status.
You can also get an IEnumerable<GameQuest> based on the status of the quests. This can be turned into a List, Array, or have further logic applied prior to being used as a List or Array.
Last updated
Was this helpful?