Class InputStateMachine
Manages input state transitions and delegates events to the current state.
public class InputStateMachine
- Inheritance
-
InputStateMachine
- Inherited Members
Constructors
InputStateMachine(InputStateContext)
public InputStateMachine(InputStateContext context)
Parameters
contextInputStateContext
Properties
Context
Gets the context shared across all states.
public InputStateContext Context { get; }
Property Value
CurrentStateName
Gets the current state name for debugging.
public string CurrentStateName { get; }
Property Value
Methods
HandleKeyDown(KeyEventArgs)
public bool HandleKeyDown(KeyEventArgs e)
Parameters
eKeyEventArgs
Returns
HandlePointerMoved(PointerEventArgs)
public bool HandlePointerMoved(PointerEventArgs e)
Parameters
ePointerEventArgs
Returns
HandlePointerPressed(PointerPressedEventArgs, Control?)
public bool HandlePointerPressed(PointerPressedEventArgs e, Control? source)
Parameters
ePointerPressedEventArgssourceControl
Returns
HandlePointerReleased(PointerReleasedEventArgs)
public bool HandlePointerReleased(PointerReleasedEventArgs e)
Parameters
ePointerReleasedEventArgs
Returns
HandlePointerWheel(PointerWheelEventArgs)
public bool HandlePointerWheel(PointerWheelEventArgs e)
Parameters
ePointerWheelEventArgs
Returns
Reset()
Forces a return to the idle state.
public void Reset()
TransitionTo(IInputState)
Transitions to a new state.
public void TransitionTo(IInputState newState)
Parameters
newStateIInputState
Update(double)
public void Update(double deltaTime)
Parameters
deltaTimedouble