C# Class TileGenerator.EdgeDecalManager

Manages and draws edge decals
Show file Open project: Jewelots/Spelunky-Tiles Class Usage Examples

Public Methods

Method Description
BlockDestroyed ( int blockIndex ) : void

Call when a block is destroyed

BlockDestroyed ( int blockX, int blockY, int arrayWidth ) : void

Call when a block is destroyed

CreateEdgeDecals ( bool blocks, int width, int height, int tileSize ) : void

Create edge decals around blocks

Draw ( SpriteBatch spriteBatch ) : void

Draw edge decals

EdgeDecalManager ( int tileSize ) : System

Initialises a new decal manager

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

Sets the texture to draw the decal with

Method Details

BlockDestroyed() public method

Call when a block is destroyed
public BlockDestroyed ( int blockIndex ) : void
blockIndex int Index of the destroyed block
return void

BlockDestroyed() public method

Call when a block is destroyed
public BlockDestroyed ( int blockX, int blockY, int arrayWidth ) : void
blockX int X position of the destroyed block (tiles)
blockY int Y position of the destroyed block (tiles)
arrayWidth int Width of tile grid (tiles)
return void

CreateEdgeDecals() public method

Create edge decals around blocks
public CreateEdgeDecals ( bool blocks, int width, int height, int tileSize ) : void
blocks bool A 2D grid signifying blocks
width int Width of the grid (tiles)
height int Height of the grid (tiles)
tileSize int Size of each tile in the grid (pixels)
return void

Draw() public method

Draw edge decals
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

EdgeDecalManager() public method

Initialises a new decal manager
public EdgeDecalManager ( int tileSize ) : System
tileSize int Size of each tile on the texture (pixels)
return System

SetTexture() public method

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
return void