private void switchWeaponByIndex(int weaponIndex) { bool result = gameManagement.ChangeWeaponByIndex(weaponIndex); if (result) { activeWeapon.gameObject.SetActive(false); activeWeapon = gameManagement.WeaponsInventory[gameManagement.ActiveWeaponID]; activeWeapon.gameObject.SetActive(true); } }