Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.ActionListManager Class Reference
Inheritance diagram for AC.ActionListManager:

Public Member Functions

void EndCutscene ()
 
bool IsListRunning (ActionList actionList)
 Checks if a particular ActionList is running. More...
 
bool IsListRegistered (ActionList actionList)
 
bool CanResetSkipVars (ActionList actionList)
 
bool IsGameplayBlocked (Action _actionToIgnore=null, bool showSaveDebug=false)
 Checks if any currently-running ActionLists pause gameplay. More...
 
bool IsGameplayBlockedAndUnfrozen ()
 Checks if any currently-running ActionListAssets pause gameplay and unfreeze 'Pause' Menus. More...
 
bool IsInSkippableCutscene ()
 Checks if any skippable ActionLists are currently running. More...
 
void AddToList (ActionList actionList, bool addToSkipQueue, int _startIndex)
 Adds a new ActionList, assumed to already be running, to the internal record of currently-running ActionLists, and sets the correct GameState in StateHandler. More...
 
void EndList (ActionList actionList)
 Resets and removes a ActionList from the internal record of currently-running ActionLists, and sets the correct GameState in StateHandler. More...
 
void EndList (ActiveList activeList)
 Ends the ActionList or ActionListAsset associated with a given ActiveList data container More...
 
void VariableChanged ()
 
void KillAllLists ()
 
void KillAllFromScene (int sceneIndex)
 Ends all currently-running ActionLists present within a given scene. More...
 
void KillAllFromScene (string sceneName)
 Ends all currently-running ActionLists present within a given scene. More...
 
void ResetSkippableData ()
 
bool CanAddToSkipQueue (ActionList actionList, bool originalValue)
 Checks if a given ActionList should be skipped when the 'EndCutscene' input is triggered. More...
 
void AssignResumeIndices (ActionList actionList, int[] resumeIndices)
 Records the Action indices that the associated ActionList was running before being paused. This data is sent to the ActionList's associated ActiveList More...
 
void Resume (ActionList actionList, bool rerunPausedActions)
 Resumes a previously-paused ActionList. If the ActionList is already running, nothing will happen. More...
 
string GetSaveData (SubScene subScene=null)
 Generates a save-able string out of the ActionList resume data. More...
 
void LoadData (string _dataString, SubScene subScene=null)
 Recreates ActionList resume data from a saved data string. More...
 
void AddToList (ActiveList activeList)
 
void DrawStatus ()
 
void RegisterCutsceneSpawnedObject (GameObject _gameObject)
 Registers an object as having been spawned as a result of the current skippable cutscene. If this cutscene is skipped by the player, the object will be deleted - as it is assumed that re-running the cutscene in 'skip' mode will bring it back again. More...
 

Static Public Member Functions

static void KillAll ()
 

Public Attributes

bool ignoreNextConversationSkip = false
 

Protected Member Functions

bool AreAnyListsSkipping ()
 
void OnEndActionList (ActionList actionList, ActionListAsset actionListAsset, bool isSkipping)
 
void OnEnterGameState (GameState gameState)
 
void RunVarChange (GameState gameState)
 
void PurgeLists ()
 
void ResetSkipVars (bool ignoreBlockCheck=false)
 
bool HasSkipQueue ()
 

Protected Attributes

bool playCutsceneOnVarChange = false
 
bool saveAfterCutscene = false
 
int playerIDOnStartQueue
 
bool noPlayerOnStartQueue
 
List< ActiveListactiveLists = new List<ActiveList>()
 

Properties

List< ActiveListActiveLists [get]
 

Detailed Description

This component keeps track of which ActionLists are running. When an ActionList runs or ends, it is passed to this script, which sets up the correct GameState in StateHandler. It should be placed on the GameEngine prefab.

Member Function Documentation

◆ AddToList()

void AC.ActionListManager.AddToList ( ActionList  actionList,
bool  addToSkipQueue,
int  _startIndex 
)

Adds a new ActionList, assumed to already be running, to the internal record of currently-running ActionLists, and sets the correct GameState in StateHandler.

Parameters
actionListThe ActionList to run
addToSkipQueueIf True, then the ActionList will be added to the list of ActionLists to skip
_startIndexThe index number of the Action to start skipping from, if addToSkipQueue = True
actionListAssetThe ActionListAsset that is the ActionList's source, if it has one.

◆ AssignResumeIndices()

void AC.ActionListManager.AssignResumeIndices ( ActionList  actionList,
int[]  resumeIndices 
)

Records the Action indices that the associated ActionList was running before being paused. This data is sent to the ActionList's associated ActiveList

Parameters
actionListThe ActionList that is being paused
resumeIndicesAn array of Action indices to run when the ActionList is resumed

◆ CanAddToSkipQueue()

bool AC.ActionListManager.CanAddToSkipQueue ( ActionList  actionList,
bool  originalValue 
)

Checks if a given ActionList should be skipped when the 'EndCutscene' input is triggered.

