public override void DropItemHeld() { if (ItemHeld == null) { return; } if (ItemHeld.name.Contains("SailorCap")) { if (!capDonned) { sailorCap = ItemHeld; sailorCap.SortCompResetToBase(capParent); sailorCap.transform.localPosition = capPosLocal; sailorCap.transform.rotation = Quaternion.identity; sailorCap.CharHeldBy = this; itemsWorn.Add(sailorCap); capDonned = true; sailorCap.EnableMouseTracking(true); lvlMngr.OnDeselection(sailorCap); sailorCap.InUse = false; ItemHeld = null; return; } } base.DropItemHeld(); }
public void HoldItem(ItemBase item) { ItemHeld = item; ItemWeight += item.Weight; lvlMngr.ConfirmItemSelection(this, item); item.InUse = true; item.CharHeldBy = this; item.EnableMouseTracking(false); item.MoveToCharHand(trans_ItemUseHand); }