API Docs for: 1.13.1
Show:

game.Storage Class

Extends game.Class
Defined in: engine/storage.js:11
Module: storage

Local storage.

Item Index

Attributes

Methods

extend

(
  • prop
)
game.Class

Inherited from game.Class: engine/core.js:757

Extend class.

Parameters:

  • prop Object

Returns:

get

(
  • key
  • [defaultValue]
)

Get key from local storage.

Parameters:

  • key String
  • [defaultValue] optional

Returns:

:

value

has

(
  • key
)
Boolean

Check if a key is in local storage.

Parameters:

  • key String

Returns:

Boolean:

init

(
  • arguments
)

Inherited from game.Class: engine/core.js:811

This method is called, when you create new instance of the class.

Parameters:

  • arguments Array

inject

(
  • prop
)

Inherited from game.Class: engine/core.js:825

Inject class.

Parameters:

  • prop Object

remove

(
  • key
)

Remove key from local storage.

Parameters:

  • key String

reset

()

Reset local storage. This removes ALL keys.

set

(
  • key
  • value
)

Set value to local storage.

Parameters:

  • key String
  • value

staticInit

(
  • arguments
)

Inherited from game.Class: engine/core.js:795

This method is called before init.

Parameters:

  • arguments Array

Attributes

id

String