Class InputMonitor<T, K>
Abstract class providing basic input monitoring functionality
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Ladybug.UserInput
Assembly: ladybug.dll
Syntax
public abstract class InputMonitor<T, K>
Type Parameters
Name | Description |
---|---|
T | Input State type |
K | Button/Key type |
Fields
| Improve this Doc View SourcecurrentState
Current input state
Declaration
protected T currentState
Field Value
Type | Description |
---|---|
T |
previousState
Previous input state
Declaration
protected T previousState
Field Value
Type | Description |
---|---|
T |
Properties
| Improve this Doc View SourceUpdateActive
Whether the input monitor is currently being updated
Declaration
public bool UpdateActive { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceBeginUpdate(T)
Begins the input monitor update process
Declaration
public void BeginUpdate(T newState)
Parameters
Type | Name | Description |
---|---|---|
T | newState |
CheckAllButtons(K[], InputState)
Checks if all of the given keys are in the given input state
Declaration
public bool CheckAllButtons(K[] keys, InputState state)
Parameters
Type | Name | Description |
---|---|---|
K[] | keys | |
InputState | state |
Returns
Type | Description |
---|---|
System.Boolean |
CheckAnyButton(K[], InputState)
Checks if any of the given keys are in the given input state
Declaration
public bool CheckAnyButton(K[] keys, InputState state)
Parameters
Type | Name | Description |
---|---|---|
K[] | keys | |
InputState | state |
Returns
Type | Description |
---|---|
System.Boolean |
CheckButton(K, InputState)
Checks if a given key is in the given input state
Declaration
public bool CheckButton(K button, InputState state)
Parameters
Type | Name | Description |
---|---|---|
K | button | |
InputState | state |
Returns
Type | Description |
---|---|
System.Boolean |
EndUpdate()
Completes the input monitor update process
Declaration
public void EndUpdate()
GetInputState(K)
Gets the input state of a given key
Declaration
public abstract InputState GetInputState(K key)
Parameters
Type | Name | Description |
---|---|---|
K | key |
Returns
Type | Description |
---|---|
InputState |