コード例 #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;
    }