//清档 public void ClearProgress() { f_isPlaying = false; f_playLevelIndex = -1; f_gameProgressIndex = -1; FBSaver.SetProgress(-1); }
public void StoptLevel(bool isWin) { if (isWin && PlayLevelIndex > GameProgressIndex) { //更新进度 f_gameProgressIndex = PlayLevelIndex; //保存进度 FBSaver.SetProgress(PlayLevelIndex); } f_isPlaying = false; }
//初始化 public void OnInitialized() { //构建Level集合 List <FileInfo> files = FBTools.GetLevelFiles(); for (int i = 0; i < files.Count; i++) { FBLevel level = new FBLevel(); FBTools.FillLevel(files[i].FullName, ref level); f_levels.Add(level); } //读取游戏进度 f_gameProgressIndex = FBSaver.GetProgress(); }