private void CloseFormShared(EBattleGuideFormType inFormType) { Singleton <CTimerManager> .GetInstance().RemoveTimer(new CTimer.OnTimeUpHandler(this.TimeOutDelegate)); this.UpdateGamePausing(false); string formPath = this.GuideFormPathList[(int)inFormType]; Singleton <CUIManager> .GetInstance().CloseForm(formPath); if (Singleton <GameStateCtrl> .instance.isBattleState) { if (inFormType == EBattleGuideFormType.SkillGesture2) { List <GameObject> list = Singleton <BattleSkillHudControl> .GetInstance().QuerySkillButtons(SkillSlotType.SLOT_SKILL_2, false); if (list.Count > 0) { GameObject obj2 = list[0]; this.showSkillButton(obj2.transform.FindChild("Present").gameObject, true); } } else if (inFormType == EBattleGuideFormType.SkillGesture2Cancel) { List <GameObject> list2 = Singleton <BattleSkillHudControl> .GetInstance().QuerySkillButtons(SkillSlotType.SLOT_SKILL_2, false); if (list2.Count > 0) { GameObject obj3 = list2[0]; this.showSkillButton(obj3.transform.FindChild("Present").gameObject, true); } } else if (inFormType == EBattleGuideFormType.SkillGesture3) { List <GameObject> list3 = Singleton <BattleSkillHudControl> .GetInstance().QuerySkillButtons(SkillSlotType.SLOT_SKILL_3, false); if (list3.Count > 0) { GameObject obj4 = list3[0]; this.showSkillButton(obj4.transform.FindChild("Present").gameObject, true); } } } }
public void OpenFormShared(EBattleGuideFormType inFormType, int delayTime = 0, bool bPauseGame = true) { if ((inFormType > EBattleGuideFormType.Invalid) && (inFormType < EBattleGuideFormType.Count)) { Singleton <CUILoadingSystem> .instance.HideLoading(); this.curOpenForm = Singleton <CUIManager> .GetInstance().OpenForm(this.GuideFormPathList[(int)inFormType], false, true); if ((delayTime != 0) && (this.curOpenForm != null)) { Transform transform = this.curOpenForm.transform.FindChild("Panel_Interactable"); if (transform != null) { transform.gameObject.CustomSetActive(false); Singleton <CTimerManager> .GetInstance().AddTimer(delayTime, 1, new CTimer.OnTimeUpHandler(this.ShowInteractable)); } } Singleton <CTimerManager> .GetInstance().AddTimer(TIME_OUT, 1, new CTimer.OnTimeUpHandler(CBattleGuideManager.TimeOutDelegate)); switch (inFormType) { case EBattleGuideFormType.BigMapGuide: case EBattleGuideFormType.SelectModeGuide: case EBattleGuideFormType.BaojunAlert: break; default: this.UpdateGamePausing(bPauseGame); break; } if (Singleton <GameStateCtrl> .instance.isBattleState) { if (inFormType == EBattleGuideFormType.SkillGesture2) { List <GameObject> list = Singleton <BattleSkillHudControl> .GetInstance().QuerySkillButtons(SkillSlotType.SLOT_SKILL_2, false); if (list.Count > 0) { GameObject obj2 = list[0]; this.showSkillButton(obj2.transform.FindChild("Present").gameObject, false); Singleton <CTimerManager> .instance.AddTimer(500, 1, new CTimer.OnTimeUpHandler(this.OnSkillGestEffTimer), false); } } else if (inFormType == EBattleGuideFormType.SkillGesture2Cancel) { List <GameObject> list2 = Singleton <BattleSkillHudControl> .GetInstance().QuerySkillButtons(SkillSlotType.SLOT_SKILL_2, false); if (list2.Count > 0) { GameObject obj3 = list2[0]; this.showSkillButton(obj3.transform.FindChild("Present").gameObject, false); Singleton <CTimerManager> .instance.AddTimer(500, 1, new CTimer.OnTimeUpHandler(this.OnSkillGestEffTimer), false); GameObject obj4 = GameObject.Find("Design"); if (obj4 != null) { GlobalTrigger component = obj4.GetComponent <GlobalTrigger>(); if (component != null) { component.BindSkillCancelListener(); } } } } else if (inFormType == EBattleGuideFormType.SkillGesture3) { List <GameObject> list3 = Singleton <BattleSkillHudControl> .GetInstance().QuerySkillButtons(SkillSlotType.SLOT_SKILL_3, false); if (list3.Count > 0) { GameObject obj5 = list3[0]; this.showSkillButton(obj5.transform.FindChild("Present").gameObject, false); Singleton <CTimerManager> .instance.AddTimer(500, 1, new CTimer.OnTimeUpHandler(this.OnSkillGestEffTimer), false); GameObject obj6 = GameObject.Find("Design"); if (obj6 != null) { GlobalTrigger trigger2 = obj6.GetComponent <GlobalTrigger>(); if (trigger2 != null) { trigger2.UnbindSkillCancelListener(); } } } } } this.m_lastFormType = inFormType; } }