Class KeyPressedSensor
Checks for a keyboard input. Note that inputs happening between two scenario update will activate the sensor
Inheritance
KeyPressedSensor
Assembly: Xareus.Unity.Librairies.Input.dll
[Renamed("Xareus.Scenario.Input.KeyPressedSensor", "Xareus.Scenario.Input")]
public class KeyPressedSensor : AUnitySensor
Constructors
KeyPressedSensor(Event, Dictionary<string, Parameter>, IContext, IContext, IContext)
Declaration
public KeyPressedSensor(Event @event, Dictionary<string, Parameter> parameters, IContext externalContext, IContext scenarioContext, IContext sequenceContext)
Parameters
Fields
Declaration
[EventContextEntry]
public static readonly string KEY
Field Value
Declaration
[ConfigurationParameter("Convert To Layout", "Converts the key to the current layout of the keyboard (can be costly!)", Necessity.Optional, InitialValue = true, Necessity = Necessity.Optional)]
protected bool convertToLayout
Field Value
eventContext
Declaration
protected SimpleDictionary eventContext
Field Value
Declaration
[ConfigurationParameter("Key", Necessity.Optional, Necessity = Necessity.Required)]
protected KeyCode keyCode
Field Value
Declaration
protected uint mvr_keycode
Field Value
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 scenario update. Note that this code will be executed in unity's thread
Declaration
public override ASensor.Result SafeSensorCheck()
Returns
Overrides
Stops 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 SafeStopCheck()
Overrides