Adventure Creator  1.65.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.ActionList Class Reference
Inheritance diagram for AC.ActionList:
AC.AC_Trigger AC.Cutscene AC.DialogueOption AC.Interaction AC.RuntimeActionList

Public Member Functions

void Initialise ()
 
virtual void Interact ()
 
void RunFromIndex (int index)
 Runs the Actions from a set point. More...
 
void Interact (int i, bool addToSkipQueue)
 Runs the Actions from a set point. More...
 
void Skip ()
 
void Skip (int i)
 Runs the Actions instantly, from a set point. More...
 
bool AreActionsRunning ()
 Checks if any Actions are currently being run. More...
 
void ResetList ()
 
virtual void Kill ()
 
bool IsSkippable ()
 Checks if the ActionListAsset is skippable. This is safer than just reading 'isSkippable', because it also accounts for actionListType - since ActionLists that run in the background cannot be skipped More...
 
List< ActionGetActions ()
 Gets the List of Actions that this ActionList runs, regardless of source. More...
 
ActionParameter GetParameter (string label)
 Gets a parameter of a given name. More...
 
ActionParameter GetParameter (int _ID)
 Gets a parameter of a given ID number. More...
 
void Pause ()
 Pauses the ActionList once it has finished running it's current Action.
 
void Resume (int _startIndex, int[] _resumeIndices, string _parameterData, bool rerunPreviousAction=false)
 Resumes the ActionList. More...
 
string GetParameterData ()
 Gets the current ActionParameter values as a serializable string. More...
 

Static Public Member Functions

static AC.Action GetDefaultAction ()
 Gets the default Action set within ActionsManager. More...
 

Public Attributes

List< AC.Actionactions = new List<AC.Action>()
 
bool isSkippable = true
 
float triggerTime = 0f
 
bool autosaveAfter = false
 
ActionListType actionListType = ActionListType.PauseGameplay
 
Conversation conversation = null
 
ActionListAsset assetFile
 
ActionListSource source
 
bool unfreezePauseMenus = true
 
bool useParameters = false
 
List< ActionParameterparameters = new List<ActionParameter>()
 
int tagID
 
bool syncParamValues = true
 

Protected Member Functions

virtual void BeginActionList (int i, bool addToSkipQueue)
 
void ProcessAction (int i)
 
void CheckEndCutscene ()
 
void ReturnLastResultToSource (ActionEnd _lastResult, int i)
 
virtual void FinishPause ()
 
virtual void AddResumeToManager (int startIndex)
 

Protected Attributes

bool isSkipping = false
 
LayerMask LayerHotspot
 
LayerMask LayerOff
 
List< int > resumeIndices = new List<int>()
 
bool isChangingScene = false
 

Detailed Description

An ActionList stores and handles the sequential triggering of Action objects. Strung together, Actions can be used to create cutscenes, effects and gameplay logic. This base class is never used itself - only subclasses are intended to be placed on GameObjects.

Member Function Documentation

◆ AreActionsRunning()

bool AC.ActionList.AreActionsRunning ( )

Checks if any Actions are currently being run.

Returns
True if any Actions are currently being run

◆ GetActions()

List<Action> AC.ActionList.GetActions ( )

Gets the List of Actions that this ActionList runs, regardless of source.

Returns
The List of Actions that this ActionList runs, regardless of source.

◆ GetDefaultAction()

static AC.Action AC.ActionList.GetDefaultAction ( )
static

Gets the default Action set within ActionsManager.

Returns
The default Action set within ActionsManager

◆ GetParameter() [1/2]

ActionParameter AC.ActionList.GetParameter ( string  label)

Gets a parameter of a given name.

Parameters
labelThe name of the parameter to get
Returns
The parameter with the given name

◆ GetParameter() [2/2]

ActionParameter AC.ActionList.GetParameter ( int  _ID)

Gets a parameter of a given ID number.

Parameters
_IDThe ID of the parameter to get
Returns
The parameter with the given ID number

◆ GetParameterData()

string AC.ActionList.GetParameterData ( )

