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.
Common.startFadeOut()
Initiates the universal "fade to white" animation using an HsbcColorFilter. The animation will last 15 frames before reaching absolute white.
Common.fadeInComplete()
Checks the current status of the fade in animation. If the animation has completed, it will return true.
Common.fadeOutComplete()
Checks the current status of the fade out animation. If the animation has completed, it will return true.
Common.initLocalStateMachine()
Sets up the local state machine for usage.
Common.registerLocalState(state, animation)
Registers a state value to correspond to a specific animation
Kind: global function
Param | Description |
---|---|
state | The integer to represent a local state. |
animation | The animation associated with the local state |
Common.getLocalState()
Retrieves the current local state value
Common.inLocalState()
Checks if the current local state is equal to the provided state.
Common.toLocalState(state)
Transition the state machine to the provided state value {};
Kind: global function
Param | Description |
---|---|
state | State to transition to |
Common.setLocalState(state)
Forcefully sets the local state to the specified value without an animation change.
Kind: global function
Param | Description |
---|---|
state | State to assign |
Common.repositionToEntityEcb(entity, x, y)
Repositions self relative to the specified entity with the provided x and y offset.
Kind: global function
Param | Description |
---|---|
entity | The Entity to be placed on top of. |
x | How many pixels to offset self relative to the entity horizontally. |
y | How many pixels to offset self relative to the entity vertically. |