C# Class PathfindingTest.Map.GameMap

Afficher le fichier Open project: Wotuu/RTS_XNA_v2 Class Usage Examples

Méthodes publiques

Свойство Type Description
TILE_WIDTH int
layers CustomArrayList
rectangleTiles CustomArrayList

Méthodes publiques

Méthode Description
BlendTextures ( Microsoft.Xna.Framework.Graphics.Texture2D textures, BlendMode mode ) : Microsoft.Xna.Framework.Graphics.Texture2D

Blends the textures into one.

CalculateQuadCount ( int mapWidth ) : int
CalculateQuadDepth ( int mapHeight ) : int
Dispose ( ) : void

Disposes of the game map, unloading most resources used by it.

Draw ( SpriteBatch sb ) : void

Draws the map.

GameMap ( String mapName ) : System
LoadLayers ( string filename ) : void

Loads the layers from a certain map.

LoadPathfindingNodes ( String filename ) : void

Loads all the pathfinding nodes in the game. Also creates the connections.

MergeLayers ( ) : void

Merges the loaded layers!

MergeTextures ( CustomArrayList textures ) : Microsoft.Xna.Framework.Graphics.Texture2D

Merges a linked list of textures.

MergeTextures ( Microsoft.Xna.Framework.Graphics.Texture2D toMerge ) : Microsoft.Xna.Framework.Graphics.Texture2D

Merges 4 (FOUR) textures together to a big texture.

Split ( Microsoft.Xna.Framework.Graphics.Texture2D original, int partWidth, int partHeight, int &xCount, int &yCount ) : Microsoft.Xna.Framework.Graphics.Texture2D[]

Splits a texture into an array of smaller textures of the specified size.

Private Methods

Méthode Description
OnMapTileLoaded ( CollisionMap source ) : void

Called when a map tile of the collisionmap is loaded!

OnMiniMapRenderTick ( MiniMap map ) : void

When the minimap reports that it has loaded a small bit.

Method Details

BlendTextures() public méthode

Blends the textures into one.
public BlendTextures ( Microsoft.Xna.Framework.Graphics.Texture2D textures, BlendMode mode ) : Microsoft.Xna.Framework.Graphics.Texture2D
textures Microsoft.Xna.Framework.Graphics.Texture2D The textures to merge.
mode BlendMode
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

CalculateQuadCount() public static méthode

public static CalculateQuadCount ( int mapWidth ) : int
mapWidth int
Résultat int

CalculateQuadDepth() public static méthode

public static CalculateQuadDepth ( int mapHeight ) : int
mapHeight int
Résultat int

Dispose() public méthode

Disposes of the game map, unloading most resources used by it.
public Dispose ( ) : void
Résultat void

Draw() public méthode

Draws the map.
public Draw ( SpriteBatch sb ) : void
sb Microsoft.Xna.Framework.Graphics.SpriteBatch SpriteBatch to draw on.
Résultat void

GameMap() public méthode

public GameMap ( String mapName ) : System
mapName String
Résultat System

LoadLayers() public méthode

Loads the layers from a certain map.
public LoadLayers ( string filename ) : void
filename string The filename
Résultat void

LoadPathfindingNodes() public méthode

Loads all the pathfinding nodes in the game. Also creates the connections.
public LoadPathfindingNodes ( String filename ) : void
filename String The filename of the map to load from
Résultat void

MergeLayers() public méthode

Merges the loaded layers!
public MergeLayers ( ) : void
Résultat void

MergeTextures() public méthode

Merges a linked list of textures.
public MergeTextures ( CustomArrayList textures ) : Microsoft.Xna.Framework.Graphics.Texture2D
textures CustomArrayList
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

MergeTextures() public méthode

Merges 4 (FOUR) textures together to a big texture.
public MergeTextures ( Microsoft.Xna.Framework.Graphics.Texture2D toMerge ) : Microsoft.Xna.Framework.Graphics.Texture2D
toMerge Microsoft.Xna.Framework.Graphics.Texture2D The textures to merge
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

Split() public méthode

Splits a texture into an array of smaller textures of the specified size.
public Split ( Microsoft.Xna.Framework.Graphics.Texture2D original, int partWidth, int partHeight, int &xCount, int &yCount ) : Microsoft.Xna.Framework.Graphics.Texture2D[]
original Microsoft.Xna.Framework.Graphics.Texture2D The texture to be split into smaller textures
partWidth int The width of each of the smaller textures that will be contained in the returned array.
partHeight int The height of each of the smaller textures that will be contained in the returned array.
xCount int
yCount int
Résultat Microsoft.Xna.Framework.Graphics.Texture2D[]

Property Details

TILE_WIDTH public_oe static_oe property

public static int TILE_WIDTH
Résultat int

layers public_oe property

public CustomArrayList layers
Résultat CustomArrayList

rectangleTiles public_oe property

public CustomArrayList rectangleTiles
Résultat CustomArrayList