C# 클래스 FlatRedBall.TileGraphics.MapDrawableBatch

상속: FlatRedBall.PositionedObject, IDrawableBatch
파일 보기 프로젝트 열기: vchelaru/FlatRedBall 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
mIndices int[]
mIndices short[]
mTexture Microsoft.Xna.Framework.Graphics.Texture2D
mTileset Tileset
mVertices Microsoft.Xna.Framework.Graphics.VertexPositionTexture[]

Private Properties

프로퍼티 타입 설명
FromReducedLayer MapDrawableBatch
FromReducedLayer MapDrawableBatch
GetRenderingIndexValues void
PrepareRenderingStates Microsoft.Xna.Framework.Graphics.Effect
RegisterName void
VerifySingleTexture void

공개 메소드들

메소드 설명
AddTile ( Vector3 bottomLeftPosition, Vector2 dimensions, Vector4 texture ) : int

Adds a tile to the tile map

AddTile ( Vector3 bottomLeftPosition, Vector2 tileDimensions, int textureTopLeftX, int textureTopLeftY, int textureBottomRightX, int textureBottomRightY ) : int

Add a tile to the map

AddTile ( Vector3 bottomLeftPosition, Vector2 dimensions, Vector4 texture ) : void

Adds a tile to the tile map

AddTile ( Vector3 bottomLeftPosition, Vector2 tileDimensions, int textureTopLeftX, int textureTopLeftY, int textureBottomRightX, int textureBottomRightY ) : void

Add a tile to the map

AddToManagers ( ) : void
AddToManagers ( Layer layer ) : void
ApplyDiagonalFlip ( int orderedTileIndex ) : void
Clone ( ) : MapDrawableBatch
Destroy ( ) : void

Don't call this, instead call SpriteManager.RemoveDrawableBatch

Draw ( Camera camera ) : void

Custom drawing technique - sets graphics states and draws the custom shape

