C# 클래스 SunsetHigh.SaveManager

Static class for managing save states. Saves games by serializing SaveGameData as XML and then encrypting it. The encryption prevents players from easily accessing and "hacking" the XML files.
파일 보기 프로젝트 열기: ErraticUnicorn/MOSH

공개 메소드들

메소드 설명
generateNewFileName ( ) : string
getSaveData ( string fileName, bool encrypt = true ) : SaveGameData

Loads a game with a given file name in the "SaveData" folder. By default the method will attempt to decrypt the file.

loadAllGames ( bool encrypt = true ) : List

Loads all save files in the "SaveData" folder. Can be used for previewing save files in the title screen

loadGame ( string fileName, bool encrypt = true ) : void
packData ( ) : SaveGameData
saveGame ( string fileName, SaveGameData saveGame, bool encrypt = true ) : bool

Saves a game to an external file in the "SaveData" folder. By default the save file is encrypted.

saveGame ( string fileName, bool encrypt = true ) : void
unpackData ( SaveGameData data ) : void
unpackDefaultData ( ) : void

비공개 메소드들

메소드 설명
decryptFile ( string fileNameIn, bool debug = false ) : Stream
encryptFile ( Stream streamIn, string fileNameOut ) : bool

메소드 상세

generateNewFileName() 공개 정적인 메소드

public static generateNewFileName ( ) : string
리턴 string

getSaveData() 공개 정적인 메소드

Loads a game with a given file name in the "SaveData" folder. By default the method will attempt to decrypt the file.
public static getSaveData ( string fileName, bool encrypt = true ) : SaveGameData
fileName string Name of the file to load
encrypt bool Optional, specifies whether to decrypt the file
리턴 SaveGameData

loadAllGames() 공개 정적인 메소드

Loads all save files in the "SaveData" folder. Can be used for previewing save files in the title screen
public static loadAllGames ( bool encrypt = true ) : List
encrypt bool
리턴 List

loadGame() 공개 정적인 메소드

public static loadGame ( string fileName, bool encrypt = true ) : void
fileName string
encrypt bool
리턴 void

packData() 공개 정적인 메소드

public static packData ( ) : SaveGameData
리턴 SaveGameData

saveGame() 공개 정적인 메소드

Saves a game to an external file in the "SaveData" folder. By default the save file is encrypted.
public static saveGame ( string fileName, SaveGameData saveGame, bool encrypt = true ) : bool
fileName string Name to give saved data file
saveGame SaveGameData Data to be saved
encrypt bool Optional, specifies whether output file should be encrypted (True by default)
리턴 bool

saveGame() 공개 정적인 메소드

public static saveGame ( string fileName, bool encrypt = true ) : void
fileName string
encrypt bool
리턴 void

unpackData() 공개 정적인 메소드

public static unpackData ( SaveGameData data ) : void
data SaveGameData
리턴 void

unpackDefaultData() 공개 정적인 메소드

public static unpackDefaultData ( ) : void
리턴 void