Пример #1
0
    // Use this for initialization
    void Start()
    {
        mSceneMng = GameObject.Find("SceneMng").GetComponent <sceneMng>();

        GameObject textObj = GameObject.Find("score");

        if (textObj)
        {
            textObj.GetComponent <Text> ().text = mSceneMng.getLastScore() + "点";
        }
        GameObject.Find("highScore").GetComponent <Text> ().text = mSceneMng.getHighScore() + "点";
    }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        mSceneMng = GameObject.Find("SceneMng").GetComponent <sceneMng>();

        GameObject.Find("ScoreInGame").GetComponent <Text> ().text = mSceneMng.getNowScore().ToString() + "点";
    }