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

The inventory of a hero
Afficher le fichier Open project: nezbo/Descent Class Usage Examples

Méthodes publiques

Méthode Description
CanEquipWeapon ( Equipment equipment ) : bool

Do you have enough hands left to equip this weapon?

EquipArmor ( Equipment armor ) : void

Equip an armor

EquipPotion ( Equipment potion ) : void

Places a potion in the first

EquipShield ( Equipment shield ) : void

Equip a shield.

EquipToBackpack ( int index, Equipment item ) : void

Equip an item to backpack.

EquipToOther ( int index, Equipment item ) : void

Equip an item to 'other'.

EquipToPotions ( int index, Equipment item ) : void

Equip an item to potions.

EquipWeapon ( Equipment weapon ) : void

Equip a weapon

Inventory ( Hero hero ) : System.Diagnostics.Contracts

Initializes a new instance of the Inventory class. The inventory of a hero

UnequipArmor ( ) : Equipment

Unequip the armor.

UnequipFromBackpack ( int index ) : Equipment

Returns and removes a equipment from the backpack.

UnequipFromOther ( int index ) : Equipment

Unequips an other item, and returns it

UnequipFromPotions ( int index ) : Equipment

Returns and removes a potion from the inventory

UnequipShield ( ) : Equipment

Unequip the shield.

UnequipWeapon ( ) : Equipment

Unequip the weapon.

this ( int slot ) : Equipment

Gets an equipment at a

Private Methods

Méthode Description
CanEquipAtIndex ( int slot, Equipment equipment ) : bool
ObjectInvariant ( ) : void

Method Details

CanEquipWeapon() public méthode

Do you have enough hands left to equip this weapon?
public CanEquipWeapon ( Equipment equipment ) : bool
equipment Equipment /// A piece of equipment. ///
Résultat bool

EquipArmor() public méthode

Equip an armor
public EquipArmor ( Equipment armor ) : void
armor Equipment /// The armor to be equipped ///
Résultat void

EquipPotion() public méthode

Places a potion in the first
public EquipPotion ( Equipment potion ) : void
potion Equipment /// The potion to be equipped ///
Résultat void

EquipShield() public méthode

Equip a shield.
public EquipShield ( Equipment shield ) : void
shield Equipment /// The shield to be equipped ///
Résultat void

EquipToBackpack() public méthode

Equip an item to backpack.
public EquipToBackpack ( int index, Equipment item ) : void
index int The index where the item should be placed.
item Equipment The item to place.
Résultat void

EquipToOther() public méthode

Equip an item to 'other'.
public EquipToOther ( int index, Equipment item ) : void
index int The index where the item should be placed.
item Equipment The item to place.
Résultat void

EquipToPotions() public méthode

Equip an item to potions.
public EquipToPotions ( int index, Equipment item ) : void
index int The indexwhere the item should be placed.
item Equipment The item to place.
Résultat void

EquipWeapon() public méthode

Equip a weapon
public EquipWeapon ( Equipment weapon ) : void
weapon Equipment /// The weapon to be equipped ///
Résultat void

Inventory() public méthode

Initializes a new instance of the Inventory class. The inventory of a hero
public Inventory ( Hero hero ) : System.Diagnostics.Contracts
hero Hero /// The hero, that has this inventory. ///
Résultat System.Diagnostics.Contracts

UnequipArmor() public méthode

Unequip the armor.
public UnequipArmor ( ) : Equipment
Résultat Equipment

UnequipFromBackpack() public méthode

Returns and removes a equipment from the backpack.
public UnequipFromBackpack ( int index ) : Equipment
index int /// The index from where to remove. ///
Résultat Equipment

UnequipFromOther() public méthode

Unequips an other item, and returns it
public UnequipFromOther ( int index ) : Equipment
index int /// The index from where to remove. ///
Résultat Equipment

UnequipFromPotions() public méthode

Returns and removes a potion from the inventory
public UnequipFromPotions ( int index ) : Equipment
index int /// The index from where to remove the potion ///
Résultat Equipment

UnequipShield() public méthode

Unequip the shield.
public UnequipShield ( ) : Equipment
Résultat Equipment

UnequipWeapon() public méthode

Unequip the weapon.
public UnequipWeapon ( ) : Equipment
Résultat Equipment

this() public méthode

Gets an equipment at a
public this ( int slot ) : Equipment
slot int /// The slot to access in the inventory ///
Résultat Equipment