public DrawTileObject ( |
||
spriteBatch | XNA SpriteBatch instance; SpriteBatch.Begin() must be called before using this method | |
objectLayerID | int | Index of the layer to draw in the Map.ObjectLayers collection |
objectID | int | Index of the object to draw in the Map.ObjectLayers.MapObjects collection |
region | Region of the map in pixels to draw | |
layerDepth | float | LayerDepth value to pass to SpriteBatch |
color | Color | Color of the object |
return | void |
public void DrawTileObject(SpriteBatch spriteBatch, int objectLayerID, int objectID, ref Rectangle region, float layerDepth, ref Color color)
{
spriteBatch.Draw(
this.Tilesets[this.SourceTiles[this.ObjectLayers[objectLayerID].MapObjects[objectID].TileID.Value].TilesetID].Texture,
Map.Translate(this.ObjectLayers[objectLayerID].MapObjects[objectID].Bounds, region),
this.SourceTiles[this.ObjectLayers[objectLayerID].MapObjects[objectID].TileID.Value].Source,
color,
0,
this.SourceTiles[this.ObjectLayers[objectLayerID].MapObjects[objectID].TileID.Value].Origin,
SpriteEffects.None,
layerDepth);
}
Map::DrawTileObject ( |