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); }
/// <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); }