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

Public Member Functions

void OnAwake ()
 
bool IsListRunning (ActionListAsset actionListAsset)
 Checks if a particular ActionListAsset file is running. More...
 
void AddToList (RuntimeActionList runtimeActionList, ActionListAsset actionListAsset, bool addToSkipQueue, int _startIndex)
 Adds a new ActionListAsset, assumed to already be running, to the internal record of currently-running ActionListAssets, and sets the correct GameState in StateHandler. More...
 
void DestroyAssetList (ActionListAsset asset)
 Destroys the RuntimeActionList scene object that is running Actions from an ActionListAsset. More...
 
int EndAssetList (ActionListAsset asset, Action _action=null, bool forceEndAll=false)
 Stops an ActionListAsset from running. More...
 
void EndAssetList (RuntimeActionList runtimeActionList)
 Stops an ActionListAsset from running. More...
 
void AssignResumeIndices (ActionListAsset actionListAsset, int[] resumeIndices)
 Records the Action indices that the associated ActionListAsset was running before being paused. This data is sent to the ActionListAsset's associated ActiveList More...
 
RuntimeActionList [] Pause (ActionListAsset actionListAsset)
 Pauses an ActionListAsset, provided that it is currently running. More...
 
void Resume (ActionListAsset actionListAsset, bool rerunPausedActions)
 Resumes a previously-paused ActionListAsset. If the ActionListAsset is already running, nothing will happen. More...
 
string GetSaveData ()
 Generates a save-able string out of the ActionList resume data. More...
 
void LoadData (string _dataString)
 Recreates ActionList resume data from a saved data string. More...
 

Public Attributes

List< ActiveListactiveLists = new List<ActiveList>()
 

Detailed Description

This component keeps track of which ActionListAssets are running. It should be placed on the PersistentEngine prefab.

Member Function Documentation

◆ AddToList()

void AC.ActionListAssetManager.AddToList ( RuntimeActionList  runtimeActionList,
ActionListAsset  actionListAsset,
bool  addToSkipQueue,
int  _startIndex 
)

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

Parameters
runtimeActionListThe RuntimeActionList associated with the ActionListAsset to run
actionListAssetThe ActionListAsset that is the runtimeActionList's source, if it has one.
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

◆ AssignResumeIndices()

void AC.ActionListAssetManager.AssignResumeIndices ( ActionListAsset  actionListAsset,
int []  resumeIndices 
)

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

Parameters
actionListAssetThe ActionListAsset that is being paused
resumeIndicesAn array of Action indices to run when the ActionListAsset is resumed

◆ DestroyAssetList()

void AC.ActionListAssetManager.DestroyAssetList ( ActionListAsset  asset)

Destroys the RuntimeActionList scene object that is running Actions from an ActionListAsset.

Parameters
assetThe asset file that the RuntimeActionList has sourced its Actions from

◆ EndAssetList() [1/2]

int AC.ActionListAssetManager.EndAssetList ( ActionListAsset  asset,
Action  _action = null,
bool  forceEndAll = false 
)

Stops an ActionListAsset from running.

Parameters
assetThe ActionListAsset file to stop>
_actionAn Action that, if present within 'asset', will prevent the ActionListAsset from ending prematurely
forceEndAllIf True, then all will be stopped - even if the ActionListAsset's canRunMultipleInstances is True
Returns
The number of instances of the ActionListAsset that were stopped

◆ EndAssetList() [2/2]

void AC.ActionListAssetManager.EndAssetList ( RuntimeActionList  runtimeActionList)

Stops an ActionListAsset from running.

Parameters
runtimeActionListThe RuntimeActionList associated with the ActionListAsset file to stop>

◆ GetSaveData()

string AC.ActionListAssetManager.GetSaveData ( )

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

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

◆ IsListRunning()

bool AC.ActionListAssetManager.IsListRunning ( ActionListAsset  actionListAsset)

Checks if a particular ActionListAsset file is running.

Parameters
actionListAssetThe ActionListAsset to search for
Returns
True if the ActionListAsset file is currently running

◆ LoadData()

void AC.ActionListAssetManager.LoadData ( string  _dataString)

Recreates ActionList resume data from a saved data string.

Parameters
_dataStringThe saved data string

◆ Pause()

RuntimeActionList [] AC.ActionListAssetManager.Pause ( ActionListAsset  actionListAsset)

Pauses an ActionListAsset, provided that it is currently running.

Parameters
actionListAssetThe ActionListAsset to pause
Returns
All RuntimeActionLists that are in the scene, associated with the ActionListAsset

◆ Resume()

void AC.ActionListAssetManager.Resume ( ActionListAsset  actionListAsset,
bool  rerunPausedActions 
)

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

Parameters
actionListAssetThe ActionListAsset 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.

Member Data Documentation

◆ activeLists

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

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