private void Slide() { bool isSlidingEnabled = _groundedRaycastDetector.IsGroundedOnLayers() && _joystick.Vertical <= -0.80 && !isSliding; if (isSlidingEnabled) { StartCoroutine(SlideControl()); } }
public void JumpButtonHit() { if (!_player.IsAlive() || _bodyCapsuleCollider2D.IsTouchingLayers(LayerMask.GetMask("Ladders"))) { return; } if (_groundedRaycastDetector.IsGroundedOnLayers()) { Jump(jumpSpeed); } else if (_circleCollider2d.IsTouchingLayers(LayerMask.GetMask("Ground"))) { StartCoroutine(WallJump()); } }