Example #1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Q))
        {
            var mountedItem = GetItem(equipPoint);
            var stashedItem = GetItem(stashPoint);


            //if (stashedItem != null)


            if (mountedItem != null)
            {
                playerEquip.UnEquip(mountedItem.gameObject);
            }

            if (stashedItem != null)
            {
                playerEquip.Equip(stashedItem.gameObject);
                stashedItem.transform.parent = equipPoint;
            }
        }
    }