FlixelActionSets
View sourceclass
org.flixelgdx.input.action.FlixelActionSets
Global registry of FlixelActionSet instances. FlixelGame invokes FlixelActionSets.update(float) and FlixelActionSets.endFrameAll() so every registered set stays on the same contract as FlixelInputManager (keys, mouse, gamepads).
When updateAll runs
Order inside FlixelGame.update(float): Flixel.keys.update(), Flixel.mouse.update(), Flixel.gamepads.update(), then FlixelActionSets.update(float). Gameplay code in FlixelState runs after that, so jump.justPressed() reflects this frame's input.
When endFrameAll runs
After FlixelGame.draw and the input managers' endFrame() calls, FlixelActionSets.endFrameAll() copies digital and analog edge state for the next frame.
Registration
FlixelActionSet registers in its constructor unless you use FlixelActionSet.FlixelActionSet(...) with false (tests). Call FlixelActionSet.destroy() to unregister. Avoid registering or destroying sets from inside another set's FlixelActionSet.update(float) unless you know the iteration order is safe.
Methods
update(float)
Invoked from FlixelGame.update(float) after gamepad polling.
Parameters:
| Name | Description |
|---|---|
elapsed | Seconds since last frame (same as game update). |
endFrameAll()
Invoked from FlixelGame.render() after keys, mouse, and gamepads endFrame().
registeredCountForTests()
For tests: number of registered sets.
clearRegistryForTests()
For tests: clear registry without calling destroy on sets.