Adventure Creator  1.55b
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2016
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...
 
void EndAssetList (ActionListAsset asset, Action _action=null)
 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)
 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

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
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
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
void AC.ActionListAssetManager.EndAssetList ( ActionListAsset  asset,
Action  _action = null 
)

Stops an ActionListAsset from running.

Parameters
The ActionListAsset file to stop
_actionAn Action that, if present within 'asset', will prevent the ActionListAsset from ending prematurely
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>
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
void AC.ActionListAssetManager.LoadData ( string  _dataString)

Recreates ActionList resume data from a saved data string.

Parameters
_dataStringThe saved data string
RuntimeActionList AC.ActionListAssetManager.Pause ( ActionListAsset  actionListAsset)

Pauses an ActionListAsset, provided that it is currently running.

Parameters
actionListAssetThe ActionListAsset to pause
Returns
The RuntimeActionList that is in the scene, associated with the ActionListAsset
void AC.ActionListAssetManager.Resume ( ActionListAsset  actionListAsset)

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

Parameters
actionListAssetThe ActionListAsset to pause

Member Data Documentation

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

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