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

Equipment can be worn by the hero
Datei anzeigen Open project: nezbo/Descent Class Usage Examples

Private Properties

Property Type Description
DiceContribution List
SurgeAbilitiesContribution List

Public Methods

Method Description
Clone ( ) : Equipment

Returns a clone of the equipment. The data, and the index will be the same, but the pointer to the object itself will be different

Equals ( object obj ) : bool

Compares a piece of equipment to this one

EquipToHero ( Hero hero ) : void

The equipment will pass abilities on, so the hero is able to use them.

Equipment ( int id, string name, EquipmentType type, EAttackType attackType, EquipmentRarity rarity, int buyPrice, List surgeAbilities, int hands, List abilities, List dice ) : System.Collections.Generic

Initializes a new instance of the Equipment class.

TapEquipment ( ) : void

Taps the piece of equipment

UnequipFromHero ( Hero hero ) : void

The equipment will unattach from a hero

UntapEquipment ( ) : void

Untaps the piece of equipment, even if not tapped

Private Methods

Method Description
DiceContribution ( ) : List

A method that return the dice of the weapon, used to pass on as a delegate.

SurgeAbilitiesContribution ( ) : List

A method that return the surge abilities of the weapon, used to pass on as a delegate

Method Details

Clone() public method

Returns a clone of the equipment. The data, and the index will be the same, but the pointer to the object itself will be different
public Clone ( ) : Equipment
return Equipment

Equals() public method

Compares a piece of equipment to this one
public Equals ( object obj ) : bool
obj object /// The obj to be compared ///
return bool

EquipToHero() public method

The equipment will pass abilities on, so the hero is able to use them.
public EquipToHero ( Hero hero ) : void
hero Hero /// The hero that equips the equipment ///
return void

Equipment() public method

Initializes a new instance of the Equipment class.
public Equipment ( int id, string name, EquipmentType type, EAttackType attackType, EquipmentRarity rarity, int buyPrice, List surgeAbilities, int hands, List abilities, List dice ) : System.Collections.Generic
id int /// The unique id of the equipment ///
name string /// The name of the equipment ///
type EquipmentType /// The equipments type ///
attackType EAttackType /// The attack type of the equipment ///
rarity EquipmentRarity /// The rarity of the equipment ///
buyPrice int /// The buy price of the equipment /// This is 0 if the equipments rarity is not common ///
surgeAbilities List /// The surge abilities, if the equipment is a weapon ///
hands int /// The number of hands it takes to wield, if the equipment is a weapon ///
abilities List /// The abilities that the equipment have ///
dice List /// The dice that the equipment has ///
return System.Collections.Generic

TapEquipment() public method

Taps the piece of equipment
public TapEquipment ( ) : void
return void

UnequipFromHero() public method

The equipment will unattach from a hero
public UnequipFromHero ( Hero hero ) : void
hero Hero /// The hero to ///
return void

UntapEquipment() public method

Untaps the piece of equipment, even if not tapped
public UntapEquipment ( ) : void
return void