public void SetCameraMode(SceneBattle.CameraMode mode) { SceneBattle instance = SceneBattle.Instance; if (!Object.op_Inequality((Object)instance, (Object)null) || !instance.IsControlBattleUI(SceneBattle.eMaskBattleUI.CAMERA)) { return; } instance.OnCameraModeChange(mode); switch (mode) { case SceneBattle.CameraMode.DEFAULT: if (Object.op_Inequality((Object)this.DefaultButton, (Object)null)) { this.DefaultButton.SetActive(false); } if (Object.op_Inequality((Object)this.UpViewButton, (Object)null)) { this.UpViewButton.SetActive(true); } if (!Object.op_Inequality((Object)this.BattleCameraControl, (Object)null)) { break; } this.BattleCameraControl.SetDisp(true); break; case SceneBattle.CameraMode.UPVIEW: if (Object.op_Inequality((Object)this.DefaultButton, (Object)null)) { this.DefaultButton.SetActive(true); } if (Object.op_Inequality((Object)this.UpViewButton, (Object)null)) { this.UpViewButton.SetActive(false); } if (!Object.op_Inequality((Object)this.BattleCameraControl, (Object)null)) { break; } this.BattleCameraControl.SetDisp(false); break; } }
public static void Invoke() { SceneBattle instance = SceneBattle.Instance; if (Object.op_Implicit((Object)instance) && !instance.IsControlBattleUI(SceneBattle.eMaskBattleUI.BACK_KEY)) { return; } for (int count = BackHandler.mHdls.Count; 0 < count; --count) { BackHandler mHdl = BackHandler.mHdls[count - 1]; if (!Object.op_Equality((Object)null, (Object)mHdl)) { ButtonEvent component1 = (ButtonEvent)((Component)mHdl).get_gameObject().GetComponent <ButtonEvent>(); if (Object.op_Inequality((Object)component1, (Object)null)) { GraphicRaycaster componentInParent = (GraphicRaycaster)((Component)mHdl).get_gameObject().GetComponentInParent <GraphicRaycaster>(); if (!Object.op_Equality((Object)componentInParent, (Object)null) && ((Behaviour)componentInParent).get_enabled()) { Graphic component2 = (Graphic)((Component)mHdl).get_gameObject().GetComponent <Graphic>(); if (!Object.op_Equality((Object)component2, (Object)null) && ((Behaviour)component2).get_enabled() && component2.get_raycastTarget()) { CanvasGroup[] componentsInParent = (CanvasGroup[])((Component)mHdl).GetComponentsInParent <CanvasGroup>(); bool flag = false; for (int index = 0; index < componentsInParent.Length; ++index) { if (!componentsInParent[index].get_blocksRaycasts()) { flag = true; break; } if (componentsInParent[index].get_ignoreParentGroups()) { break; } } if (!flag) { PointerEventData data = new PointerEventData(EventSystem.get_current()); data.set_position(Vector2.op_Implicit(((Component)mHdl).get_gameObject().get_transform().get_position())); data.set_clickCount(1); component1.OnPointerClick(data); break; } } } } else { Button component2 = (Button)((Component)mHdl).get_gameObject().GetComponent <Button>(); if (Object.op_Inequality((Object)null, (Object)component2)) { GraphicRaycaster componentInParent = (GraphicRaycaster)((Component)mHdl).get_gameObject().GetComponentInParent <GraphicRaycaster>(); if (!Object.op_Equality((Object)null, (Object)componentInParent) && ((Behaviour)componentInParent).get_enabled()) { CanvasGroup[] componentsInParent = (CanvasGroup[])((Component)mHdl).GetComponentsInParent <CanvasGroup>(); bool flag = false; for (int index = 0; index < componentsInParent.Length; ++index) { if (!componentsInParent[index].get_blocksRaycasts()) { flag = true; break; } if (componentsInParent[index].get_ignoreParentGroups()) { break; } } if (!flag) { PointerEventData pointerEventData = new PointerEventData(EventSystem.get_current()); pointerEventData.set_position(Vector2.op_Implicit(((Component)mHdl).get_gameObject().get_transform().get_position())); pointerEventData.set_clickCount(1); component2.OnPointerClick(pointerEventData); break; } } } } } } }