class
Rosegold::MovementKeys
- Rosegold::MovementKeys
- Reference
- Object
Defined in:
rosegold/control/movement_keys.crConstructors
-
.new(writable : -> Bool | Nil = nil)
Decides whether script writes apply; nil allows all.
Instance Method Summary
-
#backward?
Whether backward is currently pressed.
-
#forward?
Whether forward is currently pressed.
-
#left?
Whether left strafe is currently pressed.
-
#none?
Whether no directional keys are currently pressed.
-
#press(*keys : Key)
Marks each supplied directional key as pressed.
-
#pressed?(keys : Key) : Bool
Whether every flag in keys is currently pressed.
-
#release(*keys : Key)
Clears each supplied directional key while retaining the others.
-
#release_all
Clears every directional key.
-
#replace(value : Key) : Nil
Replaces the pressed keys for the physics engine and the manual owner, bypassing the script gate.
-
#right?
Whether right strafe is currently pressed.
-
#state : Key
The currently pressed directional keys.
-
#state=(value : Key)
Sets the pressed keys.
Constructor Detail
Decides whether script writes apply; nil allows all. For the physics keys,
the script-facing mutators below follow ManualControl#script_write_allowed?:
ignored while a controller holds input, and waiting for a pending release.
Instance Method Detail
Clears each supplied directional key while retaining the others.
Replaces the pressed keys for the physics engine and the manual owner, bypassing the script gate.
Sets the pressed keys. Ignored while a manual controller owns input.