C# 클래스 LevelSave, PuzzleGameProject

Contains all the methods to save and load all of the elements of a level, the elements contained in the TileMap.
파일 보기 프로젝트 열기: Cedric-Paris/PuzzleGameProject 1 사용 예제들

공개 메소드들

메소드 설명
GetLevels ( ) : List

Gets the list of the levels names.

LoadTileMap ( string fileName ) : int>.Dictionary

Read a level in a file and create the elements in it with the SquareInstanciation méthode

Save ( object entity, string fileName ) : void

Save the specified entity in a file created with the fileName passed in argument.

SaveTileMap ( string fileName, int>.Dictionary items ) : void

Saves in a file the tile map of the scene using the serializable object TileMapSave.

비공개 메소드들

메소드 설명
LevelSave ( ) : System

Static constructor is called at most one time, before any instance constructor is invoked or member is accessed. Checks if the saves directory exists, creates it if not.

Load ( string fileName ) : object

Load the file at the specified fileName.

SquareInstanciation ( string>.KeyValuePair square, GameObject parent ) : void

Instanciate the square passed in argument, and the element in the square if there's one.

메소드 상세

GetLevels() 공개 정적인 메소드

Gets the list of the levels names.
public static GetLevels ( ) : List
리턴 List

LoadTileMap() 공개 정적인 메소드

Read a level in a file and create the elements in it with the SquareInstanciation méthode
public static LoadTileMap ( string fileName ) : int>.Dictionary
fileName string File name.
리턴 int>.Dictionary

Save() 공개 정적인 메소드

Save the specified entity in a file created with the fileName passed in argument.
public static Save ( object entity, string fileName ) : void
entity object Entity, must be serializable.
fileName string File name.
리턴 void

SaveTileMap() 공개 정적인 메소드

Saves in a file the tile map of the scene using the serializable object TileMapSave.
public static SaveTileMap ( string fileName, int>.Dictionary items ) : void
fileName string Name of the file where the level will be save.
items int>.Dictionary Items that are availables in the level
리턴 void