Adventure Creator  1.66.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.ActiveInput Class Reference

Public Member Functions

 ActiveInput (int[] idArray)
 
 ActiveInput (int _ID)
 A Constructor in which the unique identifier is explicitly set. More...
 
void SetDefaultState ()
 
void TestForInput ()
 Tests if the associated input button is being pressed at the right time, and runs its associated ActionListAsset if it is
 

Static Public Member Functions

static void Upgrade ()
 
static string CreateSaveData (List< ActiveInput > activeInputs)
 Creates a save string containing the enabled state of a list of active inputs More...
 
static void LoadSaveData (string dataString)
 Restores the enabled states of the game's active inputs from a saved data string More...
 

Public Attributes

string label
 
int ID
 
string inputName
 
bool enabledOnStart = true
 
GameState gameState
 
ActionListAsset actionListAsset
 
SimulateInputType inputType = SimulateInputType.Button
 
float axisThreshold = 0.2f
 
bool isEditing = false
 

Properties

bool IsEnabled [get, set]
 
string Label [get]
 

Detailed Description

A data container for active inputs, which map ActionListAssets to input buttons.

Constructor & Destructor Documentation

◆ ActiveInput() [1/2]

AC.ActiveInput.ActiveInput ( int []  idArray)

The default Constructor.

◆ ActiveInput() [2/2]

AC.ActiveInput.ActiveInput ( int  _ID)

A Constructor in which the unique identifier is explicitly set.

Parameters
_IDThe unique identifier

Member Function Documentation

◆ CreateSaveData()

static string AC.ActiveInput.CreateSaveData ( List< ActiveInput activeInputs)
static

Creates a save string containing the enabled state of a list of active inputs

Parameters
activeInputsThe active inputs to save
Returns
The save string

◆ LoadSaveData()

static void AC.ActiveInput.LoadSaveData ( string  dataString)
static

Restores the enabled states of the game's active inputs from a saved data string

Parameters
dataStringThe data string to load

◆ SetDefaultState()

void AC.ActiveInput.SetDefaultState ( )

Sets the enabled state to the default value.

◆ Upgrade()

static void AC.ActiveInput.Upgrade ( )
static

Upgrades all active inputs from pre-v1.58

Member Data Documentation

◆ actionListAsset

ActionListAsset AC.ActiveInput.actionListAsset

The ActionListAsset to run when the input button is pressed

◆ axisThreshold

float AC.ActiveInput.axisThreshold = 0.2f

If inputType = SimulateInputType.Axis, the threshold value for the axis to trigger the ActionListAsset

◆ enabledOnStart

bool AC.ActiveInput.enabledOnStart = true

If True, the active input is enabled when the game begins

◆ gameState

GameState AC.ActiveInput.gameState

What state the game must be in for the actionListAsset to run (Normal, Cutscene, Paused, DialogOptions)

◆ ID

int AC.ActiveInput.ID

A unique identifier

◆ inputName

string AC.ActiveInput.inputName

The name of the Input button, as defined in the Input Manager

◆ inputType

SimulateInputType AC.ActiveInput.inputType = SimulateInputType.Button

What type of input is expected (Button, Axis)

◆ label

string AC.ActiveInput.label

An Editor-friendly name

Property Documentation

◆ IsEnabled

bool AC.ActiveInput.IsEnabled
getset

The runtime enabled state of the active input