![]() |
Adventure Creator
1.76.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
ActiveInput (int[] idArray) | |
ActiveInput (int _ID) | |
A Constructor in which the unique identifier is explicitly set. More... | |
void | SetDefaultState () |
bool | TestForInput () |
Tests if the associated input button is being pressed at the right time, and runs its associated ActionListAsset if it is More... | |
void | ShowGUI () |
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 |
FlagsGameState | gameStateFlags = FlagsGameState.Normal |
ActionListAsset | actionListAsset |
SimulateInputType | inputType = SimulateInputType.Button |
float | axisThreshold = 0.2f |
Protected Types | |
enum | ActiveInputButtonType { OnButtonDown, OnButtonUp } |
Protected Member Functions | |
bool | TriggerIfStateMatches () |
Protected Attributes | |
ActiveInputButtonType | buttonType = ActiveInputButtonType.OnButtonDown |
bool | isEnabled |
Properties | |
bool | IsEnabled [get, set] |
string | Label [get] |
A data container for active inputs, which map ActionListAssets to input buttons.
AC.ActiveInput.ActiveInput | ( | int[] | idArray | ) |
The default Constructor.
AC.ActiveInput.ActiveInput | ( | int | _ID | ) |
A Constructor in which the unique identifier is explicitly set.
_ID | The unique identifier |
|
static |
Creates a save string containing the enabled state of a list of active inputs
activeInputs | The active inputs to save |
|
static |
Restores the enabled states of the game's active inputs from a saved data string
dataString | The data string to load |
void AC.ActiveInput.SetDefaultState | ( | ) |
Sets the enabled state to the default value.
bool AC.ActiveInput.TestForInput | ( | ) |
Tests if the associated input button is being pressed at the right time, and runs its associated ActionListAsset if it is
|
static |
Upgrades all active inputs from previous releases
ActionListAsset AC.ActiveInput.actionListAsset |
The ActionListAsset to run when the input button is pressed
float AC.ActiveInput.axisThreshold = 0.2f |
If inputType = SimulateInputType.Axis, the threshold value for the axis to trigger the ActionListAsset
bool AC.ActiveInput.enabledOnStart = true |
If True, the active input is enabled when the game begins
FlagsGameState AC.ActiveInput.gameStateFlags = FlagsGameState.Normal |
What GameStates this active input will be available for
int AC.ActiveInput.ID |
A unique identifier
string AC.ActiveInput.inputName |
The name of the Input button, as defined in the Input Manager
SimulateInputType AC.ActiveInput.inputType = SimulateInputType.Button |
What type of input is expected (Button, Axis)
string AC.ActiveInput.label |
An Editor-friendly name
|
getset |
The runtime enabled state of the active input