private void Patrol() { _movement.ClearHorizontalMovement(); _animation = string.Empty; ChangeDirections(); MoveInDirection(); }
private void StrikeUnguardedArea() { if (!_sense.DetectedPlayer) { return; } bool shouldCrouch = !_sense.PlayerState.isCrouching; if (DebugMode) { Debug.Log((shouldCrouch ? "Crouching" : "Standing") + " to strike the player where they're not guarding!"); } _movement.ClearHorizontalMovement(); PerformAttack(shouldCrouch); }
private void PrepMovementFrame() { _movement.ClearHorizontalMovement(); _isMovingHorizontally = false; // If you're previously hit, you're hit until you're grounded again. if (_isHit) { _isHit = _movement.MovementType != SidescrollingMovementType.Grounded; } }
private void SpamMagic() { _movement.ClearHorizontalMovement(); if (_spiralProjectileSpam.IsDoneSpamming) { LogMessage("Done spamming magic! Time to attack."); AdvanceToNextAiPhase(); return; } _spiralProjectileSpam.FireSomeSpam(); }
private void CheckHorizontal() { if (!Input.GetButton("Horizontal")) { isMovingHorizontally = false; _movement.ClearHorizontalMovement(); return; } isFacingRight = Input.GetAxis("Horizontal") > 0; if (isCrouching) { return; } DebugMessage("The player is moving!"); isMovingHorizontally = true; _movement.MoveHorizontally(isFacingRight); }
public void BeStill() { _movement.ClearHorizontalMovement(); }