PixelCrushers.SavedGameDataStorer Class Referenceabstract

Abstract base class for "storage providers" that store saved game data somewhere, such as PlayerPrefs or a disk file. More...

Inheritance diagram for PixelCrushers.SavedGameDataStorer:
Collaboration diagram for PixelCrushers.SavedGameDataStorer:

Public Member Functions

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.
 

Properties

virtual float progress [get, protected set]
 Return the current progress (0-1) of the current async save operation.
 

Detailed Description

Abstract base class for "storage providers" that store saved game data somewhere, such as PlayerPrefs or a disk file.

To save asynchronously, override StoreSavedGameDataAsync.

Member Function Documentation

◆ DeleteSavedGameData()

void PixelCrushers.SavedGameDataStorer.DeleteSavedGameData ( int  slotNumber)
abstract

Delete the saved game from the specified slot if present.

◆ HasDataInSlot()

bool PixelCrushers.SavedGameDataStorer.HasDataInSlot ( int  slotNumber)
abstract

Return true if the specified slot contains a saved game.

◆ RetrieveSavedGameData()

SavedGameData PixelCrushers.SavedGameDataStorer.RetrieveSavedGameData ( int  slotNumber)
abstract

Retrieve saved game data from the specified slot, or null if no saved game in the slot.

◆ StoreSavedGameData()

void PixelCrushers.SavedGameDataStorer.StoreSavedGameData ( int  slotNumber,
SavedGameData  savedGameData 
)
abstract

Store saved game data in the specified slot.

◆ StoreSavedGameDataAsync()

virtual IEnumerator PixelCrushers.SavedGameDataStorer.StoreSavedGameDataAsync ( int  slotNumber,
SavedGameData  savedGameData 
)
inlinevirtual

Asynchronously store the saved game data in the specified slot.

The base version of this method just calls the synchronous version, StoreSavedGameData(). If you override it, keep the progress property updated so any watchers will know how far along it is.

Property Documentation

◆ progress

virtual float PixelCrushers.SavedGameDataStorer.progress
getprotected set

Return the current progress (0-1) of the current async save operation.


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