// Use this for initialization void Start () { file = new System.IO.StreamReader(Application.dataPath +"/gen_level/"+ levelname); length = Int32.Parse(file.ReadLine()); line = file.ReadLine(); EnemyList = GameObject.Find("Overseer").GetComponent<Overseer>(); //int counter = 0; //int size=Int32.Parse(file.ReaTdLine()); //timer=0; //UnityEngine.Debug.Log(line); //while ((line = file.ReadLine()) != null) //{ // string[] row=line.Split(' '); // note=Int32.Parse(row[1]); // time=float.Parse(row[0]); //StartCoroutine(coroutine(time));// start spin lock //Debug.Log(timer); //noteFall clonescript = clone.GetComponent<noteFall>(); //note to change this to Int32.Parse at some time //clonescript.setTimeOffset(float.Parse(row[0])); //clone.GetComponent<noteFall>().timeOffset=float.Parse(row[0]); //clone.GetComponent<noteFall>().setTimeOffset(float.Parse(row[0])); //Debug.Log(float.Parse(row[0])); // } // file.Close(); reference = GameObject.Find("DeathBox").GetComponent<deathBar>(); }
// Use this for initialization void Start() { reference = GameObject.Find("DeathBox").GetComponent <deathBar>(); lives = reference.lives; text = GetComponent <Text>(); text.text = "Lives : " + lives; //Debug.Log(text.text); }
// Use this for initialization void Start() { reference = GameObject.Find("DeathBox").GetComponent<deathBar>(); lives = reference.lives; text = GetComponent<Text>(); text.text = "Lives : " + lives; //Debug.Log(text.text); }