Class: StorageManager

StorageManager()

new StorageManager()

The static class that manages storage for saving game data.

Methods

(static) backup(savefileId)

Parameters:
Name Type Description
savefileId Number

(static) backupExists(savefileId) → {Boolean}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
Boolean

(static) cleanBackup(savefileId) → {Boolean}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
Boolean

(static) exists(savefileId) → {Boolean}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
Boolean

(static) isLocalMode() → {Boolean}

Returns:
Type
Boolean

(static) load(savefileId) → {String}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
String

(static) loadFromLocalBackupFile(savefileId) → {String}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
String

(static) loadFromLocalFile(savefileId) → {String}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
String

(static) loadFromWebStorage(savefileId) → {String}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
String

(static) loadFromWebStorageBackup(savefileId) → {String}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
String

(static) localFileBackupExists(savefileId) → {Boolean}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
Boolean

(static) localFileDirectoryPath() → {String}

Returns:
Type
String

(static) localFileExists(savefileId) → {Boolean}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
Boolean

(static) localFilePath(savefileId) → {String}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
String

(static) remove(savefileId)

Parameters:
Name Type Description
savefileId Number

(static) removeLocalFile(savefileId)

Parameters:
Name Type Description
savefileId Number

(static) removeWebStorage(savefileId)

Parameters:
Name Type Description
savefileId Number

(static) restoreBackup(savefileId)

Parameters:
Name Type Description
savefileId Number

(static) save(savefileId, json)

Parameters:
Name Type Description
savefileId Number
json String

(static) saveToLocalFile(savefileId, json)

Parameters:
Name Type Description
savefileId Number
json String

(static) saveToWebStorage(savefileId, json)

Parameters:
Name Type Description
savefileId Number
json String

(static) webStorageBackupExists(savefileId) → {Boolean}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
Boolean

(static) webStorageExists(savefileId) → {Boolean}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
Boolean

(static) webStorageKey(savefileId) → {String}

Parameters:
Name Type Description
savefileId Number
Returns:
Type
String