예제 #1
0
        public TutorialStepData GetNextStepData(TutorialStepData tutorialStepData)
        {
            TutorialStepData nextStepData = null;

            _stepsDic.TryGetValue(tutorialStepData.nextID, out nextStepData);
            return(nextStepData);
        }
예제 #2
0
        public TutorialStepData GetStepData(int id)
        {
            TutorialStepData tutorialStepData = null;

            _stepsDic.TryGetValue(id, out tutorialStepData);
            return(tutorialStepData);
        }
예제 #3
0
 public void SetCurrentTutorialChapter(int tutorialChapterID)
 {
     TutorialChapterData.TutorialChapterDataSortedDic.TryGetValue(tutorialChapterID, out _currentTutorialChapterData);
     if (_currentTutorialChapterData != null)
     {
         _currentTutorialStepData = _currentTutorialChapterData.GetStepData(1);
     }
     Debugger.Log("SetCurrentTutorialChapter=====>Chapter ID:" + tutorialChapterID);
 }
예제 #4
0
 public void MoveToChapter(TutorialChapterData tutorialChapterData)
 {
     IsCurrentTurorialChapterOpened = false;
     if (tutorialChapterData != null)
     {
         _currentTutorialChapterData = tutorialChapterData;
         _currentTutorialStepData    = _currentTutorialChapterData.GetStepData(1);
         Debugger.Log("=====[Tutorial][MoveToChapter]::" + (tutorialChapterData.isBackup ? "[Backup:" : "[Main:") + tutorialChapterData.id.ToString() + "]");
     }
 }
예제 #5
0
        public void MoveToNextChapter()
        {
            TutorialChapterData nextTutorialChapterData = _currentTutorialChapterData.GetNextTutorialChapterData();

            Logic.TalkingData.Controller.TalkingDataController.instance.TDGAMissionOnBegin(_currentTutorialChapterData.id.ToString(), Logic.TalkingData.Controller.TalkDataMissionType.Tutorial);
            Logic.TalkingData.Controller.TalkingDataController.instance.TDGAMissionOnCompleted(_currentTutorialChapterData.id.ToString(), Logic.TalkingData.Controller.TalkDataMissionType.Tutorial);
            if (nextTutorialChapterData != null)
            {
                _currentTutorialChapterData = nextTutorialChapterData;
                _currentTutorialStepData    = _currentTutorialChapterData.GetStepData(1);
            }
            Debugger.Log("=====[Tutorial][MoveToNextChapter]::" + (nextTutorialChapterData.isBackup ? "[Backup:" : "[Main:") + nextTutorialChapterData.id.ToString() + "]");
        }
예제 #6
0
        public void MoveToNextStep(TutorialStepData stepData)
        {
            IsCurrentTurorialChapterOpened = false;
            if (stepData == null || stepData.id == _currentTutorialStepData.id)
            {
                _currentTutorialStepData = _currentTutorialChapterData.GetNextStepData(stepData);
                Debugger.Log("=====[Tutorial][MoveToNextStep]::" + (_currentTutorialChapterData.isBackup ? "[Backup:" : "[Main:") + _currentTutorialChapterData.id.ToString() + "]====================[Step:" + _currentTutorialStepData.id.ToString() + "]");
            }

            if (_currentTutorialStepData == null) //移动到下一章
            {
                MoveToNextChapter();
            }
        }
예제 #7
0
        public TutorialChapterData(int tutorialChapterID, LuaTable luaTable)
        {
            id = tutorialChapterID;
            if (luaTable["player_level"] != null)
            {
                playerLevel = luaTable["player_level"].ToString().ToInt32();
            }
            if (luaTable["pass_dungeon"] != null)
            {
                passDungeon = luaTable["pass_dungeon"].ToString().ToInt32();
            }
            if (luaTable["task_id"] != null)
            {
                taskID = luaTable["task_id"].ToString().ToInt32();
            }
            if (luaTable["dungeon_total_star_count"] != null)
            {
                dungeonTotalStarCount = luaTable["dungeon_total_star_count"].ToString().ToInt32();
            }
            if (luaTable["at_ui_view_path"] != null)
            {
                atUIViewPath = luaTable["at_ui_view_path"].ToString();
            }
            if (luaTable["function_open_id"] != null)
            {
                functionOpenID = luaTable["function_open_id"].ToString().ToInt32();
            }
            if (luaTable["complete_step_id"] != null)
            {
                completeStepID = luaTable["complete_step_id"].ToString().ToInt32();
            }
            if (luaTable["is_skippable"] != null)
            {
                isSkippable = luaTable["is_skippable"].ToString().ToBoolean();
            }
            if (luaTable["can_ignore"] != null)
            {
                canIgnore = luaTable["can_ignore"].ToString().ToBoolean();
            }

            LuaTable stepsLuaTable = (LuaTable)luaTable["steps"];

            foreach (DictionaryEntry kvp in stepsLuaTable.ToDictTable())
            {
                LuaTable stepLuaTable = kvp.Value as LuaTable;
                _stepsDic.Add(stepLuaTable["id"].ToString().ToInt32(), TutorialStepData.CreateFromLuaTable(stepLuaTable));
            }
        }
예제 #8
0
        public static TutorialStepData CreateFromLuaTable(LuaTable luaTable)
        {
            TutorialStepData tutorialStepData = new TutorialStepData(luaTable);

            return(tutorialStepData);
        }
예제 #9
0
        public bool HasNextStep()
        {
            TutorialStepData nextStepData = _currentTutorialChapterData.GetNextStepData(_currentTutorialStepData);

            return(nextStepData != null);
        }