コード例 #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
ファイル: TutorialProxy.cs プロジェクト: mengtest/HjqstSource
 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
ファイル: TutorialProxy.cs プロジェクト: mengtest/HjqstSource
 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
ファイル: TutorialProxy.cs プロジェクト: mengtest/HjqstSource
        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
ファイル: TutorialProxy.cs プロジェクト: mengtest/HjqstSource
        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
ファイル: TutorialProxy.cs プロジェクト: mengtest/HjqstSource
        public bool HasNextStep()
        {
            TutorialStepData nextStepData = _currentTutorialChapterData.GetNextStepData(_currentTutorialStepData);

            return(nextStepData != null);
        }