_internalCancel
()
protected
Cancel the loading of this state
_internalEnter
protected
Exit the state start, called by the State Manager
_internalEnterDone
()
private
Exit the state start, called by the State Manager
_internalEntering
protected
When the state is entering
_internalExit
()
protected
This is called by the State Manager to exit the state
_internalExitStart
()
protected
Exit the state start, called by the State Manager
_onLoaded
private
The internal call for on assets loaded
addTasks
deprecated
protected
Implementation specific for override. When you need to add additional preload
tasks to your state, override this function.
Parameters:
-
tasks
Array
The list of preload tasks
destroy
()
Don't use the state object after this
loadingDone
final
Manual call to signal the end of preloading
loadingStart
()
final
Manual call to signal the start of preloading
nextState
()
final
Goto the next state
onAssetsLoaded
()
deprecated
protected
Implementation specific for override. When all the assets, scaling and panel
setup have completed.
onProgress
private
Handle the load progress and pass to the manager
previousState
()
final
Goto the previous state
_active
Boolean
private
If the manager considers this the active panel
_canceled
Boolean
private
If we canceled entering the state
_destroyed
Boolean
private
If the state has been destroyed.
_enabled
Boolean
private
If the state is enabled, meaning that it is click ready
_isLoading
Boolean
private
If we are pre-loading the state
_nextState
String | Function
private
Either the alias of the next state or a function
to call when going to the next state.
_onEnterProceed
Function
private
When we're finishing loading
_onLoadingComplete
Function
private
If we start doing a load in enter, assign the onEnterComplete here
_prevState
String | Function
private
Either the alias of the previous state or a function
to call when going to the previous state.
active
Boolean
Get if this is the active state
app
Application
Reference to the main app
assets
Array | Object
protected
The collection of assets loaded
cancel
Function
Cancel the load, implementation-specific.
This is where any async actions should be removed.
Default: null
canceled
Boolean
Status of whether the panel load was canceled
config
Object
Reference to the main config object
delayLoad
Int
protected
The number of frames to delay the transition in after loading, to allow the framerate
to stablize after heavy art instantiation.
destroyed
Boolean
If the state has been destroyed.
enabled
Boolean
If the state is enabled, meaning that it is click ready
enter
Function
When the state is entered. Override this to start loading assets - call loadingStart()
to tell the StateManager that that is going on.
Default: null
enterDone
Function
When the state is visually entered fully - after the transition is done.
Override this to begin your state's activities.
Default: null
exit
Function
When the state is exited. Override this to provide state cleanup.
Default: null
exitStart
Function
When the state has requested to be exit, pre-transition. Override this to ensure
that animation/audio is stopped when leaving the state.
Default: null
manifest
Array
deprecated
preload
Array
The assets to load each time
preloaded
Boolean
protected
Check to see if the assets have finished loading
scalingItems
Object
The items to scale on the panel, see ScaleManager.addItems
for
more information. If no options are set in the State's constructor
then it will try to find an object on the app config on scaling
property
matching the same state alias. For instance config.scaling.title
if
title
is the state alias. If no scalingItems are set, will scale
and position the panal itself.
Default: null
stateId
String
The id reference
cancel
Event when the loading of a state was canceled.
destroy
Event when the state is being destroyed.
enabled
Event when the state is enabled status changes. Enable is when the state is mouse enabled or not.
enterDone
Event when the transition is finished the state is fully entered.
exit
Event when the state finishes exiting. Nothing is showing at this point.
exitStart
Event when the state starts exiting, everything is showing at this point.
loaded
Event when the preload of assets is finished. If no assets are loaded, the assets
parameter is null.
loading
Event when the assets are starting to load.
progress
When there has been a change in how much has been preloaded