Class l2df.class.component.controller
Controller component.
Inherited from l2df.class.Component class.
Info:
- Copyright: Atom-TM 2020
- Author: Abelidze
Functions
Controller:added(obj, player) | Component was added to Entity event. |
Controller:removed(obj) | Component was removed from Entity event. |
Controller:pressed(obj, button) | Check if button was pressed. |
Controller:doubled(obj, button) | Check if button was double pressed. |
Controller:hitted(obj, button) | Check if button was pressed at current frame. |
Controller:keysCheck() | Process the keys and combos. |
Functions
Methods- Controller:added(obj, player)
-
Component was added to Entity event.
Adds
"controller"
key to the Entity.C table.Parameters:
- obj l2df.class.entity Entity's instance.
- player number ID of the player attached to that controller.
Returns:
-
boolean
- Controller:removed(obj)
-
Component was removed from Entity event.
Removes
"controller"
key from Entity.C table.Parameters:
- obj l2df.class.entity Entity's instance.
- Controller:pressed(obj, button)
-
Check if button was pressed.
Parameters:
- obj l2df.class.entity Entity's instance.
- button string Pressed button.
Returns:
-
boolean
- Controller:doubled(obj, button)
-
Check if button was double pressed.
Parameters:
- obj l2df.class.entity Entity's instance.
- button string Double pressed button.
Returns:
-
boolean
- Controller:hitted(obj, button)
-
Check if button was pressed at current frame.
Parameters:
- obj l2df.class.entity Entity's instance.
- button string Hitted button.
Returns:
-
boolean
- Controller:keysCheck()
- Process the keys and combos.