/// <summary> /// Spawns the team AI entities from the spawn managers. /// </summary> private void SpawnEnemyEntities() { // Test spawn GameObject spawnedDroid = Instantiate(gameManager.enemySettings.droidSentryPrefab, transform.position, Quaternion.identity); IAssignSceneActorTracker assignTracker = spawnedDroid.GetComponent <IAssignSceneActorTracker>(); assignTracker.SetSceneActorTracker(actorTracker); actorTracker.RegisterEnemyEntity(spawnedDroid); IEnemyController enemyController = spawnedDroid.GetComponent <IEnemyController>(); enemyController.InitialiseController(); }
private void RegisterToTracker() { IActorTracker actorTracker = GameManager.Instance.sceneController.ActorTracker; actorTracker.RegisterEnemyEntity(this.gameObject); }