C# Класс Azmyth.XNA.PlaneManager

Наследование: Microsoft.Xna.Framework.GameComponent
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
DrawBorder void

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

CenterTile() публичный Метод

Will center terrain at specified coordinates. (in tiles)
public CenterTile ( int tileX, int tileY ) : void
tileX int
tileY int
Результат void

Draw() публичный Метод

Draws the loaded chunks visible in the viewport
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void

Initialize() публичный Метод

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
Результат void

LoadChunk() публичный Метод

Load a chunk at specified x and y position (in chunks)
public LoadChunk ( float chunkX, float chunkY ) : void
chunkX float
chunkY float
Результат void

LoadContent() публичный Метод

Loads terrain tiles
public LoadContent ( ) : void
Результат void

PlaneManager() публичный Метод

public PlaneManager ( AzmythGame game ) : System
game AzmythGame
Результат System

ScreenToTile() публичный Метод

Converts screen rectangle into tiles
public ScreenToTile ( Rectangle screenRect ) : System.Drawing.RectangleF
screenRect Microsoft.Xna.Framework.Rectangle
Результат System.Drawing.RectangleF

TileToScreen() публичный Метод

Converts tile rectangle into screen position.
public TileToScreen ( System tileRect ) : Rectangle
tileRect System
Результат Microsoft.Xna.Framework.Rectangle

Update() публичный Метод

Updates chunk states.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void