Basic enemy attack pattern
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user