SavestateReaderWriterJson
class
SavestateReaderWriterJson : ISavestateWriter, ISavestateReader
Example implementation of the Savestate-related interfaces, saving and loading values using Json encoding. Feel free to use this class, but be aware that it is not tested much. For production, a more sophisticated class, perhaps using a dedicated Json library, is recommended.
Methods
SavestateReaderWriterJson(string path)
(Constructor)
void PreLoad()
void PostLoad()
bool GetBool(string key)
T[] GetComposed< T >(string key)
T[] GetComposed< T >(string key, string delimiter)
float GetFloat(string key)
int GetInt(string key)
string GetString(string key)
bool HasKey(string key)
void PreSave()
void PostSave()
void SetBool(string key, bool value)
void SetComposed(string key, params object[] objs)
void SetComposed(string key, string delimiter, params object[] objs)
void SetFloat(string key, float value)
void SetInt(string key, int value)
void SetString(string key, string value)