// Use this for initialization void Start() { health = startingHealth; gameManager = GameObject.Find("GameManager"); healthController = gameManager.GetComponent <HealthConroller>(); gameController = gameManager.GetComponent <GameController>(); }
// Use this for initializat;ion void Start() { spawnEnemies = GetComponent <SpawnEnemies>(); healthController = GetComponent <HealthConroller>(); startWait = new WaitForSeconds(startDelay); endWait = new WaitForSeconds(endDelay); StartCoroutine(GameLoop()); }
// Use this for initialization void Start() { healthController = gameObject.GetComponent <HealthConroller>(); for (int i = 0; i < spawnPoints.Length; i++) { Transform transform = new GameObject().transform; transform.position = camera.ViewportToWorldPoint(new Vector3(.2f * i + .1f, 1f, 10f)); spawnPoints[i] = transform; } }
// Use this for initializat;ion void Start() { enemiesKilled = new Dictionary <string, int>(); highScore.text += PlayerPrefs.GetInt("highScore"); spawnEnemies = GetComponent <SpawnEnemies>(); healthController = GetComponent <HealthConroller>(); startWait = new WaitForSeconds(startDelay); endWait = new WaitForSeconds(endDelay); StartCoroutine(GameLoop()); Reset(); }