Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        try
        {
            ps = GameObject.Find("PlayStat").GetComponent <PlayStat>();
        }
        catch (System.Exception e)
        {
            Debug.LogError("No PlayStat Fetched: " + e);
            GoMenu();
        }
        if (ps == null)
        {
            Debug.LogError("No PlayStat Found");
            GoMenu();
        }

        Score.Set((float)ps.score);
        Percent.Set(ps.percentage);
        for (int i = 0; i <= 3; i++)
        {
            NoteStat[i].Set(ps.noteResult[i]);
        }
        NoteStat[4].Set(ps.maxCombo);
        Revive.Set(ps.reviveCount);
        TrueScore.Set((float)ps.trueScore);
        //MaxCombo.text = string.Format("{0:F0}", ps.score);
    }
Пример #2
0
    ///<summary>
    /// 如果輸入的成績(trueScore)比原本高,便會覆蓋原資料
    ///</summary>
    static public void SetBestRecord(OsuFile osu, PlayStat playStat)
    {
        BestRecord best = LoadBestRecord(osu);

        if (playStat.trueScore > best.trueScore ||
            (playStat.trueScore == best.trueScore && playStat.mods.Length < best.usingMods.Length))
        {
            best.trueScore     = playStat.trueScore;
            best.usingMods     = playStat.mods;
            best.originalScore = playStat.score;
        }
    }
Пример #3
0
 private void Start()
 {
     instance = this;
 }