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

Public Member Functions

void OnAwake ()
 
void UpdateActionListManager ()
 
void EndCutscene ()
 
bool IsListRunning (ActionList actionList)
 Checks if a particular ActionList is running. More...
 
bool CanResetSkipVars (ActionList actionList)
 
bool IsGameplayBlocked (Action _actionToIgnore=null)
 Checks if any currently-running ActionLists pause gameplay. More...
 
bool IsOverrideConversationRunning ()
 
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 (SceneInfo sceneInfo)
 Ends all currently-running ActionLists present within a given scene. More...
 
void 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!
 
void SetCorrectGameState ()
 
void SetConversationPoint (ActionConversation actionConversation)
 Sets the point to continue from, when a Conversation's options are overridden by an ActionConversation. More...
 
bool OverrideConversation (int optionIndex)
 Attempts to override a Conversation object's default options by resuming an ActionList from the last ActionConversation. More...
 
void OnEndConversation ()
 
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...
 

Static Public Member Functions

static void KillAll ()
 

Public Attributes

bool ignoreNextConversationSkip = false
 
List< ActiveListactiveLists = new List<ActiveList>()
 

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)

Checks if any currently-running ActionLists pause gameplay.

Any ActionList that contains this Action will be excluded from the check

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()

void AC.ActionListManager.KillAllFromScene ( SceneInfo  sceneInfo)

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

Parameters
sceneInfoA data container for information about the scene in question

◆ 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

◆ OnEndConversation()

void AC.ActionListManager.OnEndConversation ( )

Called when manually ending a Conversation by invoking the 'EndConversation' input

◆ OverrideConversation()

bool AC.ActionListManager.OverrideConversation ( int  optionIndex)

Attempts to override a Conversation object's default options by resuming an ActionList from the last ActionConversation.

The index number of the chosen dialogue option.

Returns
True if the override was succesful.

◆ 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.

◆ SetConversationPoint()

void AC.ActionListManager.SetConversationPoint ( ActionConversation  actionConversation)

Sets the point to continue from, when a Conversation's options are overridden by an ActionConversation.

The "Dialogue: Start conversation" Action that is overriding the Conversation's options

◆ SetCorrectGameState()

void AC.ActionListManager.SetCorrectGameState ( )

Sets the StateHandler's gameState variable to the correct value, based on what ActionLists are currently running.

◆ UpdateActionListManager()

void AC.ActionListManager.UpdateActionListManager ( )

Checks for autosaving and changed variables. This is called every frame by StateHandler.

◆ VariableChanged()

void AC.ActionListManager.VariableChanged ( )

Inform ActionListManager that a Variable's value has changed.

Member Data Documentation

◆ activeLists

List<ActiveList> AC.ActionListManager.activeLists = new List<ActiveList>()

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

◆ ignoreNextConversationSkip

bool AC.ActionListManager.ignoreNextConversationSkip = false

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