示例#1
0
        public override void NotifyItemEquipped(EquippableSlot equipSlot, uint amountEquipped)
        {
            m_Handler = (equipSlot.characterCollection.character as MonoBehaviour).GetComponent <NeoInventoryFirstPersonItemHandler>();
            if (m_Handler != null)
            {
                m_Handler.EquipItem(this);
            }

            base.NotifyItemEquipped(equipSlot, amountEquipped);
        }
示例#2
0
        public void Attach(NeoInventoryFirstPersonItemHandler h, NeoInventoryEquippableItem i)
        {
            handler       = h;
            inventoryItem = i;

            var t = transform;

            t.SetParent(handler.itemRoot);
            t.localPosition = Vector3.zero;
            t.localRotation = Quaternion.identity;
            t.localScale    = Vector3.one;
        }