C# Class Azmyth.XNA.PlaneManager

Inheritance: Microsoft.Xna.Framework.GameComponent
ファイルを表示 Open project: GalacticSoft/Azmyth

Private Properties

Property Type Description
DrawBorder void

Public Methods

Method 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

Method 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 method

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

Draw() public method

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

Initialize() public method

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
return void

LoadChunk() public method

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

LoadContent() public method

Loads terrain tiles
public LoadContent ( ) : void
return void

PlaneManager() public method

public PlaneManager ( AzmythGame game ) : System
game AzmythGame
return System

ScreenToTile() public method

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

TileToScreen() public method

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

Update() public method

Updates chunk states.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void