C#Code
C#Code
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
TheForum.GameCode.Items.BasePieceItem Class Reference
Inheritance diagram for TheForum.GameCode.Items.BasePieceItem:
TheForum.GameCode.Items.AccountantItem TheForum.GameCode.Items.BandwagonItem TheForum.GameCode.Items.BandwagonItem TheForum.GameCode.Items.ExpensesItem TheForum.GameCode.Items.FrogSirenItem TheForum.GameCode.Items.FrogSirenItem TheForum.GameCode.Items.GenericTextureItem TheForum.GameCode.Items.MoneyItem TheForum.GameCode.Items.ProbationItem TheForum.GameCode.Items.ProbationItem TheForum.GameCode.Items.TaxFraudItem TheForum.GameCode.Items.UnknownItem TheForum.GameCode.Items.WordsItem TheForum.GameCode.Items.WordsItem

List of all members.

Public Member Functions

 BasePieceItem ()
abstract void Update (int framesPassed, BasePiece piece, BaseGameBoard board, Libraries.AssetManager assetM)
abstract void Render (GraphicsDevice device)
abstract void RemoveFromPiece (BasePiece piece)
bool ShouldRemove ()
virtual void HandleSwapOccured (int col, int row)
virtual void HandlePosted (BasePiece piece)
bool AllowSwap ()
abstract bool IsItemType (Libraries.StringType type)
abstract Libraries.StringType GetItemType ()
void SetSounds (String pickUpSoundID, String dropSoundID)
Libraries.StringType GetPickupSoundID ()
Libraries.StringType GetDropSoundID ()
 BasePieceItem ()
abstract void Update (int framesPassed, BasePiece piece, BaseGameBoard board, Libraries.AssetManager assetM)
abstract void Render (GraphicsDevice device)
abstract void RemoveFromPiece (BasePiece piece)
bool ShouldRemove ()
virtual void HandleSwapOccured (int col, int row)
virtual void HandlePosted (BasePiece piece)
bool AllowSwap ()

Protected Member Functions

void SetAllowSwap (bool allow)
void SetAllowSwap (bool allow)

Protected Attributes

bool m_removeFromPiece
 True if the item should be removed from the piece.

Private Attributes

bool m_allowSwap
 wether the item blocks swapping the piece. Value is true if the piece that has the item is allowed to be swapped, false if not.
Libraries.StringType m_pickUpSoundID
 ID of the sound to play when a piece containing the item is picked up on the the board.
Libraries.StringType m_dropSoundID
 ID of the sound to play when a piece containing the item is dropped on the board.

Detailed Description

Base class that game piece items should derive from. Piece items are the special items that go with a piece and cause some effect, when removed or left. It should be stored in the piece it goes with.


Constructor & Destructor Documentation

TheForum.GameCode.Items.BasePieceItem.BasePieceItem ( )

Default constructor.

TheForum.GameCode.Items.BasePieceItem.BasePieceItem ( )

Default constructor.


Member Function Documentation

bool TheForum.GameCode.Items.BasePieceItem.AllowSwap ( )

Handle any special triggering that should occur if the item is swapped.

bool TheForum.GameCode.Items.BasePieceItem.AllowSwap ( )

Handle any special triggering that should occur if the item is swapped.

Libraries.StringType TheForum.GameCode.Items.BasePieceItem.GetDropSoundID ( )

Gets the ID of the sound to use when the piece containing the item is dropped.

Return:
Value is the sound ID if stored.

abstract Libraries.StringType TheForum.GameCode.Items.BasePieceItem.GetItemType ( ) [pure virtual]
Libraries.StringType TheForum.GameCode.Items.BasePieceItem.GetPickupSoundID ( )

Gets the ID of the sound to use when the piece containing the item is picked up.

Return:
Value is the sound ID if stored.

virtual void TheForum.GameCode.Items.BasePieceItem.HandlePosted ( BasePiece  piece) [virtual]

Handle any special triggering that should occur if the piece the item is with gets posted.

piece - Piece the item is in.

Reimplemented in TheForum.GameCode.Items.AccountantItem, TheForum.GameCode.Items.WordsItem, and TheForum.GameCode.Items.WordsItem.

virtual void TheForum.GameCode.Items.BasePieceItem.HandlePosted ( BasePiece  piece) [virtual]

