// Summary: // Provides movement vectors based on 2-Dimensional keyboard movement normalised before processing. // Movement vectors provided are the net directions relative to a fixed center. private void OnMovement(InputValue value) { if (pauseChecker.CheckIsPaused()) { return; } playerMovement.SetTriggerIsHeld(value.Get <Vector2>() != Vector2.zero); currentMousePosition = value.Get <Vector2>(); playerMovement.CalculateMovement(centerPosition, currentMousePosition); }
private void FixedUpdate() { if (pauseChecker.CheckIsPaused()) { return; } if (loadoutPosition == LoadoutConfiguration.Pivot) { RotatePivotWeapons(); } if (!isFiring) { return; } FireWeapons(); }
/// <summary> /// Processes all touch input coming through the input system. /// </summary> private void ProcessTouchInput() { if (!pauseChecker.CheckIsPaused()) { activeTouches = UnityEngine.InputSystem.EnhancedTouch.Touch.activeTouches; if (activeTouches.Count > 0) { for (var i = 0; i < activeTouches.Count; i++) { OnJoyStickControl(activeTouches[i]); } } } else { joystick.HidePad(); } }
private void FixedUpdate() { if (pauseChecker.CheckIsPaused()) { playerRB.velocity = Vector2.zero; return; } if (!ValidateRequirements()) { return; } if (isMovementLocked) { return; } RunMovement(); RunRotation(); }