FromScnx ( string sceneFileName, string contentManagerName, bool verifySameTexturePerLayer ) : MapDrawableBatch
FromSpriteSaves ( List spriteSaveList, int startingIndex, int count, string contentManagerName, bool verifySameTexturesPerLayer ) : MapDrawableBatch
GetBottomLeftWorldCoordinateForOrderedTile ( int orderedTileIndex, float &x, float &y ) : void
GetFirstAfterX ( VertexPositionTexture list, float xGreaterThan ) : int
GetFirstAfterY ( VertexPositionTexture list, float yGreaterThan ) : int
GetTextureCoordiantesForOrderedTile ( int orderedTileIndex, float &textureX, float &textureY ) : void
MapDrawableBatch ( ) : System
MapDrawableBatch ( int numberOfTiles, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : System
MapDrawableBatch ( int numberOfTiles, int textureTileDimensionWidth, int textureTileDimensionHeight, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : System

Create and initialize all assets

MergeOntoThis ( IEnumerable mapDrawableBatches ) : void
PaintTile ( int orderedTileIndex, int newTextureId ) : void

Paints a texture on a tile. This method takes the index of the Sprite in the order it was added to the MapDrawableBatch, so it supports any configuration including non-rectangular maps and maps with gaps.

PaintTile ( int row, int column, int newTextureId ) : void

Paints a texture on a tile. This method assumes that the MapDrawableBatch is a perfect recangle with no gaps, and that all tiles have been added left to right, top to bottom.

PaintTileTextureCoordinates ( int orderedTileIndex, float textureXCoordinate, float textureYCoordinate ) : void
Paste ( Sprite sprite, bool setZTo0 ) : int
Paste ( SpriteSave spriteSave, bool setZTo0 ) : int
Paste ( Sprite sprite ) : void
Paste ( SpriteSave spriteSave ) : void
RemoveQuads ( IEnumerable quadIndexes ) : void
RotateTextureCoordinatesCounterclockwise ( int orderedTileIndex ) : void
Update ( ) : void

Here we update our batch - but this batch doesn't need to be updated

보호된 메소드들

메소드 설명
InternalInitialize ( ) : void

비공개 메소드들

메소드 설명
FromReducedLayer ( TMXGlueLib reducedLayerInfo, LayeredTileMap owner, TMXGlueLib rtmi, string contentManagerName ) : MapDrawableBatch
FromReducedLayer ( TMXGlueLib reducedLayerInfo, string contentManagerName, int tileDimensionWidth, int tileDimensionHeight, float quadWidth, float quadHeight ) : MapDrawableBatch
GetRenderingIndexValues ( Camera camera, int &firstVertIndex, int &lastVertIndex, int &indexStart, int &numberOfTriangles ) : void
PrepareRenderingStates ( Camera camera, TextureAddressMode &oldTextureAddressMode ) : Effect
RegisterName ( string name, int tileIndex ) : void
VerifySingleTexture ( List spriteSaveList, int startingIndex, int count ) : void

메소드 상세

AddTile() 공개 메소드

Adds a tile to the tile map
public AddTile ( Vector3 bottomLeftPosition, Vector2 dimensions, Vector4 texture ) : int
bottomLeftPosition Vector3
dimensions Vector2
texture Vector4 /// 4 points defining the boundaries in the texture for the tile. /// (X = left, Y = right, Z = top, W = bottom) ///
리턴 int

AddTile() 공개 메소드

Add a tile to the map
public AddTile ( Vector3 bottomLeftPosition, Vector2 tileDimensions, int textureTopLeftX, int textureTopLeftY, int textureBottomRightX, int textureBottomRightY ) : int
bottomLeftPosition Vector3
tileDimensions Vector2
textureTopLeftX int Top left X coordinate in the core texture
textureTopLeftY int Top left Y coordinate in the core texture
textureBottomRightX int Bottom right X coordinate in the core texture
textureBottomRightY int Bottom right Y coordinate in the core texture
리턴 int

AddTile() 공개 메소드

Adds a tile to the tile map
public AddTile ( Vector3 bottomLeftPosition, Vector2 dimensions, Vector4 texture ) : void
bottomLeftPosition Vector3
dimensions Vector2
texture Vector4 /// 4 points defining the boundaries in the texture for the tile. /// (X = left, Y = right, Z = top, W = bottom) ///
리턴 void

AddTile() 공개 메소드

Add a tile to the map
public AddTile ( Vector3 bottomLeftPosition, Vector2 tileDimensions, int textureTopLeftX, int textureTopLeftY, int textureBottomRightX, int textureBottomRightY ) : void
bottomLeftPosition Vector3
tileDimensions Vector2
textureTopLeftX int Top left X coordinate in the core texture
textureTopLeftY int Top left Y coordinate in the core texture
textureBottomRightX int Bottom right X coordinate in the core texture
textureBottomRightY int Bottom right Y coordinate in the core texture
리턴 void

AddToManagers() 공개 메소드

public AddToManagers ( ) : void
리턴 void

AddToManagers() 공개 메소드

public AddToManagers ( Layer layer ) : void
layer Layer
리턴 void

ApplyDiagonalFlip() 공개 메소드

public ApplyDiagonalFlip ( int orderedTileIndex ) : void
orderedTileIndex int
리턴 void

Clone() 공개 메소드

public Clone ( ) : MapDrawableBatch
리턴 MapDrawableBatch

Destroy() 공개 메소드

Don't call this, instead call SpriteManager.RemoveDrawableBatch
public Destroy ( ) : void
리턴 void

Draw() 공개 메소드

Custom drawing technique - sets graphics states and draws the custom shape
public Draw ( Camera camera ) : void
camera FlatRedBall.Camera The currently drawing camera
리턴 void

FromScnx() 공개 정적인 메소드

public static FromScnx ( string sceneFileName, string contentManagerName, bool verifySameTexturePerLayer ) : MapDrawableBatch
sceneFileName string
contentManagerName string
verifySameTexturePerLayer bool
리턴 MapDrawableBatch

FromSpriteSaves() 공개 정적인 메소드

public static FromSpriteSaves ( List spriteSaveList, int startingIndex, int count, string contentManagerName, bool verifySameTexturesPerLayer ) : MapDrawableBatch
spriteSaveList List
startingIndex int
count int
contentManagerName string
verifySameTexturesPerLayer bool
리턴 MapDrawableBatch

GetBottomLeftWorldCoordinateForOrderedTile() 공개 메소드

public GetBottomLeftWorldCoordinateForOrderedTile ( int orderedTileIndex, float &x, float &y ) : void
orderedTileIndex int
x float
y float
리턴 void

GetFirstAfterX() 공개 정적인 메소드

public static GetFirstAfterX ( VertexPositionTexture list, float xGreaterThan ) : int
list Microsoft.Xna.Framework.Graphics.VertexPositionTexture
xGreaterThan float
리턴 int

GetFirstAfterY() 공개 정적인 메소드

public static GetFirstAfterY ( VertexPositionTexture list, float yGreaterThan ) : int
list Microsoft.Xna.Framework.Graphics.VertexPositionTexture
yGreaterThan float
리턴 int

GetTextureCoordiantesForOrderedTile() 공개 메소드

public GetTextureCoordiantesForOrderedTile ( int orderedTileIndex, float &textureX, float &textureY ) : void
orderedTileIndex int
textureX float
textureY float
리턴 void

InternalInitialize() 보호된 메소드

protected InternalInitialize ( ) : void
리턴 void

MapDrawableBatch() 공개 메소드

public MapDrawableBatch ( ) : System
리턴 System

MapDrawableBatch() 공개 메소드

public MapDrawableBatch ( int numberOfTiles, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : System
numberOfTiles int
texture Microsoft.Xna.Framework.Graphics.Texture2D
리턴 System

MapDrawableBatch() 공개 메소드

Create and initialize all assets
public MapDrawableBatch ( int numberOfTiles, int textureTileDimensionWidth, int textureTileDimensionHeight, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : System
numberOfTiles int
textureTileDimensionWidth int
textureTileDimensionHeight int
texture Microsoft.Xna.Framework.Graphics.Texture2D
리턴 System

MergeOntoThis() 공개 메소드

public MergeOntoThis ( IEnumerable mapDrawableBatches ) : void
mapDrawableBatches IEnumerable
리턴 void

PaintTile() 공개 메소드

Paints a texture on a tile. This method takes the index of the Sprite in the order it was added to the MapDrawableBatch, so it supports any configuration including non-rectangular maps and maps with gaps.
public PaintTile ( int orderedTileIndex, int newTextureId ) : void
orderedTileIndex int The index of the tile to paint - this matches the index of the tile as it was added.
newTextureId int
리턴 void

PaintTile() 공개 메소드

Paints a texture on a tile. This method assumes that the MapDrawableBatch is a perfect recangle with no gaps, and that all tiles have been added left to right, top to bottom.
public PaintTile ( int row, int column, int newTextureId ) : void
row int The row (y) index, base 0
column int The column (x) index, base 0
newTextureId int The texture ID, which is a left to right, top to bottom index
리턴 void

PaintTileTextureCoordinates() 공개 메소드

public PaintTileTextureCoordinates ( int orderedTileIndex, float textureXCoordinate, float textureYCoordinate ) : void
orderedTileIndex int
textureXCoordinate float
textureYCoordinate float
리턴 void

Paste() 공개 메소드

public Paste ( Sprite sprite, bool setZTo0 ) : int
sprite Sprite
setZTo0 bool
리턴 int

Paste() 공개 메소드

public Paste ( SpriteSave spriteSave, bool setZTo0 ) : int
spriteSave SpriteSave
setZTo0 bool
리턴 int

Paste() 공개 메소드

public Paste ( Sprite sprite ) : void
sprite Sprite
리턴 void

Paste() 공개 메소드

public Paste ( SpriteSave spriteSave ) : void
spriteSave SpriteSave
리턴 void

RemoveQuads() 공개 메소드

public RemoveQuads ( IEnumerable quadIndexes ) : void
quadIndexes IEnumerable
리턴 void

RotateTextureCoordinatesCounterclockwise() 공개 메소드

public RotateTextureCoordinatesCounterclockwise ( int orderedTileIndex ) : void
orderedTileIndex int
리턴 void

Update() 공개 메소드

Here we update our batch - but this batch doesn't need to be updated
public Update ( ) : void
리턴 void

프로퍼티 상세

mIndices 보호되어 있는 프로퍼티

The indices to draw the shape
protected int[] mIndices
리턴 int[]

mIndices 보호되어 있는 프로퍼티

The indices to draw the shape
protected short[] mIndices
리턴 short[]

mTexture 보호되어 있는 프로퍼티

protected Texture2D,Microsoft.Xna.Framework.Graphics mTexture
리턴 Microsoft.Xna.Framework.Graphics.Texture2D

mTileset 보호되어 있는 프로퍼티

protected Tileset,FlatRedBall.TileGraphics mTileset
리턴 Tileset

mVertices 보호되어 있는 프로퍼티

The vertices used to draw the map.
Coordinate order is: 3 2 0 1
protected VertexPositionTexture[],Microsoft.Xna.Framework.Graphics mVertices
리턴 Microsoft.Xna.Framework.Graphics.VertexPositionTexture[]