void Start() { // Call the Spawn function after a delay of the spawnTime and then continue to call after the same amount of time. InvokeRepeating("Spawn", delay, delay); getElement = GetComponentInChildren <PortalSize>(); }
void Start() { gameController = GameObject.FindWithTag("GameController").GetComponent <MasterGameManager>(); if (gameController == null) { Debug.Log("Reference to gameController could not be found in EnemyManager class"); } // Call the Spawn function after a delay of the spawnTime and then continue to call after the same amount of time. InvokeRepeating("Spawn", delay, delay); getElement = GetComponentInChildren <PortalSize>(); }