Пример #1
0
 // Use this for initialization
 void Start()
 {
     Instance = this;
     lives    = new List <GameObject> ();
     for (int lifeIndex = 0; lifeIndex < this.numberOfLives; lifeIndex++)
     {
         GameObject life = Instantiate(lifePrefab, this.gameObject.transform);
         lives.Add(life);
     }
 }
Пример #2
0
 void Start()
 {
     livesDisplay    = (GameObject.FindWithTag("livesdisplay"));
     showLivesScript = livesDisplay.GetComponent <ShowLives>();
 }