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

@@ -43,11 +43,14 @@ namespace RPG.Control
foreach (RaycastHit hit in hits)
{
CombatTarget target = hit.transform.GetComponent<CombatTarget>();
if (target == null) continue;
if (target == null) continue;
if (!GetComponent<Fighter>().CanAttack(target.gameObject))
continue;
if (interactAction.WasPressedThisFrame())
{
//MoveToCursor();
GetComponent<Fighter>().Attack(target);
GetComponent<Fighter>().Attack(target.gameObject);
}
return true;
}