// Update is called once per frame private void Update() { RotateView(); if (_underWater.IsSubmerged()) { return; } // The jump state needs to read here to make sure it is not missed if (!_mana.IsFocusing()) { if (!_jump) { _jump = CrossPlatformInputManager.GetButtonDown("Jump"); } } if (!_previouslyGrounded && _characterController.isGrounded) { StartCoroutine(_jumpBob.DoBobCycle()); PlayLandingSound(); _moveDir.y = 0f; _jumping = false; } if (!_characterController.isGrounded && !_jumping && _previouslyGrounded) { _moveDir.y = 0f; } _previouslyGrounded = _characterController.isGrounded; }