private void UpdateCheckMoveSlice() { AbstractWeapon currentWeaponScript = CurrentWeapon.GetComponent <AbstractWeapon>(); currentWeaponScript.CrosshairGO.SetActive(true); if (inputHdlr.RightKeyHeld && !firing && onGround) { rb.velocity = this.transform.right; billboardScript.IsFlipped = true; } if (inputHdlr.LeftKeyHeld && !firing && onGround) { rb.velocity = this.transform.right; billboardScript.IsFlipped = false; } if (inputHdlr.JumpKeyDown && !firing && onGround) { rb.velocity += Vector3.up * jumpForce; onGround = false; } if (inputHdlr.ChoiceBackKeyDown && !hasFired) { currentWeaponIndex--; if (currentWeaponIndex < 0) { currentWeaponIndex = weaponInstancesList.Count - 1; } SwitchToWeapon(currentWeaponIndex); } if (inputHdlr.ChoiceFwdKeyDown && !hasFired) { currentWeaponIndex++; if (currentWeaponIndex >= weaponInstancesList.Count) { currentWeaponIndex = 0; } SwitchToWeapon(currentWeaponIndex); } if (inputHdlr.UpKeyHeld) { currentWeaponScript.RotateUp(); } if (inputHdlr.DownKeyHeld) { currentWeaponScript.RotateDown(); } if (inputHdlr.ChoiceKeyDown && !hasFired) { hasFired = true; firing = true; } if (inputHdlr.ChoiceKeyHeld && firing) { currentWeaponScript.ChargeShot(); } if (firing && (inputHdlr.ChoiceKeyUp || currentWeaponScript.ShootPower >= currentWeaponScript.MaxShootPower)) { firing = false; turnFinished = true; CurrentWeapon.GetComponent <AbstractWeapon>().CrosshairGO.SetActive(false); turnTimer.SetTurnTime(7f); currentWeaponScript.Fire(); } }