C# Class Bricklayer.Common.World.BlockType

A tile's block type (Ex: Dirt, Stone, etc)
Show file Open project: Cyral/Bricklayer Class Usage Examples

Public Properties

Property Type Description
BlockList List
Empty BlockType

Public Methods

Method Description
BlockType ( string name, Layer layer, Rectangle source, BlockCollision collision = BlockCollision.Passable, TileType type = TileType.Default ) : System

Creates a new instance of a BlockType

FromID ( byte ID ) : BlockType

Finds a BlockType from it's ID

Init ( ) : void

Adds/Creates all of the block type's

Private Methods

Method Description
BlockType ( ) : System

Method Details

BlockType() public method

Creates a new instance of a BlockType
public BlockType ( string name, Layer layer, Rectangle source, BlockCollision collision = BlockCollision.Passable, TileType type = TileType.Default ) : System
name string Name of the block
layer Layer
source Microsoft.Xna.Framework.Rectangle
collision BlockCollision
type TileType
return System

FromID() public static method

Finds a BlockType from it's ID
public static FromID ( byte ID ) : BlockType
ID byte
return BlockType

Init() public static method

Adds/Creates all of the block type's
public static Init ( ) : void
return void

Property Details

BlockList public static property

List of all block types
public static List BlockList
return List

Empty public static property

public static BlockType,Bricklayer.Common.World Empty
return BlockType