Example #1
0
    /// <summary>
    /// 当前分数保存到存档
    /// </summary>
    private void SavaScore()
    {
        GlobalArchival archival = ArchivalUtils.Load <GlobalArchival>();

        var curScore = PlayerPrefs.GetInt("curScore");
        var score    = archival.maxScore < curScore ? curScore : archival.maxScore;

        archival.maxScore = score;

        var curCoin = contexts.game.gameCoin.value;

        archival.coinNum += curCoin;
        ArchivalUtils.Save(archival);
    }
Example #2
0
 /// <summary>
 /// 结算面板显示分数
 /// </summary>
 private void ShowScore()
 {
     maxScoreText.text = ArchivalUtils.Load <GlobalArchival>().maxScore.ToString();
     curScoreText.text = PlayerPrefs.GetInt("curScore").ToString();
 }