Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        int   count, wrong;
        float average, aveTime;

        count             = Gamemanager.GetCount();
        wrong             = Gamemanager.GetWrong();
        average           = (count * 100.0f) / (count + wrong);
        aveTime           = 20.0f / (wrong + count);
        scoreText[0].text = count.ToString();
        scoreText[1].text = wrong.ToString();
        scoreText[2].text = average.ToString("f1") + "%";
        scoreText[3].text = "平均回答時間 : " + aveTime.ToString("f2") + "s";
    }