public static bool OnWin(int starCount) { int level = CurLevel; if (GameLevelInfo.StarList[level - 1] == -1) { GameLevelInfo.StarList[level - 1] = starCount; } level++; int maxLevel = Global.Instance.MaxLevel; if (level > maxLevel) { GameLevelInfo.SetGameLevelInfo(); return(true); } if (level >= maxLevel) { maxLevel = level; } CurLevel = level; if (CurLevel >= GameLevelInfo.MaxCanPlay) { GameLevelInfo.MaxCanPlay = CurLevel; } GameLevelInfo.SetGameLevelInfo(); return(false); }
public static GameLevelInfo GetEmptyGameLevelInfo(int maxLevel) { GameLevelInfo gi = new GameLevelInfo(); gi.MaxLevel = maxLevel; gi.MaxCanPlay = 1; gi.StarList = new List <int>(); for (int i = 0; i < maxLevel; i++) { gi.StarList.Add(-1); } gi.SetGameLevelInfo(); return(gi); }