Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
void | OnInitPersistentEngine () |
void | SetObjectiveState (int objectiveID, int newStateID, bool selectAfter=false) |
Updates the state of an Objective More... | |
void | SetObjectiveState (int objectiveID, ObjectiveStateType newStateType, bool selectAfter=false) |
Updates the state of an Objective More... | |
void | SetObjectiveState (int objectiveID, int newStateID, int playerID) |
Updates the state of an Objective More... | |
ObjectiveState | GetObjectiveState (int objectiveID) |
Gets the state of an active Objective. More... | |
ObjectiveState | GetObjectiveState (int objectiveID, int playerID) |
Gets the state of an active Objective, held by a specific Player. More... | |
void | CancelObjective (int objectiveID) |
Marks an Objective as inactive More... | |
ObjectiveInstance | GetObjective (int objectiveID) |
Gets an instance of an active Objective More... | |
ObjectiveInstance[] | GetObjectives (List< int > categoryIDs=null) |
Gets all active Objective instances More... | |
ObjectiveInstance[] | GetObjectives (ObjectiveStateType objectiveStateType, List< int > categoryIDs=null) |
Gets all active Objective instances currently set to a particular type of state More... | |
ObjectiveInstance[] | GetObjectives (ObjectiveDisplayType objectiveDisplayType, List< int > categoryIDs=null) |
Gets all active Objective instances currently set to a particular display type of state More... | |
void | SelectObjective (int objectiveID) |
Selects an Objective, so that it can be displayed in a Menu More... | |
void | DeselectObjective () |
void | ClearAll () |
void | ClearUniqueToPlayer () |
PlayerData | SavePlayerObjectives (PlayerData playerData) |
Updates a PlayerData class with Objectives that are unique to the current Player. More... | |
void | AssignPlayerObjectives (PlayerData playerData) |
Restores saved data from a PlayerData class More... | |
MainData | SaveGlobalObjectives (MainData mainData) |
Updates a MainData class with Objectives that are shared by all Players. More... | |
void | AssignGlobalObjectives (MainData mainData) |
Restores saved data from a MainData class More... | |
Protected Attributes | |
List< ObjectiveInstance > | playerObjectiveInstances = new List<ObjectiveInstance>() |
List< ObjectiveInstance > | globalObjectiveInstances = new List<ObjectiveInstance>() |
ObjectiveInstance | selectedObjectiveInstance |
Properties | |
ObjectiveInstance | SelectedObjective [get, set] |
This script keeps track of all active Objectives.
void AC.RuntimeObjectives.AssignGlobalObjectives | ( | MainData | mainData | ) |
void AC.RuntimeObjectives.AssignPlayerObjectives | ( | PlayerData | playerData | ) |
Restores saved data from a PlayerData class
playerData | The PlayerData class to load from |
void AC.RuntimeObjectives.CancelObjective | ( | int | objectiveID | ) |
void AC.RuntimeObjectives.ClearAll | ( | ) |
Clears all Objective data
void AC.RuntimeObjectives.ClearUniqueToPlayer | ( | ) |
Clears all Objective data that's per-player, and not global
void AC.RuntimeObjectives.DeselectObjective | ( | ) |
De-selects the selected Objective
ObjectiveInstance AC.RuntimeObjectives.GetObjective | ( | int | objectiveID | ) |
Gets an instance of an active Objective
objectiveID | The ID of the Objective to search for |
ObjectiveInstance [] AC.RuntimeObjectives.GetObjectives | ( | List< int > | categoryIDs = null | ) |
ObjectiveInstance [] AC.RuntimeObjectives.GetObjectives | ( | ObjectiveDisplayType | objectiveDisplayType, |
List< int > | categoryIDs = null |
||
) |
Gets all active Objective instances currently set to a particular display type of state
objectiveDisplayType | The type of display state to search for |
categoryIDs | If non-null, a list of category IDs that must include the Objective's own category ID for it to be returned |
ObjectiveInstance [] AC.RuntimeObjectives.GetObjectives | ( | ObjectiveStateType | objectiveStateType, |
List< int > | categoryIDs = null |
||
) |
Gets all active Objective instances currently set to a particular type of state
objectiveStateType | The type of state to search for |
categoryIDs | If non-null, a list of category IDs that must include the Objective's own category ID for it to be returned |
ObjectiveState AC.RuntimeObjectives.GetObjectiveState | ( | int | objectiveID | ) |
ObjectiveState AC.RuntimeObjectives.GetObjectiveState | ( | int | objectiveID, |
int | playerID | ||
) |
PlayerData AC.RuntimeObjectives.SavePlayerObjectives | ( | PlayerData | playerData | ) |
Updates a PlayerData class with Objectives that are unique to the current Player.
playerData | The original PlayerData class |
void AC.RuntimeObjectives.SelectObjective | ( | int | objectiveID | ) |
void AC.RuntimeObjectives.SetObjectiveState | ( | int | objectiveID, |
int | newStateID, | ||
bool | selectAfter = false |
||
) |
void AC.RuntimeObjectives.SetObjectiveState | ( | int | objectiveID, |
int | newStateID, | ||
int | playerID | ||
) |
void AC.RuntimeObjectives.SetObjectiveState | ( | int | objectiveID, |
ObjectiveStateType | newStateType, | ||
bool | selectAfter = false |
||
) |
Updates the state of an Objective
objectiveID | The ID of the Objective to update |
newStateType | The ObjectiveStateType of the Objective's new state. If not states of this type are found, no change will be made. If multiple states of this type are found, the first will be set. |
selectAfter | If True, the Objective will be considered 'selected' upon being updated |
|
getset |
The instance of the currently-selected Objective