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

Equip the specified item automatically replacing an existing one.
public Replace ( InvBaseItem, slot, InvGameItem, item ) : InvGameItem,
slot InvBaseItem,
item InvGameItem,
Результат InvGameItem,
Пример #1
0
    /// <summary>
    /// Replace the observed item with the specified value. Should return the item that was replaced.
    /// </summary>

    override protected InvGameItem Replace(InvGameItem item)
    {
        return((equipment != null) ? equipment.Replace(slot, item) : item);
    }
Пример #2
0
 protected override InvGameItem Replace(InvGameItem item)
 {
     return((!(equipment != null)) ? item : equipment.Replace(slot, item));
 }