Storage

Module: engine.storage

Local storage manager. Instance automatically created at game.storage, when Storage.id is defined

new game.Storage([id])

Parameters:

  • id String (optional)

Properties

id String

(No description yet)

supported Boolean

Is local storage supported.

Methods

_decode()

(No description yet)

_encode()

(No description yet)

_isSupported()

(No description yet)

clear()

Clear storage. This removes ALL keys.

get(key, [defaultValue]) *

Get value from storage.

Parameters:

  • key String
  • defaultValue * (optional)

value

has(key) Boolean

Check if a key exists in storage.

Parameters:

  • key String
remove(key)

Remove key from storage.

Parameters:

  • key String
set(key, value) *

Set value to storage.

Parameters:

  • key String
  • value *

value

Attributes

id String

(No description yet)