Class l2df.class.component.physix
Physics component.
Inherited from l2df.class.Component class.
Info:
- Copyright: Atom-TM 2020
- Author: Abelidze, Kasai
Functions
Physix:added(obj[, kwargs]) | Component was added to Entity event. |
Physix:update(obj, dt) | Physics update event handler. |
Functions
Methods- Physix:added(obj[, kwargs])
-
Component was added to Entity event.
Parameters:
- obj l2df.class.entity Entity's instance.
-
kwargs
table
Keyword arguments.
- facing number Entity's X orientation (not whole axis). Can be 1 or -1 (mirrored).. Used for mirroring rendered content. Doesn't apply if entity already has facing setted. (default 1)
- gravity boolean True if entity uses gravity acceleration, false otherwise. (default false)
- static boolean Disables physics simulation if set to true. (default false)
- solid boolean Makes object solid. Solid objects collide with each other. (default true)
- Physix:update(obj, dt)
-
Physics update event handler.
Parameters:
- obj l2df.class.entity Entity's instance.
- dt number Delta-time since last game tick.