Save provides simple interface to save and load serialized user data.
Data is serialized to String with haxe.Serializer
and then stored in text form.
Static methods
staticdynamicdelete(name:String = "save"):Void
Deletes save with specified name. Override this method when using custom save lookup.
staticload<T>(?defValue:T, name:String = "save", checkSum:Bool = false):T
Loads save with specified name. Returns defValue
if save does not exists or could not be unserialized.
Parameters:
defValue | Fallback default save value |
---|---|
name | Name of the save |
checkSum | Set to true if data expected to have crc checksum prepending the data. Should be set for entries saved with |
staticsave(val:Dynamic, name:String = "save", checkSum:Bool = false):Bool
Saves val
under the specified name.
Parameters:
checkSum | When set, save data is prepended by salted crc checksum for data validation. When save is loaded, |
---|