Example #1
0
    // Use this for initialization
    void Start()
    {
        GlobalScoreKeeper oldKeeper = FindObjectOfType <GlobalScoreKeeper> ();

        if (oldKeeper)
        {
            score = oldKeeper.score;
            Destroy(oldKeeper.gameObject);
        }
    }
Example #2
0
 // Use this for initialization
 void Start()
 {
     text        = GetComponent <Text> ();
     scoreKeeper = FindObjectOfType <GlobalScoreKeeper> ();
 }
Example #3
0
 void Start()
 {
     scoreKeeper = FindObjectOfType <GlobalScoreKeeper> ();
     setInstrument();
 }
 void Start()
 {
     scoreKeeper = FindObjectOfType <GlobalScoreKeeper> ();
 }
    void OnCollisionEnter(Collision collision)
    {
        GlobalScoreKeeper scoreKeeper = FindObjectOfType <GlobalScoreKeeper> ();

        scoreKeeper.IncrementScore();
    }