Finalize work on the dump controller switching

This commit is contained in:
Michal Pikulski
2025-12-15 10:18:43 +01:00
parent b14fdfbe68
commit 5b33eb8fbb
9 changed files with 211 additions and 1258 deletions

View File

@@ -99,6 +99,33 @@ namespace Minigames.TrashMaze.Core
{
_visionRadius = Mathf.Max(0.1f, radius);
}
#region IInteractingCharacter Override
/// <summary>
/// PulverController-specific interaction movement.
/// Moves Pulver to the interactable using the main character's stop distance.
/// No follower logic since Pulver is alone in the maze.
/// </summary>
public override async System.Threading.Tasks.Task<bool> MoveToInteractableAsync(Interactions.InteractableBase interactable)
{
// Use the same stop distance as main character for consistency
float stopDistance = GameManager.Instance.PlayerStopDistance;
// Calculate stop position
Vector3 stopPoint = Utils.MovementUtilities.CalculateStopPosition(
interactable.transform.position,
transform.position,
stopDistance
);
Logging.Debug($"[PulverController] Moving to interactable {interactable.gameObject.name} at stop distance {stopDistance}");
// Use MovementUtilities to handle movement
return await Utils.MovementUtilities.MoveToPositionAsync(this, stopPoint);
}
#endregion
}
}