Start AI COntroller
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user