API Docs for: 1.4.0
Show:

Kiwi.StateConfig Class

Module: Kiwi

A lightweight object that contains values relating to the configuration of a State in a Kiwi Game.

Constructor

Kiwi.StateConfig

(
  • parent
  • name
)
Kiwi.StateConfig

Parameters:

  • parent Kiwi.State

    The State that this configuration object belongs to.

  • name String

    The name of the state which was created.

Returns:

Methods

objType

() String public

The type of object that this is.

Returns:

String:

"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

_state

Kiwi.State private

The state this StateConfig belongs to.

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

Defined in src\core\StateConfig.ts:102

Available since 1.3.0

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

Defined in src\core\StateConfig.ts:60

Available since 1.3.0

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

Defined in src\core\StateConfig.ts:155

Available since 1.3.0

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