Exemple #1
0
 // Use this for initialization
 void Start()
 {
     if (GameObject.FindGameObjectWithTag("globalStorage") == null)
     {
         Instantiate(Resources.Load("Prefabs/globalStorage"));
     }
     gst = GameObject.FindGameObjectWithTag("globalStorage").GetComponent <globalStorage>();
     setScore();
 }
 // Use this for initialization
 void Start()
 {
     splashStart.GetComponent <AudioSource>().Play();
     gst = GameObject.FindGameObjectWithTag("globalStorage").GetComponent <globalStorage>();
     if (gst.score > gst.currentHighScore)
     {
         GameObject.FindGameObjectWithTag("highScoreName").GetComponent <Text>().text = gst.highScoreText;
         gst.currentHighScore = gst.score;
     }
 }
Exemple #3
0
 // Use this for initialization
 void Start()
 {
     gst = GameObject.FindGameObjectWithTag("globalStorage").GetComponent <globalStorage>();
     if (gst.gotPrincess == true)
     {
         gst.score += 150000;
         GameObject.Find("bonus").GetComponent <Text>().text = "Level Complete Bonus: 150,000";
     }
     GetComponent <Text>().text = string.Format("{0:n0}", GameObject.FindGameObjectWithTag("globalStorage").GetComponent <globalStorage>().score);
     gst.gotPrincess            = false;
 }
Exemple #4
0
 // Use this for initialization
 void Start()
 {
     gst               = GameObject.FindGameObjectWithTag("globalStorage").GetComponent <globalStorage>();
     hsName            = GameObject.FindGameObjectWithTag("highScoreName").GetComponent <Text>();
     currentlySelected = GameObject.Find("Row " + row + "/" + collumn);
 }