public static LuaClickListener Get(GameObject go)
        {
            LuaClickListener listener = go.GetComponent <LuaClickListener>();

            if (listener == null)
            {
                listener = go.AddComponent <LuaClickListener>();
            }
            return(listener);
        }
        // Token: 0x06000E3E RID: 3646 RVA: 0x0009B924 File Offset: 0x00099B24
        public static LuaClickListener Get(GameObject go)
        {
            LuaClickListener luaClickListener = go.GetComponent <LuaClickListener>();
            bool             flag             = luaClickListener == null;

            if (flag)
            {
                luaClickListener = go.AddComponent <LuaClickListener>();
            }
            return(luaClickListener);
        }
Exemple #3
0
 static int OnPointerClick(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.LuaClickListener             obj  = (LuaFramework.LuaClickListener)ToLua.CheckObject <LuaFramework.LuaClickListener>(L, 1);
         UnityEngine.EventSystems.PointerEventData arg0 = (UnityEngine.EventSystems.PointerEventData)ToLua.CheckObject <UnityEngine.EventSystems.PointerEventData>(L, 2);
         obj.OnPointerClick(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemple #4
0
 static int Get(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.GameObject        arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
         LuaFramework.LuaClickListener o    = LuaFramework.LuaClickListener.Get(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemple #5
0
    static int get_onClick(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.LuaClickListener obj = (LuaFramework.LuaClickListener)o;
            LuaFramework.LuaClickListener.VoidDelegate ret = obj.onClick;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index onClick on a nil value"));
        }
    }
Exemple #6
0
    static int set_onClick(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.LuaClickListener obj = (LuaFramework.LuaClickListener)o;
            LuaFramework.LuaClickListener.VoidDelegate arg0 = (LuaFramework.LuaClickListener.VoidDelegate)ToLua.CheckDelegate <LuaFramework.LuaClickListener.VoidDelegate>(L, 2);
            obj.onClick = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index onClick on a nil value"));
        }
    }
        // Token: 0x06000E3F RID: 3647 RVA: 0x0009B950 File Offset: 0x00099B50
        public static bool Remove(GameObject go)
        {
            LuaClickListener component = go.GetComponent <LuaClickListener>();
            bool             flag      = component != null;
            bool             result;

            if (flag)
            {
                Object.Destroy(component);
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }