Events

@:dox(show)update(delta:Float):Void

When this event is fired, it's the right time to make your bodies collide/overlap

Parameters:

null

delta

Constructor

new()

Variables

@:value([])read onlyitems:Array<VisualArcadePhysics> = []

@:value([])read onlyworlds:Array<ArcadeWorld> = []

All worlds used with arcade physics

@:value(null)world:ArcadeWorld = null

Default world used for arcade physics

@:value(new Map())groups:Map<String, Group> = new Map()

Groups by id

@:value(true)autoUpdateWorldBounds:Bool = true

If true, default world (world) bounds will be updated automatically to match screen size.

Methods

@:value({ autoAdd : true })createWorld(autoAdd:Bool = true):ArcadeWorld

Inherited Events

Defined by System

@:dox(show)beginEarlyUpdate(delta:Float):Void

@:dox(show)endEarlyUpdate(delta:Float):Void

@:dox(show)beginLateUpdate(delta:Float):Void

@:dox(show)endLateUpdate(delta:Float):Void

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

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

Inherited Variables

Defined by System

@:value(null)name:String = null

System name. Useful to retrieve a system afterwards

@:value(true)autoUpdate:Bool = true

When set to true (default). This system will be updated automatically. If false, you'll need to call earlyUpdate() and lateUpdate() manually.

@:value(0)earlyUpdateOrder:Float = 0

Order of earlyUpdate execution. Given two systems, a system with a lower earlyUpdateOrder value will have it's earlyUpdate() method called before another system's earlyUpdate() method with a higher order value.

@:value(0)lateUpdateOrder:Float = 0

Order of lateUpdate execution. Given two systems, a system with a lower lateUpdateOrder value will have it's lateUpdate() method called before another system's lateUpdate() method with a higher order value.

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 System

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