C# Class Descent.Model.Player.Figure.Figure

A generic figure, either a hero or a monster
Inheritance: Drawable
显示文件 Open project: nezbo/Descent Class Usage Examples

Protected Properties

Property Type Description
abilities List
armor int
attacksLeft int
diceForAttacks List
effects List
health int
maxHealth int
movementLeft int
name string
speed int
surgeAbilities List
texture Microsoft.Xna.Framework.Graphics.Texture2D
uniqueID int

Public Methods

Method Description
AddAbility ( Ability ability ) : void

Adds an ability to the list of abilities for this figure

AddAttack ( ) : void

Add one attack.

AddHealth ( int amount ) : void

Adds a number of health to the health total, up to the max health

AddMovement ( int amount ) : void

Adds speed to the speed total

Figure ( int id, string name, Rectangle size ) : System.Collections.Generic

Initializes a new instance of the Figure class.

GetAttack ( Point targetSquare ) : Attack

Gets an attack instance with the attacking figure, different bonuses, and the dice attacking

Initialize ( ) : void

Call when the game is about to start, so the figure gets life

RemoveAttack ( ) : void

Remove one attack.

RemoveHealth ( int amount ) : void

Removes a number of health to the health total, down to 0

RemoveMovement ( int amount ) : void

Removes speed to the speed total, down to 0

SetAttacks ( int amount ) : void

Sets how many attacks the hero has (without bonus). Used at the start of the hero's turn.

SetMovement ( int amount ) : void

Sets the movement left equal to the amount.

Private Methods

Method Description
ObjectInvariant ( ) : void

Method Details

AddAbility() public method

Adds an ability to the list of abilities for this figure
public AddAbility ( Ability ability ) : void
ability Descent.Model.Event.Ability /// The ability to be added ///
return void

AddAttack() public method

Add one attack.
public AddAttack ( ) : void
return void

AddHealth() public method

Adds a number of health to the health total, up to the max health
public AddHealth ( int amount ) : void
amount int /// The amount to be added ///
return void

AddMovement() public method

Adds speed to the speed total
public AddMovement ( int amount ) : void
amount int /// The amount to be added ///
return void

Figure() public method

Initializes a new instance of the Figure class.
public Figure ( int id, string name, Rectangle size ) : System.Collections.Generic
id int /// The id of the figure ///
name string /// The name of the figure ///
size Microsoft.Xna.Framework.Rectangle /// The size of the figure ///
return System.Collections.Generic

GetAttack() public method

Gets an attack instance with the attacking figure, different bonuses, and the dice attacking
public GetAttack ( Point targetSquare ) : Attack
targetSquare Microsoft.Xna.Framework.Point /// The target point where the figure is attacking ///
return Descent.Model.Event.Attack

Initialize() public method

Call when the game is about to start, so the figure gets life
public Initialize ( ) : void
return void

RemoveAttack() public method

Remove one attack.
public RemoveAttack ( ) : void
return void

RemoveHealth() public method

Removes a number of health to the health total, down to 0
public RemoveHealth ( int amount ) : void
amount int /// The amount to be removed ///
return void

RemoveMovement() public method

Removes speed to the speed total, down to 0
public RemoveMovement ( int amount ) : void
amount int /// The amount to be removed ///
return void

SetAttacks() public method

Sets how many attacks the hero has (without bonus). Used at the start of the hero's turn.
public SetAttacks ( int amount ) : void
amount int /// The amount of attacks ///
return void

SetMovement() public method

Sets the movement left equal to the amount.
public SetMovement ( int amount ) : void
amount int /// The amount of movement ///
return void

Property Details

abilities protected_oe property

protected List abilities
return List

armor protected_oe property

protected int armor
return int

attacksLeft protected_oe property

protected int attacksLeft
return int

diceForAttacks protected_oe property

protected List diceForAttacks
return List

effects protected_oe property

protected List effects
return List

health protected_oe property

protected int health
return int

maxHealth protected_oe property

protected int maxHealth
return int

movementLeft protected_oe property

protected int movementLeft
return int

name protected_oe property

protected string name
return string

speed protected_oe property

protected int speed
return int

surgeAbilities protected_oe property

protected List surgeAbilities
return List

texture protected_oe property

protected Texture2D,Microsoft.Xna.Framework.Graphics texture
return Microsoft.Xna.Framework.Graphics.Texture2D

uniqueID protected_oe property

protected int uniqueID
return int