// 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); } }
void Start() { livesDisplay = (GameObject.FindWithTag("livesdisplay")); showLivesScript = livesDisplay.GetComponent <ShowLives>(); }