Basic enemy attack pattern

This commit is contained in:
2024-09-04 23:05:49 -07:00
parent 6fc9568137
commit 54d9dcf9fa
14 changed files with 282 additions and 54 deletions

View File

@@ -23,9 +23,7 @@ namespace GameJamDungeon
}
if (enemy.GlobalPosition.DistanceTo(gameRepo.PlayerGlobalPosition.Value) > 20f)
{
return To<Idle>();
}
enemy.NavAgent.TargetPosition = gameRepo.PlayerGlobalPosition.Value;
var nextPosition = enemy.NavAgent.GetNextPathPosition();