Class: EventCommandChangeState

EventCommandChangeState

An event command for changing an object state

new EventCommandChangeState (command)

Name Type Description
command Object Direct JSON command to parse
Properties:
Name Type Description
mapID SystemValue The map ID value
objectID SystemValue The object ID value
idState number The ID of the state to change
operationKind number Index of operation

Extends

Methods

EventCommandChangeState.addState (portionDatas, index, state) static

Add a state to an object
Name Type Description
portionDatas Object Datas inside a portion
index number Index in the portion datas
state number ID of the state

EventCommandChangeState.removeState (portionDatas, index, state) static

Remove a state from an object
Name Type Description
portionDatas Object Datas inside a portion
index number Index in the portion datas
state number ID of the state

EventCommandChangeState.removeAll (portionDatas, index, state) static

Remove all the states from an object
Name Type Description
portionDatas Object Datas inside a portion
index number Index in the portion datas
state number ID of the state

EventCommandChangeState.removeFromDatas (portionDatas, index, state) static

Remove states from datas
Name Type Description
portionDatas Object Datas inside a portion
index number Index in the portion datas
state number ID of the state

EventCommandChangeState.addStateSpecial (states, state) static

Add state in ID's list
Name Type Description
states Array.<number> The states IDs
state number ID of the state

EventCommandChangeState.removeStateSpecial (states, state) static

Remove state in ID's list
Name Type Description
states Array.<number> The states IDs
state number ID of the state

initialize ()Object overrides

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

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

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