Пример #1
0
 public void Startup()
 {
     mStatus = ManagerStatus.Started;
     //TODO :这里的数据需要从存储里面读取,因为还没做,所以先放这里
     MissionData.LoadMissionData();
     PlayerProgress.Instance.Reload();
     LoadMissionProgress();
     mMaxLevel    = MissionData.GetMaxLevel();
     mMaxSubLevel = MissionData.GetMaxSubLevel(mCurLevel);
 }
Пример #2
0
        /// <summary>
        /// 进入下一个大关卡
        /// </summary>
        public void GoToNextLevel()
        {
            //首先要将小关卡重置为1
            // mCurSubLevel = 1;
            var subLv = 1;

            if (mCurLevel < mMaxLevel)
            {
                UpdateMissionLevel(mCurLevel + 1, 1);
                //将下一大关的小关卡重置
                mMaxSubLevel = MissionData.GetMaxSubLevel(mCurLevel);
                SceneManager.LoadSceneAsync("Level" + mCurLevel + "-" + mCurSubLevel);
            }
            else
            {
                Debug.Log("Last level");

                PlayerProgress.Instance.SubmitNewProgress(1, 1);
                //发送消息,游戏已经到最后一关了,到这里整个游戏通关了
                MessageBus.Send(new OnGameCompleteMsg());
            }
        }
Пример #3
0
 public void UpdateMissionLevel(int currentLevel, int currentSubLevel)
 {
     PlayerProgress.Instance.SubmitNewProgress(currentLevel, currentSubLevel);
     mMaxSubLevel = MissionData.GetMaxSubLevel(mCurLevel);
 }