class ActionEvent
ActionEvent is the event beint sent when an action is triggered.
Name | Type | Description | |
---|---|---|---|
source | any | The mesh or sprite that triggered the action. | |
pointerX | number | The X mouse cursor position at the time of the event | |
pointerY | number | The Y mouse cursor position at the time of the event | |
meshUnderPointer | Nullable<AbstractMesh> | The mesh that is currently pointed at (can be null) | |
optional | sourceEvent | any | the original (browser) event that triggered the ActionEvent |
Helper function to auto-create an ActionEvent from a source mesh.
Name | Type | Description | |
---|---|---|---|
source | AbstractMesh | The source mesh that triggered the event | |
optional | evt | Event | {Event} The original (browser) event |
optional | additionalData | any |
Helper function to auto-create an ActionEvent from a source mesh.
Name | Type | Description | |
---|---|---|---|
source | Sprite | The source sprite that triggered the event | |
scene | Scene | Scene associated with the sprite | |
optional | evt | Event | {Event} The original (browser) event |
Helper function to auto-create an ActionEvent from a scene. If triggered by a mesh use ActionEvent.CreateNew
Name | Type | Description | |
---|---|---|---|
scene | Scene | the scene where the event occurred | |
evt | Event | {Event} The original (browser) event |
Name | Type | Description | |
---|---|---|---|
prim | any | ||
pointerPos | Vector2 | ||
optional | evt | Event |