PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad Class Reference

This runs on top of ARPG's SaveLoad. More...

Inheritance diagram for PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad:
Collaboration diagram for PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad:

Classes

class  Data
 

Public Member Functions

override void Reset ()
 
override void Awake ()
 
override void Start ()
 
void QuitToTitle ()
 Quits the game, returning to the title level.
 
void ExitProgram ()
 
virtual string GetSlotSummary (int slot)
 Gets the slot summary, which is text shown in the slot's load button.
 
override string RecordData ()
 
override void ApplyDataImmediate ()
 If the Saver needs to pull data from the Save System immediately after loading a scene, instead of waiting for ApplyData to be called at it its normal time, it can implement this method.
 
override void ApplyData (string s)
 
- Public Member Functions inherited from PixelCrushers.Saver
virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void OnDestroy ()
 
string RecordData ()
 This method should return a string that represents the data you want to save.
 
void ApplyData (string s)
 This method should process the string representation of saved data and apply it to the current state of the game.
 
virtual void OnBeforeSceneChange ()
 The Save System will call this method before scene changes.
 
virtual void OnRestartGame ()
 The Save System will call this method when restarting the game.
 

Static Public Member Functions

static void SaveGame (int slot)
 
static void LoadGame (int slot)
 
static void QuitGame ()
 

Public Attributes

bool enableMenu = true
 
string menuTitle = "Menu"
 
string saveMenuTitle = "Select Save Slot"
 
string loadMenuTitle = "Load From Slot"
 
ScaledRect scaledRect
 
GUISkin guiSkin
 
KeyCode menuKey = KeyCode.Escape
 
string savedGameKey = "SavedGame"
 
int numSavedGameSlots = 5
 
string gameSavedMessage = "Game Saved"
 
string gameLoadedMessage = "Game Loaded"
 
string titleLevelName = "Title"
 
bool debug
 

Properties

static DSSaveLoad Instance [get, set]
 
- Properties inherited from PixelCrushers.Saver
bool appendSaverTypeToKey [get, set]
 Append the name of this saver type to the key.
 
virtual string key [get, set]
 Save data under this key.
 
string _internalKeyValue [get, set]
 Accesses the internal key value.
 
virtual bool saveAcrossSceneChanges [get, set]
 Save when changing scenes to be able to restore saved state when returning to scene.
 
virtual bool restoreStateOnStart [get, set]
 

Additional Inherited Members

- Protected Attributes inherited from PixelCrushers.Saver
string m_runtimeKey = null
 

Detailed Description

This runs on top of ARPG's SaveLoad.

It replaces SaveLoad's menu with its own menu, which allows it to also save and load Dialogue System data. It supports multiple saved game slots, and you can override the GetSlotSummary(), SaveSlot(), and LoadSlot() methods to save somewhere other than the default, which is PlayerPrefs.

Member Function Documentation

◆ ApplyData()

override void PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.ApplyData ( string  s)
inline

◆ ApplyDataImmediate()

override void PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.ApplyDataImmediate ( )
inlinevirtual

If the Saver needs to pull data from the Save System immediately after loading a scene, instead of waiting for ApplyData to be called at it its normal time, it can implement this method.

For efficiency, the Save System will not look up the Saver's data; your method must look it up manually by calling SaveSystem.savedGameData.GetData(key).

Reimplemented from PixelCrushers.Saver.

◆ Awake()

override void PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.Awake ( )
inlinevirtual

Reimplemented from PixelCrushers.Saver.

◆ ExitProgram()

void PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.ExitProgram ( )
inline

◆ GetSlotSummary()

virtual string PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.GetSlotSummary ( int  slot)
inlinevirtual

Gets the slot summary, which is text shown in the slot's load button.

This method uses PlayerPrefs. Override it if you want to save elsewhere such as a local file.

Returns
The slot summary.
Parameters
slotSlot.

◆ LoadGame()

static void PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.LoadGame ( int  slot)
inlinestatic

◆ QuitGame()

static void PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.QuitGame ( )
inlinestatic

◆ QuitToTitle()

void PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.QuitToTitle ( )
inline

Quits the game, returning to the title level.

◆ RecordData()

override string PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.RecordData ( )
inline

◆ Reset()

override void PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.Reset ( )
inlinevirtual

Reimplemented from PixelCrushers.Saver.

◆ SaveGame()

static void PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.SaveGame ( int  slot)
inlinestatic

◆ Start()

override void PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.Start ( )
inlinevirtual

Reimplemented from PixelCrushers.Saver.

Member Data Documentation

◆ debug

bool PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.debug

◆ enableMenu

bool PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.enableMenu = true

◆ gameLoadedMessage

string PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.gameLoadedMessage = "Game Loaded"

◆ gameSavedMessage

string PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.gameSavedMessage = "Game Saved"

◆ guiSkin

GUISkin PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.guiSkin

◆ loadMenuTitle

string PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.loadMenuTitle = "Load From Slot"

◆ menuKey

KeyCode PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.menuKey = KeyCode.Escape

◆ menuTitle

string PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.menuTitle = "Menu"

◆ numSavedGameSlots

int PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.numSavedGameSlots = 5

◆ savedGameKey

string PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.savedGameKey = "SavedGame"

◆ saveMenuTitle

string PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.saveMenuTitle = "Select Save Slot"

◆ scaledRect

ScaledRect PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.scaledRect
Initial value:
= ScaledRect.FromOrigin(ScaledRectAlignment.MiddleCenter,
ScaledValue.FromPixelValue(300),
ScaledValue.FromPixelValue(370))

◆ titleLevelName

string PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.titleLevelName = "Title"

Property Documentation

◆ Instance

DSSaveLoad PixelCrushers.DialogueSystem.ARPGSupport.DSSaveLoad.Instance
staticgetset

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