springroll.UserData Class

This class is responsible for saving the user-specific data within an Application. This can be player-progress data, high score information, or other data that needs be saved between sessions of running an app.

Constructor

springroll.UserData

(
  • container
)

Parameters:

  • container Bellhop

    The container instance

Properties

destroy

()

Defined in destroy:121

Destroy and don't use after this

read

(
  • prop
  • callback
)

Defined in read:44

Read a saved setting

Parameters:

  • prop String

    The property name

  • callback Function

    Callback when save completes, returns the value

remove

(
  • prop
  • [callback]
)

Defined in remove:96

Delete a saved setting by name

Parameters:

  • prop String

    The property name

  • [callback] Function optional

    Callback when remove completes

write

(
  • prop
  • value
  • [callback]
)

Defined in write:67

Write a setting

Parameters:

  • prop String

    The property name

  • value

    The property value to save

  • [callback] Function optional

    Callback when write completes

container

Bellhop

Defined in container:21

Reference to the container. If the app is not connected to the Container (running standalone) then the container is set to be null.

Default: null

id

String

Defined in id:31

The name to preprend to each property name, this is set by default as the Application's name, which is required for the Container Client module.

Default: ""