Loading...
Searching...
No Matches
PixelCrushers.DiskSavedGameDataStorer Class Reference

Implements SavedGameDataStorer using local disk files. More...

Inheritance diagram for PixelCrushers.DiskSavedGameDataStorer:
Collaboration diagram for PixelCrushers.DiskSavedGameDataStorer:

Classes

class  SavedGameInfo
 

Public Types

enum  BasePath { PersistentDataPath , DataPath , Custom }
 

Public Member Functions

virtual void Start ()
 
virtual string GetSaveGameFilename (int slotNumber)
 
virtual string GetSavedGameInfoFilename ()
 
virtual void LoadSavedGameInfoFromFile ()
 
virtual void UpdateSavedGameInfoToFile (int slotNumber, SavedGameData savedGameData)
 
override bool HasDataInSlot (int slotNumber)
 
override void StoreSavedGameData (int slotNumber, SavedGameData savedGameData)
 
override SavedGameData RetrieveSavedGameData (int slotNumber)
 
override void DeleteSavedGameData (int slotNumber)
 
- Public Member Functions inherited from PixelCrushers.SavedGameDataStorer
bool HasDataInSlot (int slotNumber)
 Return true if the specified slot contains a saved game.
 
void StoreSavedGameData (int slotNumber, SavedGameData savedGameData)
 Store saved game data in the specified slot.
 
SavedGameData RetrieveSavedGameData (int slotNumber)
 Retrieve saved game data from the specified slot, or null if no saved game in the slot.
 
void DeleteSavedGameData (int slotNumber)
 Delete the saved game from the specified slot if present.
 
virtual IEnumerator StoreSavedGameDataAsync (int slotNumber, SavedGameData savedGameData)
 Asynchronously store the saved game data in the specified slot.
 

Static Public Member Functions

static void WriteStringToFile (string filename, string data)
 
static string ReadStringFromFile (string filename)
 

Public Attributes

BasePath storeSaveFilesIn = BasePath.PersistentDataPath
 
string customPath
 
bool encrypt = true
 
string encryptionPassword = "My Password"
 

Protected Member Functions

virtual string GetBasePath ()
 
virtual bool VerifySavedGameInfoFile (string saveInfoFilename)
 
virtual void WriteSavedGameInfoToDisk ()
 

Protected Attributes

List< SavedGameInfom_savedGameInfo = null
 

Properties

List< SavedGameInfosavedGameInfo [get]
 
bool debug [get, set]
 
- Properties inherited from PixelCrushers.SavedGameDataStorer
virtual float progress [get, protected set]
 Return the current progress (0-1) of the current async save operation.
 

Detailed Description

Implements SavedGameDataStorer using local disk files.

Member Enumeration Documentation

◆ BasePath

Enumerator
PersistentDataPath 
DataPath 
Custom 

Member Function Documentation

◆ DeleteSavedGameData()

override void PixelCrushers.DiskSavedGameDataStorer.DeleteSavedGameData ( int  slotNumber)
inline

◆ GetBasePath()

virtual string PixelCrushers.DiskSavedGameDataStorer.GetBasePath ( )
inlineprotectedvirtual

◆ GetSavedGameInfoFilename()

virtual string PixelCrushers.DiskSavedGameDataStorer.GetSavedGameInfoFilename ( )
inlinevirtual

◆ GetSaveGameFilename()

virtual string PixelCrushers.DiskSavedGameDataStorer.GetSaveGameFilename ( int  slotNumber)
inlinevirtual

◆ HasDataInSlot()

override bool PixelCrushers.DiskSavedGameDataStorer.HasDataInSlot ( int  slotNumber)
inline

◆ LoadSavedGameInfoFromFile()

virtual void PixelCrushers.DiskSavedGameDataStorer.LoadSavedGameInfoFromFile ( )
inlinevirtual

◆ ReadStringFromFile()

static string PixelCrushers.DiskSavedGameDataStorer.ReadStringFromFile ( string  filename)
inlinestatic

◆ RetrieveSavedGameData()

override SavedGameData PixelCrushers.DiskSavedGameDataStorer.RetrieveSavedGameData ( int  slotNumber)
inline

◆ Start()

virtual void PixelCrushers.DiskSavedGameDataStorer.Start ( )
inlinevirtual

◆ StoreSavedGameData()

override void PixelCrushers.DiskSavedGameDataStorer.StoreSavedGameData ( int  slotNumber,
SavedGameData  savedGameData 
)
inline

◆ UpdateSavedGameInfoToFile()

virtual void PixelCrushers.DiskSavedGameDataStorer.UpdateSavedGameInfoToFile ( int  slotNumber,
SavedGameData  savedGameData 
)
inlinevirtual

◆ VerifySavedGameInfoFile()

virtual bool PixelCrushers.DiskSavedGameDataStorer.VerifySavedGameInfoFile ( string  saveInfoFilename)
inlineprotectedvirtual

◆ WriteSavedGameInfoToDisk()

virtual void PixelCrushers.DiskSavedGameDataStorer.WriteSavedGameInfoToDisk ( )
inlineprotectedvirtual

◆ WriteStringToFile()

static void PixelCrushers.DiskSavedGameDataStorer.WriteStringToFile ( string  filename,
string  data 
)
inlinestatic

Member Data Documentation

◆ customPath

string PixelCrushers.DiskSavedGameDataStorer.customPath

◆ encrypt

bool PixelCrushers.DiskSavedGameDataStorer.encrypt = true

◆ encryptionPassword

string PixelCrushers.DiskSavedGameDataStorer.encryptionPassword = "My Password"

◆ m_savedGameInfo

List<SavedGameInfo> PixelCrushers.DiskSavedGameDataStorer.m_savedGameInfo = null
protected

◆ storeSaveFilesIn

BasePath PixelCrushers.DiskSavedGameDataStorer.storeSaveFilesIn = BasePath.PersistentDataPath

Property Documentation

◆ debug

bool PixelCrushers.DiskSavedGameDataStorer.debug
getset

◆ savedGameInfo

List<SavedGameInfo> PixelCrushers.DiskSavedGameDataStorer.savedGameInfo
getprotected

The documentation for this class was generated from the following file: