Start AI COntroller

This commit is contained in:
Caleb Sandford deQuincey
2025-10-28 17:26:07 +00:00
parent bc21e94bc1
commit 1972134c81
724 changed files with 579740 additions and 2918 deletions

View File

@@ -1,11 +1,11 @@
using RPG.Combat;
using RPG.Core;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.InputSystem;
namespace RPG.Movement
{
public class Mover : MonoBehaviour
public class Mover : MonoBehaviour, IAction
{
[SerializeField] private Transform target;
@@ -26,7 +26,7 @@ namespace RPG.Movement
}
public void StartMoveAction(Vector3 destination)
{
GetComponent<Fighter>().Cancel();
GetComponent<ActionScheduler>().StartAction(this);
MoveTo(destination);
}
@@ -35,7 +35,7 @@ namespace RPG.Movement
navMeshAgent.destination = destination;
navMeshAgent.isStopped = false;
}
public void Stop()
public void Cancel()
{
navMeshAgent.isStopped = true;
}