private void OnDisable() { AdventureMapPanel instance = AdventureMapPanel.instance; instance.OnZoomOutMap = (Action)Delegate.Remove(instance.OnZoomOutMap, new Action(this.OnZoomOutMap)); if (this.m_usedForMissionList) { AdventureMapPanel instance2 = AdventureMapPanel.instance; instance2.MissionSelectedFromListAction = (Action <int>)Delegate.Remove(instance2.MissionSelectedFromListAction, new Action <int>(this.HandleMissionChanged)); } else { AdventureMapPanel instance3 = AdventureMapPanel.instance; instance3.MissionMapSelectionChangedAction = (Action <int>)Delegate.Remove(instance3.MissionMapSelectionChangedAction, new Action <int>(this.HandleMissionChanged)); } AdventureMapPanel instance4 = AdventureMapPanel.instance; instance4.OnShowMissionRewardPanel = (Action <bool>)Delegate.Remove(instance4.OnShowMissionRewardPanel, new Action <bool>(this.OnShowMissionRewardPanel)); SliderPanel sliderPanel = this.m_sliderPanel; sliderPanel.SliderPanelMaximizedAction = (Action)Delegate.Remove(sliderPanel.SliderPanelMaximizedAction, new Action(this.OnSliderPanelMaximized)); SliderPanel sliderPanel2 = this.m_sliderPanel; sliderPanel2.SliderPanelBeginMinimizeAction = (Action)Delegate.Remove(sliderPanel2.SliderPanelBeginMinimizeAction, new Action(this.RevealMap)); SliderPanel sliderPanel3 = this.m_sliderPanel; sliderPanel3.SliderPanelBeginDragAction = (Action)Delegate.Remove(sliderPanel3.SliderPanelBeginDragAction, new Action(this.RevealMap)); SliderPanel sliderPanel4 = this.m_sliderPanel; sliderPanel4.SliderPanelBeginShrinkToPreviewPositionAction = (Action)Delegate.Remove(sliderPanel4.SliderPanelBeginShrinkToPreviewPositionAction, new Action(this.RevealMap)); SliderPanel sliderPanel5 = this.m_sliderPanel; sliderPanel5.SliderPanelFinishMinimizeAction = (Action)Delegate.Remove(sliderPanel5.SliderPanelFinishMinimizeAction, new Action(this.HandleSliderPanelFinishMinimize)); Main.instance.m_backButtonManager.PopBackAction(); }
private void Awake() { this.m_sliderPanel = base.GetComponent <SliderPanel>(); AdventureMapPanel.instance.OnZoomOutMap += new Action(this.OnZoomOutMap); AdventureMapPanel.instance.MissionMapSelectionChangedAction += new Action <int>(this.HandleMissionChanged); AdventureMapPanel.instance.OnShowMissionRewardPanel += new Action <bool>(this.OnShowMissionRewardPanel); AdventureMapPanel.instance.WorldQuestChangedAction += new Action <int>(this.HandleWorldQuestChanged); }
public void PushBackAction(BackActionType backActionType, GameObject backActionTarget = null) { BackButtonManager.BackAction backAction = () => { }; switch (backActionType) { case BackActionType.hideAllPopups: { backAction = () => { if (AllPopups.instance != null) { AllPopups.instance.HideAllPopups(); } }; break; } case BackActionType.hideSliderPanel: { backAction = () => { if (backActionTarget != null) { SliderPanel component = backActionTarget.GetComponent <SliderPanel>(); if (component != null) { component.HideSliderPanel(); } } }; break; } case BackActionType.hideMissionResults: { break; } case BackActionType.hideMissionDialog: { backAction = new BackButtonManager.BackAction(Singleton <DialogFactory> .Instance.CloseMissionDialog); break; } case BackActionType.hideHamburgerMenu: { backAction = () => AllPopups.instance.HideHamburgerMenu(); break; } default: { goto case BackActionType.hideMissionResults; } } this.PushBackAction(backAction); }
public void PushBackAction(BackActionType backActionType, GameObject backActionTarget = null) { BackButtonManager.BackAction action = delegate { }; switch (backActionType) { case BackActionType.hideAllPopups: action = delegate { if (AllPopups.instance != null) { AllPopups.instance.HideAllPopups(); } }; break; case BackActionType.hideSliderPanel: action = delegate { if (backActionTarget != null) { SliderPanel component = backActionTarget.GetComponent <SliderPanel>(); if (component != null) { component.HideSliderPanel(); } } }; break; case BackActionType.hideMissionDialog: action = delegate { AllPopups.instance.m_missionDialog.m_missionDetailView.HideMissionDetailView(); }; break; case BackActionType.hideHamburgerMenu: action = delegate { AllPopups.instance.HideHamburgerMenu(); }; break; } this.PushBackAction(action); }
private void OnEnable() { this.m_sliderPanel = base.GetComponent <SliderPanel>(); this.m_sliderPanel.m_masterCanvasGroup.alpha = 0f; AdventureMapPanel instance = AdventureMapPanel.instance; instance.OnZoomOutMap = (Action)Delegate.Combine(instance.OnZoomOutMap, new Action(this.OnZoomOutMap)); if (this.m_usedForMissionList) { AdventureMapPanel instance2 = AdventureMapPanel.instance; instance2.MissionSelectedFromListAction = (Action <int>)Delegate.Combine(instance2.MissionSelectedFromListAction, new Action <int>(this.HandleMissionChanged)); } else { AdventureMapPanel instance3 = AdventureMapPanel.instance; instance3.MissionMapSelectionChangedAction = (Action <int>)Delegate.Combine(instance3.MissionMapSelectionChangedAction, new Action <int>(this.HandleMissionChanged)); } AdventureMapPanel instance4 = AdventureMapPanel.instance; instance4.OnShowMissionRewardPanel = (Action <bool>)Delegate.Combine(instance4.OnShowMissionRewardPanel, new Action <bool>(this.OnShowMissionRewardPanel)); SliderPanel sliderPanel = this.m_sliderPanel; sliderPanel.SliderPanelMaximizedAction = (Action)Delegate.Combine(sliderPanel.SliderPanelMaximizedAction, new Action(this.OnSliderPanelMaximized)); SliderPanel sliderPanel2 = this.m_sliderPanel; sliderPanel2.SliderPanelBeginMinimizeAction = (Action)Delegate.Combine(sliderPanel2.SliderPanelBeginMinimizeAction, new Action(this.RevealMap)); SliderPanel sliderPanel3 = this.m_sliderPanel; sliderPanel3.SliderPanelBeginDragAction = (Action)Delegate.Combine(sliderPanel3.SliderPanelBeginDragAction, new Action(this.RevealMap)); SliderPanel sliderPanel4 = this.m_sliderPanel; sliderPanel4.SliderPanelBeginShrinkToPreviewPositionAction = (Action)Delegate.Combine(sliderPanel4.SliderPanelBeginShrinkToPreviewPositionAction, new Action(this.RevealMap)); SliderPanel sliderPanel5 = this.m_sliderPanel; sliderPanel5.SliderPanelFinishMinimizeAction = (Action)Delegate.Combine(sliderPanel5.SliderPanelFinishMinimizeAction, new Action(this.HandleSliderPanelFinishMinimize)); Main.instance.m_backButtonManager.PushBackAction(BackActionType.hideSliderPanel, this.m_sliderPanel.gameObject); }