public void Stop(InventoryObject _inventory) { if (base.Stop() && _inventory != null) { _inventory.Action(this); } }
public void Update(InventoryObject _inventory) { if (_inventory == null) { return; } if (base.Update()) { _inventory.Action(this); } }
public void Update(InventoryObject _inventory) { if (!Enabled || _inventory == null) { return; } foreach (InventoryActionDataObject _action in ActionList) { _action.Update(_inventory); } }
public void Insert(InventoryObject _inventory) { if (_inventory == null) { return; } foreach (InventorySlotObject _slot in _inventory.Slots) { _slot.Amount = Insert(_slot.ItemName, _slot.Amount); } }
public void Stop(ICEWorldBehaviour _component) { InventoryObject _inventory = null; ICECreatureControl _control = _component as ICECreatureControl; if (_control != null) { _inventory = _control.Creature.Status.Inventory; } foreach (InventoryActionDataObject _action in ActionList) { _action.Stop(_inventory); } }
public static InventorySlotObject GetInventorySlot(GameObject _object, string _slot) { if (_object == null) { return(null); } InventoryObject _inventory = GetInventory(_object); if (_inventory != null) { return(_inventory.GetSlotByItemName(_slot)); } else { return(null); } }
public void Copy(InventoryObject _inventory) { if (_inventory == null) { return; } base.Copy(_inventory); MaxSlots = _inventory.MaxSlots; IgnoreInventoryOwner = _inventory.IgnoreInventoryOwner; DefaultDropRange = _inventory.DefaultDropRange; LastCollectedObjectID = _inventory.LastCollectedObjectID; UseDetachOnDie = _inventory.UseDetachOnDie; Slots.Clear(); foreach (InventorySlotObject _slot in _inventory.Slots) { Slots.Add(new InventorySlotObject(OwnerComponent, _slot)); } }
public static InventoryObject GetInventory(GameObject _object) { if (_object == null) { return(null); } ICECreatureEntity _entity = _object.GetComponent <ICECreatureEntity>(); InventoryObject _inventory = null; if (_entity != null) { if (_entity as ICECreatureControl != null) { ICECreatureControl _creature = _entity as ICECreatureControl; if (_creature != null) { _inventory = _creature.Creature.Status.Inventory; } } else if (_entity as ICECreaturePlayer != null) { ICECreaturePlayer _player = _entity as ICECreaturePlayer; if (_player != null) { _inventory = _player.Inventory; } } else if (_entity as ICECreatureItem != null) { ICECreatureItem _item = _entity as ICECreatureItem; if (_item != null) { _inventory = _item.Inventory; } } } return(_inventory); }
public InventoryObject(InventoryObject _inventory) : base(_inventory) { }