Renderable Component

Component for any entity that has a position on the stage.

Events

Invalidate
when the entity needs to be redrawn

Properties

Methods

Back to top

.alpha

Transparency of an entity. Must be a decimal value between 0.0 being fully transparent to 1.0 being fully opaque.

Back to top

.visible

If the entity is visible or not. Accepts a true or false value. Can be used for optimization by setting an entities visibility to false when not needed to be drawn.

The entity will still exist and can be collided with but just won't be drawn.

Back to top

.flip()

Events

Invalidate
when the entity has flipped
public this .flip(String dir)
dir

Flip direction

Flip entity on passed direction

Example

this.flip("X")
Back to top

.unflip()

Events

Invalidate
when the entity has unflipped
public this .unflip(String dir)
dir

Unflip direction

Unflip entity on passed direction (if it's flipped)

Example

this.unflip("X")