Parameters
actionListThe ActionList to check
originalValueIf True, the user would like it to be skippable.
Returns
True if the ActionList can be skipped.

◆ EndCutscene()

void AC.ActionListManager.EndCutscene ( )

Ends all skippable ActionLists. This is triggered when the user presses the "EndCutscene" Input button.

◆ EndList() [1/2]

void AC.ActionListManager.EndList ( ActionList  actionList)

Resets and removes a ActionList from the internal record of currently-running ActionLists, and sets the correct GameState in StateHandler.

Parameters
actionListThe ActionList to end

◆ EndList() [2/2]

void AC.ActionListManager.EndList ( ActiveList  activeList)

Ends the ActionList or ActionListAsset associated with a given ActiveList data container

Parameters
activeListThe ActiveList associated with the ActionList or ActionListAsset to end.

◆ GetSaveData()

string AC.ActionListManager.GetSaveData ( SubScene  subScene = null)

Generates a save-able string out of the ActionList resume data.

<param name = "If set, only data for a given subscene will be saved. If null, only data for the active scene will be saved

Returns
A save-able string out of the ActionList resume data<returns>

◆ IsGameplayBlocked()

bool AC.ActionListManager.IsGameplayBlocked ( Action  _actionToIgnore = null,
bool  showSaveDebug = false 
)

Checks if any currently-running ActionLists pause gameplay.

Parameters
_actionToIgnoreAny ActionList that contains this Action will be excluded from the check
showSaveDebugIf True, and an ActionList is pausing gameplay, a Console warning will be given to explain why saving is not currently possible
Returns
True if any currently-running ActionLists pause gameplay

◆ IsGameplayBlockedAndUnfrozen()

bool AC.ActionListManager.IsGameplayBlockedAndUnfrozen ( )

Checks if any currently-running ActionListAssets pause gameplay and unfreeze 'Pause' Menus.

Returns
True if any currently-running ActionListAssets pause gameplay and unfreeze 'Pause' Menus.

◆ IsInSkippableCutscene()

bool AC.ActionListManager.IsInSkippableCutscene ( )

Checks if any skippable ActionLists are currently running.

Returns
True if any skippable ActionLists are currently running.

◆ IsListRunning()

bool AC.ActionListManager.IsListRunning ( ActionList  actionList)

Checks if a particular ActionList is running.

Parameters
actionListThe ActionList to search for
Returns
True if the ActionList is currently running

◆ KillAll()

static void AC.ActionListManager.KillAll ( )
static

Ends all currently-running ActionLists and ActionListAssets.

◆ KillAllFromScene() [1/2]

void AC.ActionListManager.KillAllFromScene ( int  sceneIndex)

Ends all currently-running ActionLists present within a given scene.

Parameters
sceneIndexThe index of the scene

◆ KillAllFromScene() [2/2]

void AC.ActionListManager.KillAllFromScene ( string  sceneName)

Ends all currently-running ActionLists present within a given scene.

Parameters
sceneNameThe name of the scene

◆ KillAllLists()

void AC.ActionListManager.KillAllLists ( )

Ends all currently-running ActionLists and ActionListAssets.

◆ LoadData()

void AC.ActionListManager.LoadData ( string  _dataString,
SubScene  subScene = null 
)

Recreates ActionList resume data from a saved data string.

<param name = "If set, the data is for a subscene and so existing data will not be cleared.</param> <param name = "_localResumeData">The saved data string

◆ RegisterCutsceneSpawnedObject()

void AC.ActionListManager.RegisterCutsceneSpawnedObject ( GameObject  _gameObject)

Registers an object as having been spawned as a result of the current skippable cutscene. If this cutscene is skipped by the player, the object will be deleted - as it is assumed that re-running the cutscene in 'skip' mode will bring it back again.

Parameters
_gameObjectThe spawned object

◆ ResetSkippableData()

void AC.ActionListManager.ResetSkippableData ( )

Clears all data about the current state of "skippable" Cutscenes, allowing you to prevent previously-run Cutscenes in the same block of gameplay-blocking ActionLists. Use with caution!

◆ Resume()

void AC.ActionListManager.Resume ( ActionList  actionList,
bool  rerunPausedActions 
)

Resumes a previously-paused ActionList. If the ActionList is already running, nothing will happen.

Parameters
actionListThe ActionList to pause
rerunPausedActionsIf True, then any Actions that were midway-through running when the ActionList was paused will be restarted. Otherwise, the Actions that follow them will be reun instead.

◆ VariableChanged()

void AC.ActionListManager.VariableChanged ( )

Inform ActionListManager that a Variable's value has changed.

Member Data Documentation

◆ ignoreNextConversationSkip

bool AC.ActionListManager.ignoreNextConversationSkip = false

If True, then the next time ActionConversation's Skip() function is called, it will be ignored

Property Documentation

◆ ActiveLists

List<ActiveList> AC.ActionListManager.ActiveLists
get

Data about any ActionList that has been run and we need to store information about