Public Member Functions | Static Public Attributes | Private Attributes
TheForum.GameCode.Items.MoneyItem Class Reference
Inheritance diagram for TheForum.GameCode.Items.MoneyItem:

List of all members.

Public Member Functions

 MoneyItem ()
override void Update (int timePassed, BasePiece piece, GameCode.BaseGameBoard board, Libraries.AssetManager assetM)
override void Render (GraphicsDevice device)
void Setup (BasePiece piece, Libraries.AssetManager assetM, double worth)
override void RemoveFromPiece (BasePiece piece)
override void HandleSwapOccured (int col, int row)
double GetWorth ()
override bool IsItemType (Libraries.StringType type)
override Libraries.StringType GetItemType ()

Static Public Attributes

static readonly
s_eventType = new Libraries.StringType("item_money")

Private Attributes

double m_worth
 How much the piece is worth.

Detailed Description

Game piece item that attaches to a game piece. Has a monetary worth.

Constructor & Destructor Documentation

TheForum.GameCode.Items.MoneyItem.MoneyItem ( )

Default constructor.

Member Function Documentation

override Libraries.StringType TheForum.GameCode.Items.MoneyItem.GetItemType ( ) [virtual]

Get the ID that represents the item type.

Value is the ID that represents the item type.

Implements TheForum.GameCode.Items.BasePieceItem.

double TheForum.GameCode.Items.MoneyItem.GetWorth ( )

Retrive how much the piece is worth.

Value is how much the piece is worth.

override void TheForum.GameCode.Items.MoneyItem.HandleSwapOccured ( int  col,
int  row 
) [virtual]

Piece was swapped, which should trigger the probation event.

col, row - Column and row the piece was at.

Reimplemented from TheForum.GameCode.Items.BasePieceItem.

override bool TheForum.GameCode.Items.MoneyItem.IsItemType ( Libraries.StringType  type) [virtual]

Check if the item type matches the given item type.

type - Type to check against.

Value is true if the item type matched, false if not.

Implements TheForum.GameCode.Items.BasePieceItem.

override void TheForum.GameCode.Items.MoneyItem.RemoveFromPiece ( BasePiece  piece) [virtual]

Remove the the item from the given piece. Set everything back to the way it was in the piece. Make sure it is actually the piece that contains the item ;)

piece - Piece the item is in.

Implements TheForum.GameCode.Items.BasePieceItem.

override void TheForum.GameCode.Items.MoneyItem.Render ( GraphicsDevice  device) [virtual]

Render the piece.

device - Device to render whatever with.

Implements TheForum.GameCode.Items.BasePieceItem.

void TheForum.GameCode.Items.MoneyItem.Setup ( BasePiece  piece,
Libraries.AssetManager  assetM,
double  worth 

Setup the item, attaching to the given piece and setting whatever is needed in it.

piece - Piece that will contain the item.
assetM - Asset manager to use for a any loading.
worth - How much the piece is worth.
override void TheForum.GameCode.Items.MoneyItem.Update ( int  timePassed,
BasePiece  piece,
GameCode.BaseGameBoard  board,
Libraries.AssetManager  assetM 

Update the item and the piece as needed.

timePassed - How long has passed since the previous update.
piece - Piece that contains the item.
board - Board the piece is on.
assetM - Asset manager to use.

Member Data Documentation

How much the piece is worth.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties