Class l2df.class.component.controller

Last updated 2021-05-28 15:24:22

Controller component.

Inherited from l2df.class.Component class.

Info:

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:

Controller:pressed(obj, button)
Check if button was pressed.

Parameters:

Returns:

    boolean
Controller:doubled(obj, button)
Check if button was double pressed.

Parameters:

Returns:

    boolean
Controller:hitted(obj, button)
Check if button was pressed at current frame.

Parameters:

Returns:

    boolean
Controller:keysCheck()
Process the keys and combos.