A new SimulatedEvent type allows to describe a Key event
A new Handler.EmitEvent method sends simulated event to the system
If event is emitted on every frame, ActionIsPressed will always be true, while ActionIsJustPressed will trigger only for the first frame.
The current implementation tries to make virtual input/events almost identical to the physical inputs. So, if key is "pressed" by the virtual input, it can't be released or pressed again by the physical input. In practice, it also means that if ActionIsJustPressed reports true for the virtual input, it will not report true for the physical input unless the virtual events stopped and the key is considered to be in unpressed state.
This is an experimental API.
I haven't tested it in any of my games.
SimulatedEvent
type allows to describe aKey
eventHandler.EmitEvent
method sends simulated event to the systemIf event is emitted on every frame,
ActionIsPressed
will always be true, whileActionIsJustPressed
will trigger only for the first frame.The current implementation tries to make virtual input/events almost identical to the physical inputs. So, if key is "pressed" by the virtual input, it can't be released or pressed again by the physical input. In practice, it also means that if
ActionIsJustPressed
reportstrue
for the virtual input, it will not reporttrue
for the physical input unless the virtual events stopped and the key is considered to be in unpressed state.This is an experimental API. I haven't tested it in any of my games.
Refs #3