void Start() { enemyInfo = FindObjectOfType <EnemyInfoController>(); enemyRadar = GetComponentInChildren <EnemyRadar>(); targetWaypoint = transform; GameObject[] waypoints = GameObject.FindGameObjectsWithTag("Waypoint"); foreach (GameObject waypoint in waypoints) { waypointPositions.Add(waypoint.transform); } }
void Start() { enemyInfo = FindObjectOfType <EnemyInfoController>(); spawnWaitTime = timeBetweenSpawns; GameObject[] spawners = GameObject.FindGameObjectsWithTag("Spawner"); foreach (GameObject spawner in spawners) { enemySpawners.Add(spawner.transform); } CalculateNumberOfEnemies(); }