Пример #1
0
 // Use this for initialization
 void Start()
 {
     scoreKeep = FindObjectOfType <LevelManger>();
     text      = GetComponent <Text>();
     score     = scoreKeep.getScore();
     Destroy(scoreKeep.gameObject);
 }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        int currentScore = scoreKeep.getScore();

        text.text = "Score: " + currentScore;
    }