Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     health           = startingHealth;
     gameManager      = GameObject.Find("GameManager");
     healthController = gameManager.GetComponent <HealthConroller>();
     gameController   = gameManager.GetComponent <GameController>();
 }
Ejemplo n.º 2
0
 // Use this for initializat;ion
 void Start()
 {
     spawnEnemies     = GetComponent <SpawnEnemies>();
     healthController = GetComponent <HealthConroller>();
     startWait        = new WaitForSeconds(startDelay);
     endWait          = new WaitForSeconds(endDelay);
     StartCoroutine(GameLoop());
 }
Ejemplo n.º 3
0
 // 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;
     }
 }
Ejemplo n.º 4
0
 // 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();
 }