class com.babylonhx.actions.ActionEvent
Available on all platforms
... @author Krtolica Vujadin
Class Fields
static function CreateNew(source:AbstractMesh):ActionEvent
Helper function to auto-create an ActionEvent from a source mesh.
source | The source mesh that triggered the event |
evt | {Event} The original (browser) event |
static function CreateNewFromScene(scene:Scene, evt:Dynamic):ActionEvent
Helper function to auto-create an ActionEvent from a scene. If triggered by a mesh use ActionEvent.CreateNew
scene | the scene where the event occurred |
evt | {Event} The original (browser) event |
static function CreateNewFromSprite(source:Sprite, scene:Scene, ?evt:Dynamic, ?additionalData:Dynamic):ActionEvent
Helper function to auto-create an ActionEvent from a source mesh.
source | The source sprite that triggered the event |
scene | Scene associated with the sprite |
evt | {Event} The original (browser) event |
Instance Fields
function new(source:Dynamic, pointerX:Float, pointerY:Float, meshUnderPointer:Dynamic, ?sourceEvent:Dynamic, ?additionalData:Dynamic):Void
@constructor
source | The mesh or sprite that triggered the action. |
pointerX | The X mouse cursor position at the time of the event |
pointerY | The Y mouse cursor position at the time of the event |
meshUnderPointer | The mesh that is currently pointed at (can be null) |
sourceEvent | the original (browser) event that triggered the ActionEvent |