public void Check() { if (CurrentInfo == null) { CurrentInfo = TutorialInfoManager.Instance.GetNextTutorial(PlayerInfo.tutorial_state); } if (CurrentInfo != null && Completed == false) { if (CurrentInfo.AfterNetworking == true) { AfterNetworking(); } else { if (CurrentInfo.Condition != null && GameMain.Instance.CurrentGameMenu != GameMenu.Battle) { SetConditionOK(); } showTime = Time.realtimeSinceStartup + CurrentInfo.delay; bShowed = false; gameObject.SetActive(true); if (CurrentInfo.IDN < 100) { MetapsAnalyticsScript.TrackEvent("Tutorial", "Begin"); } } } }
void OnTutorialEndHandler(C2G.TutorialState packet, C2G.TutorialStateAck ack) { Network.PlayerInfo.tutorial_state = TutorialInfoManager.Instance.CompletedState; Network.Instance.ProcessReward3Ack(ack.rewards_ack); TutorialInfo info = TutorialInfoManager.Instance.GetInfoByIdn(TutorialInfoManager.Instance.CompletedState) as TutorialInfo; Popup.Instance.Show(ePopupMode.Reward, info.rewards, Localization.Get("TutorialRewardTitle"), Localization.Get("GetThisRewards"), ack.rewards_ack); MetapsAnalyticsScript.TrackEvent("Tutorial", "Finish"); #if SH_DEV || UNITY_EDITOR BtnSkip.SetActive(Completed == false); #endif }
private void SetNextTutorial() { PlayerInfo.tutorial_state = (short)CurrentInfo.IDN; CurrentInfo = TutorialInfoManager.Instance.GetNextTutorial(CurrentState); if (CurrentInfo == null) { TutorialComplete(); return; } //Debug.LogFormat("Current info : {0} : {1}", CurrentInfo.IDN, CurrentMenu); // CurrentInfo.Targets.ForEach(e => Debug.LogFormat("{0}", e.Menu)); MetapsAnalyticsScript.TrackEvent("Tutorial", CurrentMenu.ToString(), CurrentInfo.IDN); if (CurrentInfo.Condition != null && CurrentInfo.Condition.Type == eConditionType.BattleEndPopup) { gameObject.SetActive(false); } else { if (CurrentInfo.Condition == null) { showTime = Time.realtimeSinceStartup + CurrentInfo.delay; bShowed = false; } gameObject.SetActive(true); } if (GameMain.Instance.gameObject.activeSelf == false && (CurrentInfo.Condition == null || CurrentInfo.Condition.IsConditionOK == false)) { TimeManager.Instance.SetPause(false); } BtnSkip.SetActive(false); #if SH_DEV || UNITY_EDITOR if (CurrentInfo.Targets.Exists(t => t.type == eTutorialType.Dialog)) { BtnSkip.SetActive(Completed == false); } #endif }