C# 클래스 TileGenerator.TileRectangleDrawer

Draws tile rectangles
파일 보기 프로젝트 열기: Jewelots/Spelunky-Tiles 1 사용 예제들

공개 메소드들

메소드 설명
Draw ( SpriteBatch spriteBatch ) : void

Draw the tile rectangles

SetTexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : void

Sets the texture to draw the decal with

SetTileRectangles ( List newTiles ) : void

Set the TileRectangles to draw

TileRectangleDrawer ( int tileSize ) : System

Initialises a new TileRectangle drawer

비공개 메소드들

메소드 설명
Get1x1SourceRect ( Random rand ) : Rectangle

Pick a random source rectangle for a 1x1 tile

Get1x2SourceRect ( Random rand ) : Rectangle

Pick a random source rectangle for a 1x2 tile

Get2x1SourceRect ( Random rand ) : Rectangle

Pick a random source rectangle for a 2x1 tile

Get2x2SourceRect ( Random rand ) : Rectangle

Pick a random source rectangle for a 2x2 tile

메소드 상세

Draw() 공개 메소드

Draw the tile rectangles
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch Spritebatch to draw on
리턴 void

SetTexture() 공개 메소드

Sets the texture to draw the decal with
public SetTexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : void
texture Microsoft.Xna.Framework.Graphics.Texture2D Texture to use
리턴 void

SetTileRectangles() 공개 메소드

Set the TileRectangles to draw
public SetTileRectangles ( List newTiles ) : void
newTiles List A list of TileRectangles to draw
리턴 void

TileRectangleDrawer() 공개 메소드

Initialises a new TileRectangle drawer
public TileRectangleDrawer ( int tileSize ) : System
tileSize int
리턴 System