C# Class Engine.Objects.Map

A Sphere map object.
Inheritance: IDisposable
ファイルを表示 Open project: Radnen/sphere-sfml Class Usage Examples

Public Methods

Method Description
CreateNew ( short width, short height, short tileWidth, short tileHeight, string tilesetPath ) : void

Creates a new map with values.

Dispose ( ) : void

Disposes and clears this object.

GetTileMap ( TextureAtlas atlas ) : RenderStates>.Tuple

Compiles the map into a texture-coordinated vertex array & render states.

Load ( string filename ) : bool

Loads a map from the given filename.

Map ( ) : System

Creates a new, empty map.

Map ( string filename ) : System

Creates a new map from file.

ResizeAllLayers ( short width, short height ) : void

Resizes the map's layers to the new size.

Save ( string filename ) : bool

Attempts to save the map to the given filename.

UpdateVertexLayer ( int layer, TextureAtlas atlas ) : void

Private Methods

Method Description
Dispose ( bool disposing ) : void

Method Details

CreateNew() public method

Creates a new map with values.
public CreateNew ( short width, short height, short tileWidth, short tileHeight, string tilesetPath ) : void
width short The width in tiles.
height short The height in tiles.
tileWidth short The tilewidth in pixels.
tileHeight short The tileheight in pixels.
tilesetPath string The path to the tileset.
return void

Dispose() public method

Disposes and clears this object.
public Dispose ( ) : void
return void

GetTileMap() public method

Compiles the map into a texture-coordinated vertex array & render states.
public GetTileMap ( TextureAtlas atlas ) : RenderStates>.Tuple
atlas TextureAtlas
return RenderStates>.Tuple

Load() public method

Loads a map from the given filename.
public Load ( string filename ) : bool
filename string The filename of the map.
return bool

Map() public method

Creates a new, empty map.
public Map ( ) : System
return System

Map() public method

Creates a new map from file.
public Map ( string filename ) : System
filename string
return System

ResizeAllLayers() public method

Resizes the map's layers to the new size.
public ResizeAllLayers ( short width, short height ) : void
width short The new width in tiles.
height short The new height in tiles.
return void

Save() public method

Attempts to save the map to the given filename.
public Save ( string filename ) : bool
filename string The path to save the Map to.
return bool

UpdateVertexLayer() public method

public UpdateVertexLayer ( int layer, TextureAtlas atlas ) : void
layer int
atlas TextureAtlas
return void