Exemplo n.º 1
0
 //清档
 public void ClearProgress()
 {
     f_isPlaying         = false;
     f_playLevelIndex    = -1;
     f_gameProgressIndex = -1;
     FBSaver.SetProgress(-1);
 }
Exemplo n.º 2
0
        public void StoptLevel(bool isWin)
        {
            if (isWin && PlayLevelIndex > GameProgressIndex)
            {
                //更新进度
                f_gameProgressIndex = PlayLevelIndex;
                //保存进度
                FBSaver.SetProgress(PlayLevelIndex);
            }

            f_isPlaying = false;
        }
Exemplo n.º 3
0
        //初始化
        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();
        }