Class l2df.class.component.camera

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

Component for tracking objects by main camera.

Inherited from l2df.class.Component class.

Info:

Functions

Camera:added(obj[, kwargs]) Component was added to Entity event.
Camera:removed(obj) Component was removed from Entity event.
Camera:postupdate(obj, dt, islast) Camera post-update event handler.


Functions

Methods
Camera:added(obj[, kwargs])
Component was added to Entity event. Adds "camera" key to the Entity.C table.

Parameters:

  • obj l2df.class.entity Entity's instance.
  • kwargs table Keyword arguments.
    • priority number Priority of the object this camera was attached to. (default 1)
    • kx number Width of the following camera window. (default 0)
    • ky number Height of the following camera window. (default 0)
Camera:removed(obj)
Component was removed from Entity event. Removes "camera" key from Entity.C table.

Parameters:

Camera:postupdate(obj, dt, islast)
Camera post-update event handler.

Parameters:

  • obj l2df.class.entity Entity's instance.
  • dt number Delta-time since last game tick.
  • islast boolean Accepts only updates for the last drawn frame.