C# Class TileGenerator.EdgeDecalManager

Manages and draws edge decals
Afficher le fichier Open project: Jewelots/Spelunky-Tiles Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

BlockDestroyed() public méthode

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)
Résultat void

CreateEdgeDecals() public méthode

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)
Résultat void

Draw() public méthode

Draw edge decals
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Résultat void

EdgeDecalManager() public méthode

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

SetTexture() public méthode

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
Résultat void