Skip to content

Entity Common Functions

Common.startFadeIn()

Initiates the universal "fade from white" animation using an HsbcColorFilter. The animation will last 15 frames before reaching the object's natural color scheme.

Kind: global function

Common.startFadeOut()

Initiates the universal "fade to white" animation using an HsbcColorFilter. The animation will last 15 frames before reaching absolute white.

Kind: global function

Common.fadeInComplete()

Checks the current status of the fade in animation. If the animation has completed, it will return true.

Kind: global function

Common.fadeOutComplete()

Checks the current status of the fade out animation. If the animation has completed, it will return true.

Kind: global function

Common.initLocalStateMachine()

Sets up the local state machine for usage.

Kind: global function

Common.registerLocalState(state, animation)

Registers a state value to correspond to a specific animation

Kind: global function

ParamDescription
stateThe integer to represent a local state.
animationThe animation associated with the local state

Common.getLocalState()

Retrieves the current local state value

Kind: global function

Common.inLocalState()

Checks if the current local state is equal to the provided state.

Kind: global function

Common.toLocalState(state)

Transition the state machine to the provided state value {};

Kind: global function

ParamDescription
stateState to transition to

Common.setLocalState(state)

Forcefully sets the local state to the specified value without an animation change.

Kind: global function

ParamDescription
stateState to assign

Common.repositionToEntityEcb(entity, x, y)

Repositions self relative to the specified entity with the provided x and y offset.

Kind: global function

ParamDescription
entityThe Entity to be placed on top of.
xHow many pixels to offset self relative to the entity horizontally.
yHow many pixels to offset self relative to the entity vertically.