Entity

Constructors

this
this()

Members

Functions

addTag
void addTag(int tag)
attach
void attach(Collider2D collider)
attach
void attach(Audio source)
draw
void draw(RenderTarget renderTarget, Matrix transform)

Called every draw tick (skipped if update loop is behind)

getLocalTransformMatrix
Matrix getLocalTransformMatrix()
hasTag
bool hasTag(int tag)
onCollision2D
void onCollision2D(Collider2D collider, Collider2D other)
onCollisionEnter2D
void onCollisionEnter2D(Collider2D collider, Collider2D other)
onCollisionExit2D
void onCollisionExit2D(Collider2D collider, Collider2D other)
remove
void remove(Collider2D collider)
remove
void remove(Audio source)
removeTag
void removeTag(int tag)
setup
void setup()

Called when first attached to a scene

start
void start()

Called when attached to a scene

update
void update()

Called every update tick

Properties

game
Game game [@property getter]

Shortcut for scene.game

input
Input input [@property getter]

Shortcut for scene.game.input

scene
Scene scene [@property getter]

Variables

_scene
Scene _scene;
Undocumented in source.
audioSources
LinkedList!(Audio) audioSources;
Undocumented in source.
colliders2d
LinkedList!(Collider2D) colliders2d;
Undocumented in source.
friction
float friction;

Velocity is multiplied by (1 - friction) every tick

isSetup
bool isSetup;
Undocumented in source.
position
Vector3 position;
rotation
Quaternion rotation;
scale
Vector3 scale;
velocity
Vector3 velocity;

Meta