Kiwi.StateConfig Class
A lightweight object that contains values relating to the configuration of a State in a Kiwi Game.
Constructor
Kiwi.StateConfig
-
parent
-
name
Parameters:
-
parent
Kiwi.StateThe State that this configuration object belongs to.
-
name
StringThe name of the state which was created.
Returns:
Item Index
Properties
- _state
- createParams
- hasPreloader deprecated
- initParams
- isCreated
- isInitialised
- isPersistent deprecated
- isReady
- name
- preloadParams
- runCount
Methods
objType
()
String
public
The type of object that this is.
Returns:
"StateConfig"
reset
()
public
Resets the properties contained on this StateConfig object. This is executed when a State is about to be destroyed as so reset's it to be switched to again.
Properties
createParams
Array
public
Stores any parameters that are to be passed to the create method when the State that this config is on is switched to.
hasPreloader
Boolean
deprecated
public
If the State that this config is on contains a Preloader Method.
Deprecated as of 1.3.0 of Kiwi as it is not currently in use.
Default: false
initParams
Array
public
Stores any parameters that are to be passed to the init method when the State that this config is on is switched to.
isCreated
Boolean
public
If this State has been created (the create method has been executed). Essentually has the same meaning as 'isReady'.
Default: false
isInitialised
Boolean
public
If the State has been initialised already (so the Boot and Init methods have been executed already). A State only get Initialised once which is when it switched to for this first time.
Default: false
isPersistent
Boolean
deprecated
public
Not used. Deprecated as of version 1.3.0
Default: false
isReady
Boolean
public
If the State that this config is on is 'ready' to be used (e.g. all the assets have been loaded and libraries complied) or if it isn't and so it is still at the 'loading' stage.
Default: false
name
String
public
The name of the State, must be unique within your game.
preloadParams
Array
public
Stores any parameters that are to be passed to the preload method when the State that this config is on is switched to.
runCount
Number
public
The number of times the State that this config belongs to has been active/used.
Default: 0