Events

@:dox(show)keyDown(key:Key):Void

Parameters:

key

The key being pressed

Events:

keyDown

Triggered when a key from the keyboard is being pressed.

@:dox(show)keyUp(key:Key):Void

Parameters:

key

The key being released

Events:

keyUp

Triggered when a key from the keyboard is being released.

@:dox(show)gamepadAxis(gamepadId:Int, axis:GamepadAxis, value:Float):Void

@:dox(show)gamepadDown(gamepadId:Int, button:GamepadButton):Void

@:dox(show)gamepadUp(gamepadId:Int, button:GamepadButton):Void

@:dox(show)gamepadGyro(gamepadId:Int, dx:Float, dy:Float, dz:Float):Void

@:dox(show)gamepadEnable(gamepadId:Int, name:String):Void

@:dox(show)gamepadDisable(gamepadId:Int):Void

Variables

Methods

inlinekeyPressed(keyCode:KeyCode):Bool

inlinekeyPressed(keyCode:KeyCode, owner:Entity):Bool

inlinekeyJustPressed(keyCode:KeyCode):Bool

inlinekeyJustPressed(keyCode:KeyCode, owner:Entity):Bool

inlinekeyJustReleased(keyCode:KeyCode):Bool

inlinekeyJustReleased(keyCode:KeyCode, owner:Entity):Bool

inlinescanPressed(scanCode:ScanCode):Bool

inlinescanPressed(scanCode:ScanCode, owner:Entity):Bool

inlinescanJustPressed(scanCode:ScanCode):Bool

inlinescanJustPressed(scanCode:ScanCode, owner:Entity):Bool

inlinescanJustReleased(scanCode:ScanCode):Bool

inlinescanJustReleased(scanCode:ScanCode, owner:Entity):Bool

inlinegamepadPressed(gamepadId:Int, button:GamepadButton):Bool

inlinegamepadPressed(gamepadId:Int, button:GamepadButton, owner:Entity):Bool

inlinegamepadJustPressed(gamepadId:Int, button:GamepadButton):Bool

inlinegamepadJustPressed(gamepadId:Int, button:GamepadButton, owner:Entity):Bool

inlinegamepadJustReleased(gamepadId:Int, button:GamepadButton):Bool

inlinegamepadJustReleased(gamepadId:Int, button:GamepadButton, owner:Entity):Bool

startGamepadRumble(gamepadId:Int, duration:Float, lowFrequency:Float, highFrequency:Float):Void

Starts a controller rumble.

Parameters:

gamepadId

The id of the gamepad getting rumble

duration

The duration, in seconds

lowFrequency

Low frequency: value between 0 and 1

highFrequency

High frequency: value between 0 and 1

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

destroy():Void

Destroy this entity. This method is automatically protected from duplicate calls. That means calling multiple times an entity's destroy() method will run the destroy code only one time. As soon as destroy() is called, the entity is marked destroyed=true, even when calling destroy() method on a subclass (a macro is inserting a code to mark the object as destroyed at the beginning of every destroy() override function.

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