Esempio n. 1
0
    public LevelScore GetScoreByBoardId(string boardId)
    {
        LevelScore score = LevelScores.Find(p => { return(p.LeardBoardID == boardId); });

        if (score == null)
        {
            score = new LevelScore(GameGlobalValue.GetLevelIdByBoardId(boardId));
            score.LeardBoardID = boardId;
            LevelScores.Add(score);
        }
        return(score);
    }
Esempio n. 2
0
    /// <summary>
    /// 获得游戏场景的纪录
    /// </summary>
    /// <param name="level"></param>
    /// <returns></returns>
    public LevelScore GetScoreByLevel(int level)
    {
        LevelScore score = LevelScores.Find(p => { return(p.LevelID == level); });

        if (score == null)
        {
            score = new LevelScore(level);
            score.LeardBoardID = GameGlobalValue.GetBoardIdByLevel(level);
            LevelScores.Add(score);
        }
        return(score);
    }