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

The inventory of a hero
Показать файл Открыть проект Примеры использования класса

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

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

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

Метод Описание
CanEquipAtIndex ( int slot, Equipment equipment ) : bool
ObjectInvariant ( ) : void

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

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

Do you have enough hands left to equip this weapon?
public CanEquipWeapon ( Equipment equipment ) : bool
equipment Equipment /// A piece of equipment. ///
Результат bool

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

Equip an armor
public EquipArmor ( Equipment armor ) : void
armor Equipment /// The armor to be equipped ///
Результат void

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

Places a potion in the first
public EquipPotion ( Equipment potion ) : void
potion Equipment /// The potion to be equipped ///
Результат void

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

Equip a shield.
public EquipShield ( Equipment shield ) : void
shield Equipment /// The shield to be equipped ///
Результат void

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

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

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

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

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

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

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

Equip a weapon
public EquipWeapon ( Equipment weapon ) : void
weapon Equipment /// The weapon to be equipped ///
Результат void

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

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

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

Unequip the armor.
public UnequipArmor ( ) : Equipment
Результат Equipment

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

Returns and removes a equipment from the backpack.
public UnequipFromBackpack ( int index ) : Equipment
index int /// The index from where to remove. ///
Результат Equipment

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

Unequips an other item, and returns it
public UnequipFromOther ( int index ) : Equipment
index int /// The index from where to remove. ///
Результат Equipment

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

Returns and removes a potion from the inventory
public UnequipFromPotions ( int index ) : Equipment
index int /// The index from where to remove the potion ///
Результат Equipment

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

Unequip the shield.
public UnequipShield ( ) : Equipment
Результат Equipment

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

Unequip the weapon.
public UnequipWeapon ( ) : Equipment
Результат Equipment

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

Gets an equipment at a
public this ( int slot ) : Equipment
slot int /// The slot to access in the inventory ///
Результат Equipment