Class: EventCommandSendEvent

EventCommandSendEvent

An event command for sending an event

new EventCommandSendEvent (command)

Name Type Description
command Object Direct JSON command to parse
Properties:
Name Type Description
targetKind number The kind of target
senderNoReceiver boolean Indicate if the sender should not receive event
targetID number The target ID
isSystem boolean Indicate if it is an event system
eventID number The event ID
parameters Array.<SystemParameter> List of all the parameters

Extends

Methods

EventCommandSendEvent.sendEvent (sender, targetKind, targetID, isSystem, eventID, parameters, senderNoReceiver) static

Send an event
Name Type Description
sender MapObject The sender of this event
targetKind number The kind of target
targetID number The target ID
isSystem boolean Boolean indicating if it is an event system
eventID number The event ID
parameters Array.<SystemParameter> List of all the parameters
senderNoReceiver boolean Indicate if the sender should not receive event

EventCommandSendEvent.sendEventDetection (sender, targetID, isSystem, eventID, parameters, senderNoReceiver) static

Send an event
Name Type Description
sender MapObject The sender of this event
targetID number The target ID
isSystem boolean Boolean indicating if it is an event system
eventID number The event ID
parameters Array.<SystemParameter> List of all the parameters
senderNoReceiver boolean Indicate if the sender should not receive event

EventCommandSendEvent.sendEventObjects (objects, sender, targetID, isSystem, eventID, parameters, senderNoReceiver) static

Send an event
Name Type Description
objects Array.<MapObject> The list of objects to send event
sender MapObject The sender of this event
targetID number The target ID
isSystem boolean Boolean indicating if it is an event system
eventID number The event ID
parameters Array.<SystemParameter> List of all the parameters
senderNoReceiver boolean Indicate if the sender should not receive event

update (currentState, object, state)number overrides

Update and check if the event is finished
Name Type Description
currentState Object The current state of the event
object MapObject The current object reacting
state number The state ID
Returns:
Type Description
number The number of node to pass

initialize ()Object inherited overrides

Initialize the current state
Returns:
Type Description
Object The current state

onKeyPressed (currentState, key) inherited overrides

First key press handle for the current stack
Name Type Description
currentState Object The current state of the event
key number The key ID pressed

onKeyReleased (currentState, key) inherited overrides

First key release handle for the current stack
Name Type Description
currentState Object The current state of the event
key number The key ID pressed

onKeyPressedRepeat (currentState, key)boolean inherited overrides

Key pressed repeat handle for the current stack
Name Type Description
currentState Object The current state of the event
key number The key ID pressed
Returns:
Type Description
boolean

onKeyPressedAndRepeat (currentState, key) inherited overrides

Key pressed repeat handle for the current stack, but with a small wait after the first pressure (generally used for menus)
Name Type Description
currentState Object The current state of the event
key number The key ID pressed

drawHUD (currentState) inherited overrides

Draw the HUD
Name Type Description
currentState Object The current state of the event