public void OnStart() { for (var index = 0; index < CountBot; index++) { var tempBot = Object.Instantiate(Main.Instance.RefBotPrefab, Patrol.GenericPoint(Main.Instance.SpawnPoint), Quaternion.identity); tempBot.Agent.avoidancePriority = index; tempBot.Target = Main.Instance.Player; AddBotToList(tempBot); } }
public void Initialization() { for (var index = 0; index < _countBot; index++) { var tempBot = Object.Instantiate(ServiceLocatorMonoBehaviour.GetService <Reference>().Bot, Patrol.GenericPoint(ServiceLocatorMonoBehaviour.GetService <CharacterController>().transform), Quaternion.identity); tempBot.Agent.avoidancePriority = index; tempBot.Target = ServiceLocatorMonoBehaviour.GetService <CharacterController>().transform; //todo разных протинвиков AddBotToList(tempBot); } }