Handle any special triggering that should occur if the piece the item is with gets posted.

piece - Piece the item is in.

Reimplemented in TheForum.GameCode.Items.AccountantItem, TheForum.GameCode.Items.WordsItem, and TheForum.GameCode.Items.WordsItem.

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

Handle any special triggering that should occur if the item is swapped.

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

Reimplemented in TheForum.GameCode.Items.GenericTextureItem, TheForum.GameCode.Items.MoneyItem, TheForum.GameCode.Items.ProbationItem, TheForum.GameCode.Items.TaxFraudItem, and TheForum.GameCode.Items.ProbationItem.

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

Handle any special triggering that should occur if the item is swapped.

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

Reimplemented in TheForum.GameCode.Items.GenericTextureItem, TheForum.GameCode.Items.MoneyItem, TheForum.GameCode.Items.ProbationItem, TheForum.GameCode.Items.TaxFraudItem, and TheForum.GameCode.Items.ProbationItem.

abstract bool TheForum.GameCode.Items.BasePieceItem.IsItemType ( Libraries.StringType  type) [pure virtual]
abstract void TheForum.GameCode.Items.BasePieceItem.RemoveFromPiece ( BasePiece  piece) [pure virtual]
abstract void TheForum.GameCode.Items.BasePieceItem.RemoveFromPiece ( BasePiece  piece) [pure virtual]
abstract void TheForum.GameCode.Items.BasePieceItem.Render ( GraphicsDevice  device) [pure virtual]
abstract void TheForum.GameCode.Items.BasePieceItem.Render ( GraphicsDevice  device) [pure virtual]
void TheForum.GameCode.Items.BasePieceItem.SetAllowSwap ( bool  allow) [protected]

Set wether the item blocks the piece from being swapped.

allow - wether the item is allowed to be swapped. Value is true if it is, false if not.
void TheForum.GameCode.Items.BasePieceItem.SetAllowSwap ( bool  allow) [protected]

Set wether the item blocks the piece from being swapped.

allow - wether the item is allowed to be swapped. Value is true if it is, false if not.
void TheForum.GameCode.Items.BasePieceItem.SetSounds ( String  pickUpSoundID,
String  dropSoundID 
)

Sets the sounds to use for the item.

pickUpSoundID - What to play when the piece is picked up from the board.
dropSoundID - What to play when the piece is dropped onto the board.
pieceDims - Dimensions of the piece in world space.

Return:
Value is a clone of the stored string that represents the deffintion type, null if not set.
bool TheForum.GameCode.Items.BasePieceItem.ShouldRemove ( )

Get wether the item should be removed from the piece it is attached to.

Return:
Value is true if the item should be removed, false if not.

bool TheForum.GameCode.Items.BasePieceItem.ShouldRemove ( )

Get wether the item should be removed from the piece it is attached to.

Return:
Value is true if the item should be removed, false if not.

abstract void TheForum.GameCode.Items.BasePieceItem.Update ( int  framesPassed,
BasePiece  piece,
BaseGameBoard  board,
Libraries.AssetManager  assetM 
) [pure virtual]

Update the item and the piece as needed.

framesPassed - How long has passed since the previous update.
piece - Piece that contains the item.
board - Board the piece is on. Pass null if not needed.
assetM - Asset manager to use for a any loading.

Implemented in TheForum.GameCode.Items.BandwagonItem, TheForum.GameCode.Items.ExpensesItem, and TheForum.GameCode.Items.BandwagonItem.

abstract void TheForum.GameCode.Items.BasePieceItem.Update ( int  framesPassed,
BasePiece  piece,
BaseGameBoard  board,
Libraries.AssetManager  assetM 
) [pure virtual]

Update the item and the piece as needed.

framesPassed - How long has passed since the previous update.
piece - Piece that contains the item.
board - Board the piece is on. Pass null if not needed.
assetM - Asset manager to use for a any loading.

Implemented in TheForum.GameCode.Items.BandwagonItem, TheForum.GameCode.Items.ExpensesItem, and TheForum.GameCode.Items.BandwagonItem.


Member Data Documentation

wether the item blocks swapping the piece. Value is true if the piece that has the item is allowed to be swapped, false if not.

ID of the sound to play when a piece containing the item is dropped on the board.

ID of the sound to play when a piece containing the item is picked up on the the board.

True if the item should be removed from the piece.


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