Gets the current ActionParameter values as a serializable string.

Returns
The current ActionParameter values as a serializable string

◆ Initialise()

void AC.ActionList.Initialise ( )

Clears the List of Actions and creates one instance of the default, as set within ActionsManager.

◆ Interact() [1/2]

virtual void AC.ActionList.Interact ( )
virtual

Runs the Actions normally, from the beginning.

◆ Interact() [2/2]

void AC.ActionList.Interact ( int  i,
bool  addToSkipQueue 
)

Runs the Actions from a set point.

Parameters
iThe index number of actions to start from
addToSkipQueueIf True, then the ActionList will be skipped when the user presses the 'EndCutscene' Input button

◆ IsSkippable()

bool AC.ActionList.IsSkippable ( )

Checks if the ActionListAsset is skippable. This is safer than just reading 'isSkippable', because it also accounts for actionListType - since ActionLists that run in the background cannot be skipped

Returns
True if the ActionListAsset is skippable

◆ Kill()

virtual void AC.ActionList.Kill ( )
virtual

Stops the Actions from running and sets the gameState in StateHandler to the correct value.

Reimplemented in AC.RuntimeActionList.

◆ ResetList()

void AC.ActionList.ResetList ( )

Stops the Actions from running.

◆ Resume()

void AC.ActionList.Resume ( int  _startIndex,
int []  _resumeIndices,
string  _parameterData,
bool  rerunPreviousAction = false 
)

Resumes the ActionList.

Parameters
_startIndexThe Action index that the ActionList was originally started from.
_resumeIndicesAn array of Action indices to resume from
_parameterDataThe ActionParameter values when paused, as a serializable string
rerunPreviousActionIf True, then any Actions that were running when the ActionList was paused will be re-run

◆ RunFromIndex()

void AC.ActionList.RunFromIndex ( int  index)

Runs the Actions from a set point.

Parameters
indexThe index number of actions to start from

◆ Skip() [1/2]

void AC.ActionList.Skip ( )

Runs the Actions instantly, from the beginning.

◆ Skip() [2/2]

void AC.ActionList.Skip ( int  i)

Runs the Actions instantly, from a set point.

Parameters
iThe index number of actions to start from

Member Data Documentation

◆ actionListType

ActionListType AC.ActionList.actionListType = ActionListType.PauseGameplay

The effect that running the Actions has on the rest of the game (PauseGameplay, RunInBackground)

◆ actions

List<AC.Action> AC.ActionList.actions = new List<AC.Action>()

The Actions

◆ assetFile

ActionListAsset AC.ActionList.assetFile

The ActionListAsset file that stores the Actions, if source = ActionListSource.AssetFile

◆ autosaveAfter

bool AC.ActionList.autosaveAfter = false

If True, the game will auto-save when the Actions have finished running

◆ conversation

Conversation AC.ActionList.conversation = null

The Conversation to run when the Actions have finished running

◆ isSkippable

bool AC.ActionList.isSkippable = true

If True, the Actions will be skipped when the user presses the 'EndCutscene' Input button

◆ parameters

List<ActionParameter> AC.ActionList.parameters = new List<ActionParameter>()

A List of ActionParameter objects that can be used to override values within the Actions, if useParameters = True

◆ source

ActionListSource AC.ActionList.source

Where the Actions are stored when not being run (InScene, AssetFile)

◆ syncParamValues

bool AC.ActionList.syncParamValues = true

If True, and source = ActionListSource.AssetFile, the asset file's parameter values will be shared amongst all linked ActionLists

◆ tagID

int AC.ActionList.tagID

The ID of the associated SpeechTag

◆ triggerTime

float AC.ActionList.triggerTime = 0f

The delay, in seconds, before the Actions are run when the ActionList is triggered

◆ unfreezePauseMenus

bool AC.ActionList.unfreezePauseMenus = true

If True, the game will un-freeze itself while the Actions run if the game was previously paused due to an enabled Menu

◆ useParameters

bool AC.ActionList.useParameters = false

If True, ActionParameters can be used to override values within the Action objects