static int GetCurrentFirstPickedUIElement(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                HedgehogTeam.EasyTouch.Gesture obj = (HedgehogTeam.EasyTouch.Gesture)ToLua.CheckObject <HedgehogTeam.EasyTouch.Gesture>(L, 1);
                UnityEngine.GameObject         o   = obj.GetCurrentFirstPickedUIElement();
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 2)
            {
                HedgehogTeam.EasyTouch.Gesture obj = (HedgehogTeam.EasyTouch.Gesture)ToLua.CheckObject <HedgehogTeam.EasyTouch.Gesture>(L, 1);
                bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
                UnityEngine.GameObject o = obj.GetCurrentFirstPickedUIElement(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: HedgehogTeam.EasyTouch.Gesture.GetCurrentFirstPickedUIElement"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 // Token: 0x060002AE RID: 686 RVA: 0x0000CB34 File Offset: 0x0000AF34
 private void On_TouchDown(Gesture gesture)
 {
     if (this.realType != QuickBase.GameObjectType.UI)
     {
         if ((!this.enablePickOverUI && gesture.GetCurrentFirstPickedUIElement(false) == null) || this.enablePickOverUI)
         {
             if (gesture.GetCurrentPickedObject(false) == base.gameObject)
             {
                 if (!this.fingerOver[gesture.fingerIndex] && ((!this.isOnTouch && !this.isMultiTouch) || this.isMultiTouch))
                 {
                     this.fingerOver[gesture.fingerIndex] = true;
                     this.onTouchEnter.Invoke(gesture);
                     this.isOnTouch = true;
                 }
                 else if (this.fingerOver[gesture.fingerIndex])
                 {
                     this.onTouchOver.Invoke(gesture);
                 }
             }
             else if (this.fingerOver[gesture.fingerIndex])
             {
                 this.fingerOver[gesture.fingerIndex] = false;
                 this.onTouchExit.Invoke(gesture);
                 if (!this.isMultiTouch)
                 {
                     this.isOnTouch = false;
                 }
             }
         }
         else if (gesture.GetCurrentPickedObject(false) == base.gameObject && !this.enablePickOverUI && gesture.GetCurrentFirstPickedUIElement(false) != null && this.fingerOver[gesture.fingerIndex])
         {
             this.fingerOver[gesture.fingerIndex] = false;
             this.onTouchExit.Invoke(gesture);
             if (!this.isMultiTouch)
             {
                 this.isOnTouch = false;
             }
         }
     }
     else if (gesture.GetCurrentFirstPickedUIElement(false) == base.gameObject)
     {
         if (!this.fingerOver[gesture.fingerIndex] && ((!this.isOnTouch && !this.isMultiTouch) || this.isMultiTouch))
         {
             this.fingerOver[gesture.fingerIndex] = true;
             this.onTouchEnter.Invoke(gesture);
             this.isOnTouch = true;
         }
         else if (this.fingerOver[gesture.fingerIndex])
         {
             this.onTouchOver.Invoke(gesture);
         }
     }
     else if (this.fingerOver[gesture.fingerIndex])
     {
         this.fingerOver[gesture.fingerIndex] = false;
         this.onTouchExit.Invoke(gesture);
         if (!this.isMultiTouch)
         {
             this.isOnTouch = false;
         }
     }
 }
Esempio n. 3
0
 private void On_TouchDown(Gesture gesture)
 {
     if (realType != GameObjectType.UI)
     {
         if ((!enablePickOverUI && gesture.GetCurrentFirstPickedUIElement() == null) || enablePickOverUI)
         {
             if (gesture.GetCurrentPickedObject() == gameObject)
             {
                 if (!fingerOver[gesture.fingerIndex] && ((!isOnTouch && !isMultiTouch) || isMultiTouch))
                 {
                     fingerOver[gesture.fingerIndex] = true;
                     onTouchEnter.Invoke(gesture);
                     isOnTouch = true;
                 }
                 else if (fingerOver[gesture.fingerIndex])
                 {
                     onTouchOver.Invoke(gesture);
                 }
             }
             else
             {
                 if (fingerOver[gesture.fingerIndex])
                 {
                     fingerOver[gesture.fingerIndex] = false;
                     onTouchExit.Invoke(gesture);
                     if (!isMultiTouch)
                     {
                         isOnTouch = false;
                     }
                 }
             }
         }
         else
         {
             if (gesture.GetCurrentPickedObject() == gameObject && (!enablePickOverUI && gesture.GetCurrentFirstPickedUIElement() != null))
             {
                 if (fingerOver[gesture.fingerIndex])
                 {
                     fingerOver[gesture.fingerIndex] = false;
                     onTouchExit.Invoke(gesture);
                     if (!isMultiTouch)
                     {
                         isOnTouch = false;
                     }
                 }
             }
         }
     }
     else
     {
         if (gesture.GetCurrentFirstPickedUIElement() == gameObject)
         {
             if (!fingerOver[gesture.fingerIndex] && ((!isOnTouch && !isMultiTouch) || isMultiTouch))
             {
                 fingerOver[gesture.fingerIndex] = true;
                 onTouchEnter.Invoke(gesture);
                 isOnTouch = true;
             }
             else if (fingerOver[gesture.fingerIndex])
             {
                 onTouchOver.Invoke(gesture);
             }
         }
         else
         {
             if (fingerOver[gesture.fingerIndex])
             {
                 fingerOver[gesture.fingerIndex] = false;
                 onTouchExit.Invoke(gesture);
                 if (!isMultiTouch)
                 {
                     isOnTouch = false;
                 }
             }
         }
     }
 }