예제 #1
0
 public virtual void Process()
 {
     this.IsHandling = false;
     if (Application.get_platform() == 7 || Application.get_platform() == 2 || (Application.get_platform() == null || Application.get_platform() == 1))
     {
         this.SendUpdateEventToSelectedObject();
     }
     if (!((Behaviour)this).get_enabled())
     {
         return;
     }
     if (this.UseFakeInput())
     {
         this.FakeTouches();
     }
     else
     {
         this.ProcessTouchEvents();
     }
     if (this.IsHandling || !Input.GetKeyDown((KeyCode)27))
     {
         return;
     }
     BackHandler.Invoke();
     Input.ResetInputAxes();
 }
예제 #2
0
 public virtual void Process()
 {
   this.IsHandling = false;
   if (!((Behaviour) this).get_enabled())
     return;
   if (this.UseFakeInput())
     this.FakeTouches();
   else
     this.ProcessTouchEvents();
   if (this.IsHandling || !Input.GetKeyDown((KeyCode) 27) || !Object.op_Equality((Object) SGHighlightObject.Instance(), (Object) null))
     return;
   BackHandler.Invoke();
   Input.ResetInputAxes();
 }
예제 #3
0
 public static void Invoke()
 {
     for (int count = BackHandler.mHdls.Count; 0 < count; --count)
     {
         BackHandler mHdl = BackHandler.mHdls[count - 1];
         if (!Object.op_Equality((Object)null, (Object)mHdl))
         {
             Button component = (Button)((Component)mHdl).get_gameObject().GetComponent <Button>();
             if (Object.op_Inequality((Object)null, (Object)component))
             {
                 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);
                         component.OnPointerClick(pointerEventData);
                         break;
                     }
                 }
             }
         }
     }
 }
예제 #4
0
        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;
                                }
                            }
                        }
                    }
                }
            }
        }