Class InputActionSensor
Inheritance
InputActionSensor
Assembly: Xareus.Unity.Libraries.dll
[Renamed("Xareus.Scenarios.Unity.Input.InputActionSensor", "Xareus.Unity.Librairies")]
[FunctionDescription("This sensor validates when the specified input action is performed/pressed or canceled/released. Note that if the input action is not enabled when the sensor starts cheking, the cancellation will only work if the action was started after the sensor was created.One way to make sure the action is enabled is to set the input action asset to a Player Input Component")]
public class InputActionSensor : AInUnityStepSensor
Constructors
InputActionSensor(Event, Dictionary<string, Parameter>, ContextHolder)
Declaration
public InputActionSensor(Event @event, Dictionary<string, Parameter> parameters, ContextHolder contexts)
Parameters
Fields
Declaration
[EventContextEntry]
public const string INPUT_ACTION_KEY = "Input Action"
Field Value
Declaration
[EventContextEntry]
public const string INPUT_ACTION_STATE = "State"
Field Value
Declaration
[EventContextEntry]
public const string INPUT_ACTION_STATE_CHANGE = "State Change"
Field Value
Declaration
[ConfigurationParameter("Check State Changed", true, "If enabled or not specified, the sensor validates when the action turns on or off, if disabled, the sensor validates depending on the current state of the action, that will be ckecked at each frame", Necessity.Optional)]
protected bool checkOnStatechanged
Field Value
Declaration
[ConfigurationParameter("Check Pressed", true, "If enabled or not specified, the sensor validates when the action is/turns on. Otherwise, the sensor validates when the action is/turns off", Necessity.Optional)]
protected bool checkPressed
Field Value
Declaration
[ConfigurationParameter("Input Action", Necessity.Required)]
[Provider("Input Action Map")]
protected InputAction inputAction
Field Value
| Type |
Description |
| InputAction |
|
Declaration
[ConfigurationParameter("Input Action Map", Necessity.Required)]
[Provider("Input Action Asset")]
protected InputActionMap inputActionMap
Field Value
| Type |
Description |
| InputActionMap |
|
Declaration
[ConfigurationParameter("Input Action Asset", Necessity.Required)]
protected InputActionAsset inputActions
Field Value
| Type |
Description |
| InputActionAsset |
|
Methods
Reset a sensor. Note that this code will be executed in unity's thread and the declared parameters (using the ConfigurationParameter attribute) are already filled
Declaration
public override void SafeReset()
Overrides
This method is called at each selected Unity execution step in Unity's thread. The Unity execution steps used depend on the ExecutionStep property
Declaration
public override ASensor.Result UnityStepSensorCheck()
Returns
Overrides