C# Class Azmyth.XNA.PlaneManager

Inheritance: Microsoft.Xna.Framework.GameComponent
Afficher le fichier Open project: GalacticSoft/Azmyth

Private Properties

Свойство Type Description
DrawBorder void

Méthodes publiques

Méthode Description
CenterTile ( int tileX, int tileY ) : void

Will center terrain at specified coordinates. (in tiles)

Draw ( GameTime gameTime ) : void

Draws the loaded chunks visible in the viewport

Initialize ( ) : void

Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.

LoadChunk ( float chunkX, float chunkY ) : void

Load a chunk at specified x and y position (in chunks)

LoadContent ( ) : void

Loads terrain tiles

PlaneManager ( AzmythGame game ) : System
ScreenToTile ( Rectangle screenRect ) : System.Drawing.RectangleF

Converts screen rectangle into tiles

TileToScreen ( System tileRect ) : Rectangle

Converts tile rectangle into screen position.

Update ( GameTime gameTime ) : void

Updates chunk states.

Private Methods

Méthode Description
DrawBorder ( Rectangle rectangleToDraw, int thicknessOfBorder, Color borderColor ) : void

Will draw a border (hollow rectangle) of the given 'thicknessOfBorder' (in pixels) of the specified color. By Sean Colombo, from http://bluelinegamestudios.com/blog

Method Details

CenterTile() public méthode

Will center terrain at specified coordinates. (in tiles)
public CenterTile ( int tileX, int tileY ) : void
tileX int
tileY int
Résultat void

Draw() public méthode

Draws the loaded chunks visible in the viewport
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

Initialize() public méthode

Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.
public Initialize ( ) : void
Résultat void

LoadChunk() public méthode

Load a chunk at specified x and y position (in chunks)
public LoadChunk ( float chunkX, float chunkY ) : void
chunkX float
chunkY float
Résultat void

LoadContent() public méthode

Loads terrain tiles
public LoadContent ( ) : void
Résultat void

PlaneManager() public méthode

public PlaneManager ( AzmythGame game ) : System
game AzmythGame
Résultat System

ScreenToTile() public méthode

Converts screen rectangle into tiles
public ScreenToTile ( Rectangle screenRect ) : System.Drawing.RectangleF
screenRect Microsoft.Xna.Framework.Rectangle
Résultat System.Drawing.RectangleF

TileToScreen() public méthode

Converts tile rectangle into screen position.
public TileToScreen ( System tileRect ) : Rectangle
tileRect System
Résultat Microsoft.Xna.Framework.Rectangle

Update() public méthode

Updates chunk states.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void