Пример #1
0
    public void SwitchWeapon()
    {
        weaponSlot += 1;
        if (weaponSlot >= inventoryWeaponsList.Count)
        {
            weaponSlot = 0;
        }

        currentWeapon = inventoryWeaponsList[weaponSlot];
        AdjustParametersForNewWeapon();


        foreach (GameObject WeaponModel in WeaponModels)
        {
            if (currentWeapon.weaponName == WeaponModel.name)
            {
                WeaponModel.SetActive(true);
            }
            else
            {
                WeaponModel.SetActive(false);
            }
        }
    }