コード例 #1
0
    //Adds the weaponYouCanEquip to the inventory list and sets it parent to the entity hand
    private void EquipWeapon()
    {
        try
        {
            weaponYouCanEquip.gameObject.transform.SetParent(entityHand.transform);
            inventoryList.Add(weaponYouCanEquip);

            SetWeaponPosition(weaponYouCanEquip.transform);
            SelectWeapon();

            floatingText.HideFloatingText();

            if (isPlayer)
            {
                playerUserInterface.UpdateDisplay();
            }
        }
        catch
        {
            Debug.Log("No Weapon to equip");
        }
    }