C# Класс Descent.Model.Player.Figure.Figure

A generic figure, either a hero or a monster
Наследование: Drawable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
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

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
ObjectInvariant ( ) : void

Описание методов

AddAbility() публичный Метод

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 ///
Результат void

AddAttack() публичный Метод

Add one attack.
public AddAttack ( ) : void
Результат void

AddHealth() публичный Метод

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 ///
Результат void

AddMovement() публичный Метод

Adds speed to the speed total
public AddMovement ( int amount ) : void
amount int /// The amount to be added ///
Результат void

Figure() публичный Метод

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 ///
Результат System.Collections.Generic

GetAttack() публичный Метод

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 ///
Результат Descent.Model.Event.Attack

Initialize() публичный Метод

Call when the game is about to start, so the figure gets life
public Initialize ( ) : void
Результат void

RemoveAttack() публичный Метод

Remove one attack.
public RemoveAttack ( ) : void
Результат void

RemoveHealth() публичный Метод

Removes a number of health to the health total, down to 0
public RemoveHealth ( int amount ) : void
amount int /// The amount to be removed ///
Результат void

RemoveMovement() публичный Метод

Removes speed to the speed total, down to 0
public RemoveMovement ( int amount ) : void
amount int /// The amount to be removed ///
Результат void

SetAttacks() публичный Метод

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 ///
Результат void

SetMovement() публичный Метод

Sets the movement left equal to the amount.
public SetMovement ( int amount ) : void
amount int /// The amount of movement ///
Результат void

Описание свойств

abilities защищенное свойство

protected List abilities
Результат List

armor защищенное свойство

protected int armor
Результат int

attacksLeft защищенное свойство

protected int attacksLeft
Результат int

diceForAttacks защищенное свойство

protected List diceForAttacks
Результат List

effects защищенное свойство

protected List effects
Результат List

health защищенное свойство

protected int health
Результат int

maxHealth защищенное свойство

protected int maxHealth
Результат int

movementLeft защищенное свойство

protected int movementLeft
Результат int

name защищенное свойство

protected string name
Результат string

speed защищенное свойство

protected int speed
Результат int

surgeAbilities защищенное свойство

protected List surgeAbilities
Результат List

texture защищенное свойство

protected Texture2D,Microsoft.Xna.Framework.Graphics texture
Результат Microsoft.Xna.Framework.Graphics.Texture2D

uniqueID защищенное свойство

protected int uniqueID
Результат int