Maintains a list of quests on a GameObject. More...
Classes | |
class | SaveData |
Public Member Functions | |
override void | Reset () |
override void | Awake () |
override void | Start () |
override void | OnDestroy () |
void | DestroyQuestInstances () |
virtual void | ResetToOriginalState () |
Resets the quest list container to its original list. | |
virtual void | AddQuests (List< Quest > listToAdd) |
Adds a list of quests to the quest giver's quest list and runs their runtime startup. | |
virtual void | AddQuests (List< Quest > listToAdd, bool delayStartup) |
Adds a list of quests to the quest giver's quest list and runs their runtime startup. | |
virtual Quest | AddQuest (Quest quest) |
Adds a quest to the quest giver's quest list and runs its runtime startup. | |
virtual Quest | AddQuest (Quest quest, bool delayStartup) |
Adds a quest to the quest giver's quest list and optionally runs its runtime startup immediately or waits until the end of frame to allow other quests to be added to their respective quest lists in case a quest's offer conditions reference the state of another quest. | |
virtual Quest | FindQuest (string questID) |
virtual Quest | FindQuest (StringField questID) |
virtual bool | ContainsQuest (string questID) |
virtual bool | ContainsQuest (StringField questID) |
virtual void | DeleteQuest (StringField questID) |
virtual void | DeleteQuest (Quest quest) |
virtual void | RegisterForQuestEvents (Quest quest) |
virtual void | UnregisterForQuestEvents (Quest quest) |
virtual void | OnMessage (MessageArgs messageArgs) |
Handles a message that the message handler is listening for. | |
virtual void | OnQuestBecameOfferable (Quest quest) |
virtual void | OnQuestStateChanged (Quest quest) |
virtual void | OnQuestNodeStateChanged (QuestNode questNode) |
override string | RecordData () |
override void | ApplyData (string data) |
override void | OnRestartGame () |
The Save System will call this method when restarting the game. | |
Public Member Functions inherited from PixelCrushers.Saver | |
virtual void | OnEnable () |
virtual void | OnDisable () |
string | RecordData () |
This method should return a string that represents the data you want to save. | |
void | ApplyData (string s) |
This method should process the string representation of saved data and apply it to the current state of the game. | |
virtual void | ApplyDataImmediate () |
If the Saver needs to pull data from the Save System immediately after loading a scene, instead of waiting for ApplyData to be called at it its normal time, it can implement this method. | |
virtual void | OnBeforeSceneChange () |
The Save System will call this method before scene changes. | |
Protected Member Functions | |
void | InstantiateQuestAssets () |
Instantiates copies of quest assets into the runtime quest list and enables their autostart and offer condition checking. | |
IEnumerator | RuntimeStartupAtEndOfFrame () |
IEnumerator | SetIsLoadingGameFalseAfter2Frames () |
Protected Attributes | |
Coroutine | m_delayedStartupCoroutine = null |
This coroutine runs when delaying quest runtime startup until the end of frame. | |
List< Quest > | m_runtimeStartupQueue = new List<Quest>() |
The delayed startup coroutine should do runtime startup for quests in this list. | |
Protected Attributes inherited from PixelCrushers.Saver | |
string | m_runtimeKey = null |
Properties | |
bool | forwardEventsToListeners [get, set] |
Forward quest state events to listeners that have registered to events such as questBecameOfferable, questStateChanged, and questNodeStateChanged. | |
bool | includeInSavedGameData [get, set] |
Include in saved game data, which is used for saved games and scene persistence. | |
bool | addNewQuestsSinceSavedGame [get, set] |
If quests were added after game was saved, add them to quest list when loading saved game. | |
List< Quest > | questList [get, protected set] |
Quest assets. | |
List< string > | deletedStaticQuests [get, protected set] |
IDs of static quests that have been deleted and shouldn't be instantiated. | |
List< Quest > | originalQuestList [get, set] |
The original design-time quest list. | |
Properties inherited from PixelCrushers.Saver | |
bool | appendSaverTypeToKey [get, set] |
Append the name of this saver type to the key. | |
virtual string | key [get, set] |
Save data under this key. | |
string | _internalKeyValue [get, set] |
Accesses the internal key value. | |
virtual bool | saveAcrossSceneChanges [get, set] |
Save when changing scenes to be able to restore saved state when returning to scene. | |
virtual bool | restoreStateOnStart [get, set] |
Events | |
QuestParameterDelegate | questAdded = delegate { } |
Raised when a quest is added to the list. | |
QuestParameterDelegate | questRemoved = delegate { } |
Raised when a quest is removed from the list. | |
QuestParameterDelegate | questBecameOfferable = delegate { } |
Raised when a quest in the list becomes offerable. | |
QuestParameterDelegate | questStateChanged = delegate { } |
Raised when the state of a quest in the list changes. | |
QuestNodeParameterDelegate | questNodeStateChanged = delegate { } |
Raised when the state of a quest node in a quest in the list changes. | |
Maintains a list of quests on a GameObject.
Adds a quest to the quest giver's quest list and runs its runtime startup.
quest |
Reimplemented in PixelCrushers.QuestMachine.QuestGiver, and PixelCrushers.QuestMachine.QuestJournal.
|
inlinevirtual |
Adds a quest to the quest giver's quest list and optionally runs its runtime startup immediately or waits until the end of frame to allow other quests to be added to their respective quest lists in case a quest's offer conditions reference the state of another quest.
delayStartup | If true, delay runtime startup until end of frame; otherwise run runtime startup immediately. |
|
inlinevirtual |
Adds a list of quests to the quest giver's quest list and runs their runtime startup.
|
inlinevirtual |
Adds a list of quests to the quest giver's quest list and runs their runtime startup.
|
inline |
|
inlinevirtual |
Reimplemented from PixelCrushers.Saver.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in PixelCrushers.QuestMachine.QuestGiver.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlineprotected |
Instantiates copies of quest assets into the runtime quest list and enables their autostart and offer condition checking.
|
inlinevirtual |
Reimplemented from PixelCrushers.Saver.
Reimplemented in PixelCrushers.QuestMachine.ORKSupport.QuestListContainerForORK.
|
inlinevirtual |
Handles a message that the message handler is listening for.
messageArgs | The message that was sent to the MessageSystem. |
Implements PixelCrushers.IMessageHandler.
Reimplemented in PixelCrushers.QuestMachine.EmeraldAISupport.EmeraldAIQuestGiver, PixelCrushers.QuestMachine.uSurvivalSupport.uSurvivalQuestJournal, and PixelCrushers.QuestMachine.QuestJournal.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
The Save System will call this method when restarting the game.
Your saver can reset data to a fresh state if necessary.
Reimplemented from PixelCrushers.Saver.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented from PixelCrushers.Saver.
|
inlinevirtual |
Resets the quest list container to its original list.
Reimplemented in PixelCrushers.QuestMachine.QuestGiver.
|
inlineprotected |
|
inlineprotected |
|
inlinevirtual |
Reimplemented from PixelCrushers.Saver.
Reimplemented in PixelCrushers.QuestMachine.uSurvivalSupport.uSurvivalQuestJournal.
|
inlinevirtual |
|
protected |
This coroutine runs when delaying quest runtime startup until the end of frame.
|
protected |
The delayed startup coroutine should do runtime startup for quests in this list.
|
getset |
If quests were added after game was saved, add them to quest list when loading saved game.
|
getprotected set |
IDs of static quests that have been deleted and shouldn't be instantiated.
|
getset |
Forward quest state events to listeners that have registered to events such as questBecameOfferable, questStateChanged, and questNodeStateChanged.
|
getset |
Include in saved game data, which is used for saved games and scene persistence.
|
getsetprotected |
The original design-time quest list.
|
getprotected set |
Quest assets.
QuestParameterDelegate PixelCrushers.QuestMachine.QuestListContainer.questAdded = delegate { } |
Raised when a quest is added to the list.
QuestParameterDelegate PixelCrushers.QuestMachine.QuestListContainer.questBecameOfferable = delegate { } |
Raised when a quest in the list becomes offerable.
QuestNodeParameterDelegate PixelCrushers.QuestMachine.QuestListContainer.questNodeStateChanged = delegate { } |
Raised when the state of a quest node in a quest in the list changes.
QuestParameterDelegate PixelCrushers.QuestMachine.QuestListContainer.questRemoved = delegate { } |
Raised when a quest is removed from the list.
QuestParameterDelegate PixelCrushers.QuestMachine.QuestListContainer.questStateChanged = delegate { } |
Raised when the state of a quest in the list changes.