C# 클래스 Azmyth.XNA.TerrainManager

상속: Microsoft.Xna.Framework.GameComponent
파일 보기 프로젝트 열기: GalacticSoft/Azmyth 1 사용 예제들

Private Properties

프로퍼티 타입 설명
DrawBorder void

공개 메소드들

메소드 설명
CenterTile ( float tileX, float tileY ) : void

Will center terrain at specified coordinates. (in tiles)

Draw ( GameTime gameTime ) : void

Draws the loaded chunks visible in the viewport

GetChunkCount ( ) : int
GetNodeCount ( ) : int
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

ScreenToTile ( Rectangle screenRect ) : System.Drawing.RectangleF

Converts screen rectangle into tiles

ScreenToTileF ( System screenRect ) : System.Drawing.RectangleF

Converts screen rectangle into tiles

TerrainManager ( AzmythGame game ) : System
TileToScreen ( System tileRect ) : Rectangle

Converts tile rectangle into screen position.

TileToScreenF ( System tileRect ) : System.Drawing.RectangleF

Converts tile rectangle into screen position.

Update ( GameTime gameTime ) : void

Updates chunk states.

UpdateChunks ( Vector2 position ) : void

비공개 메소드들

메소드 설명
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 ( float tileX, float tileY ) : void
tileX float
tileY float
리턴 void

Draw() 공개 메소드

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

GetChunkCount() 공개 메소드

public GetChunkCount ( ) : int
리턴 int

GetNodeCount() 공개 메소드

public GetNodeCount ( ) : int
리턴 int

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

ScreenToTile() 공개 메소드

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

ScreenToTileF() 공개 메소드

Converts screen rectangle into tiles
public ScreenToTileF ( System screenRect ) : System.Drawing.RectangleF
screenRect System
리턴 System.Drawing.RectangleF

TerrainManager() 공개 메소드

public TerrainManager ( AzmythGame game ) : System
game AzmythGame
리턴 System

TileToScreen() 공개 메소드

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

TileToScreenF() 공개 메소드

Converts tile rectangle into screen position.
public TileToScreenF ( System tileRect ) : System.Drawing.RectangleF
tileRect System
리턴 System.Drawing.RectangleF

Update() 공개 메소드

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

UpdateChunks() 공개 메소드

public UpdateChunks ( Vector2 position ) : void
position Vector2
리턴 void