public TutorialStepData GetNextStepData(TutorialStepData tutorialStepData) { TutorialStepData nextStepData = null; _stepsDic.TryGetValue(tutorialStepData.nextID, out nextStepData); return(nextStepData); }
public TutorialStepData GetStepData(int id) { TutorialStepData tutorialStepData = null; _stepsDic.TryGetValue(id, out tutorialStepData); return(tutorialStepData); }
public void SetCurrentTutorialChapter(int tutorialChapterID) { TutorialChapterData.TutorialChapterDataSortedDic.TryGetValue(tutorialChapterID, out _currentTutorialChapterData); if (_currentTutorialChapterData != null) { _currentTutorialStepData = _currentTutorialChapterData.GetStepData(1); } Debugger.Log("SetCurrentTutorialChapter=====>Chapter ID:" + tutorialChapterID); }
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() + "]"); } }
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() + "]"); }
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(); } }
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)); } }
public static TutorialStepData CreateFromLuaTable(LuaTable luaTable) { TutorialStepData tutorialStepData = new TutorialStepData(luaTable); return(tutorialStepData); }
public bool HasNextStep() { TutorialStepData nextStepData = _currentTutorialChapterData.GetNextStepData(_currentTutorialStepData); return(nextStepData != null); }