Events

@:dox(show)collideBody(visual:Visual, body:Body):Void

Dispatched when this visual body collides with another body.

@:dox(show)overlapBody(visual:Visual, body:Body):Void

Dispatched when this visual body overlaps with another body.

@:dox(show)collide(visual1:Visual, visual2:Visual):Void

Dispatched when this visual body collides with another visual's body.

@:dox(show)overlap(visual1:Visual, visual2:Visual):Void

Dispatched when this visual body overlaps with another visual's body.

@:dox(show)worldBounds(visual:Visual, up:Bool, down:Bool, left:Bool, right:Bool):Void

Dispatched when this visual body collides with the world bounds.

Static methods

Constructor

new()

Variables

@:value(null)visual:Visual = null

@:value(null)read onlybody:Body = null

@:value(null)world:ArcadeWorld = null

@:value(0)offsetX:Float = 0

@:value(0)offsetY:Float = 0

Methods

initBody(x:Float, y:Float, width:Float, height:Float, rotation:Float):Void

Inherited Events

Defined by Entity

@:dox(show)dispose(entity:Entity):Void

@:dox(show)destroy(entity:Entity):Void

Inherited Variables

Defined by Entity

read onlyhasData:Bool

@:value(null)id:String = null

read onlydestroyed:Bool

read onlydisposed:Bool

@:value(null)read onlyautoruns:Array<Autorun> = null

@editablecomponents:ReadOnlyMap<String, Component>

Public components mapping. Contain components created separately with component() or macro-based components as well.

scriptContent:ScriptContent

Available with script plugin

script:Script

Available with script plugin

Inherited Methods

Defined by Entity

dispose():Void

Schedules destroy, at the end of the current frame.

unbindEvents():Void

Remove all events handlers from this entity.

autorun(run:() ‑> Void, ?afterRun:() ‑> Void):Autorun

Creates a new Autorun instance with the given callback associated with the current entity.

Parameters:

run

The run callback

Returns:

The autorun instance

tween(?easing:Easing, duration:Float, fromValue:Float, toValue:Float, update:(Float, Float) ‑> Void):Tween

component<C>(?name:String, ?component:Null<C>):C