private async void WeaponSwitching() { if (isSwitching) { var shootingState = PlayerStateController.FindState <ShootingState>(); shootingState?.Stop(); return; } if (Input.GetAxis("Mouse ScrollWheel") == 0) { return; } isSwitching = true; await new WaitForSeconds(timeToSwitch); if (ShootingState.currentGun == ShootingState.GunType.Primary) { ShootingState.currentGun = ShootingState.GunType.Secondary; } else if (ShootingState.currentGun == ShootingState.GunType.Secondary) { ShootingState.currentGun = ShootingState.GunType.Primary; } weaponSwitching.Switch(); isSwitching = false; }