C# Class InvEquipment, Pharos

Inheritance: MonoBehaviour
Show file Open project: rstaewen/Pharos Class Usage Examples

Public Methods

Method Description
Equip ( InvGameItem, item ) : InvGameItem,

Equip the specified item and return the item that was replaced.

GetItem ( InvBaseItem, slot ) : InvGameItem,

Retrieves the item in the specified slot.

HasEquipped ( InvBaseItem, slot ) : bool

Whether the specified slot currently has an item equipped.

HasEquipped ( InvGameItem, item ) : bool

Whether the specified item is currently equipped.

Replace ( InvBaseItem, slot, InvGameItem, item ) : InvGameItem,

Equip the specified item automatically replacing an existing one.

Unequip ( InvBaseItem, slot ) : InvGameItem,

Unequip the item from the specified slot, returning the item that was unequipped.

Unequip ( InvGameItem, item ) : InvGameItem,

Unequip the specified item, returning it if the operation was successful.

Private Methods

Method Description
doReplace ( InvBaseItem, slot, InvGameItem, item, InvBaseItem, baseItem ) : InvGameItem,

Method Details

Equip() public method

Equip the specified item and return the item that was replaced.
public Equip ( InvGameItem, item ) : InvGameItem,
item InvGameItem,
return InvGameItem,

GetItem() public method

Retrieves the item in the specified slot.
public GetItem ( InvBaseItem, slot ) : InvGameItem,
slot InvBaseItem,
return InvGameItem,

HasEquipped() public method

Whether the specified slot currently has an item equipped.
public HasEquipped ( InvBaseItem, slot ) : bool
slot InvBaseItem,
return bool

HasEquipped() public method

Whether the specified item is currently equipped.
public HasEquipped ( InvGameItem, item ) : bool
item InvGameItem,
return bool

Replace() public method

Equip the specified item automatically replacing an existing one.
public Replace ( InvBaseItem, slot, InvGameItem, item ) : InvGameItem,
slot InvBaseItem,
item InvGameItem,
return InvGameItem,

Unequip() public method

Unequip the item from the specified slot, returning the item that was unequipped.
public Unequip ( InvBaseItem, slot ) : InvGameItem,
slot InvBaseItem,
return InvGameItem,

Unequip() public method

Unequip the specified item, returning it if the operation was successful.
public Unequip ( InvGameItem, item ) : InvGameItem,
item InvGameItem,
return InvGameItem,