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

A generic figure, either a hero or a monster
Inheritance: Drawable
Afficher le fichier Open project: nezbo/Descent Class Usage Examples

Protected Properties

Свойство 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

Méthodes publiques

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

Méthode Description
ObjectInvariant ( ) : void

Method Details

AddAbility() public méthode

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

AddAttack() public méthode

Add one attack.
public AddAttack ( ) : void
Résultat void

AddHealth() public méthode

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

AddMovement() public méthode

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

Figure() public méthode

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 ///
Résultat System.Collections.Generic

GetAttack() public méthode

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 ///
Résultat Descent.Model.Event.Attack

Initialize() public méthode

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

RemoveAttack() public méthode

Remove one attack.
public RemoveAttack ( ) : void
Résultat void

RemoveHealth() public méthode

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

RemoveMovement() public méthode

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

SetAttacks() public méthode

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

SetMovement() public méthode

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

Property Details

abilities protected_oe property

protected List abilities
Résultat List

armor protected_oe property

protected int armor
Résultat int

attacksLeft protected_oe property

protected int attacksLeft
Résultat int

diceForAttacks protected_oe property

protected List diceForAttacks
Résultat List

effects protected_oe property

protected List effects
Résultat List

health protected_oe property

protected int health
Résultat int

maxHealth protected_oe property

protected int maxHealth
Résultat int

movementLeft protected_oe property

protected int movementLeft
Résultat int

name protected_oe property

protected string name
Résultat string

speed protected_oe property

protected int speed
Résultat int

surgeAbilities protected_oe property

protected List surgeAbilities
Résultat List

texture protected_oe property

protected Texture2D,Microsoft.Xna.Framework.Graphics texture
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

uniqueID protected_oe property

protected int uniqueID
Résultat int