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

            if (count == 2 && TypeChecker.CheckTypes <TestEventListener.VoidDelegate>(L, 2))
            {
                TestEventListener obj = (TestEventListener)ToLua.CheckObject(L, 1, typeof(TestEventListener));
                TestEventListener.VoidDelegate arg0 = (TestEventListener.VoidDelegate)ToLua.ToObject(L, 2);
                obj.SetOnFinished(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes <TestEventListener.OnClick>(L, 2))
            {
                TestEventListener         obj  = (TestEventListener)ToLua.CheckObject(L, 1, typeof(TestEventListener));
                TestEventListener.OnClick arg0 = (TestEventListener.OnClick)ToLua.ToObject(L, 2);
                obj.SetOnFinished(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: TestEventListener.SetOnFinished"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    public static Delegate TestEventListener_VoidDelegate(LuaFunction func)
    {
        if (func == null)
        {
            TestEventListener.VoidDelegate fn = delegate { };
            return(fn);
        }

        TestEventListener.VoidDelegate d = (new TestEventListener_VoidDelegate_Event(func)).Call;
        return(d);
    }
Example #3
0
    static int SetOnFinished(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <TestEventListener.VoidDelegate>(L, 2))
            {
                TestEventListener obj = (TestEventListener)ToLua.CheckObject(L, 1, typeof(TestEventListener));
                TestEventListener.VoidDelegate arg0 = null;
                LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

                if (funcType2 != LuaTypes.LUA_TFUNCTION)
                {
                    arg0 = (TestEventListener.VoidDelegate)ToLua.ToObject(L, 2);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 2);
                    arg0 = (TestEventListener.VoidDelegate) DelegateTraits <TestEventListener.VoidDelegate> .Create(func);
                }

                obj.SetOnFinished(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes <TestEventListener.OnClick>(L, 2))
            {
                TestEventListener         obj  = (TestEventListener)ToLua.CheckObject(L, 1, typeof(TestEventListener));
                TestEventListener.OnClick arg0 = null;
                LuaTypes funcType2             = LuaDLL.lua_type(L, 2);

                if (funcType2 != LuaTypes.LUA_TFUNCTION)
                {
                    arg0 = (TestEventListener.OnClick)ToLua.ToObject(L, 2);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 2);
                    arg0 = (TestEventListener.OnClick) DelegateTraits <TestEventListener.OnClick> .Create(func);
                }

                obj.SetOnFinished(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: TestEventListener.SetOnFinished"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int SetOnFinished(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && ToLua.CheckTypes(L, 1, typeof(TestEventListener), typeof(TestEventListener.VoidDelegate)))
            {
                TestEventListener obj = (TestEventListener)ToLua.ToObject(L, 1);
                TestEventListener.VoidDelegate arg0 = null;
                LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

                if (funcType2 != LuaTypes.LUA_TFUNCTION)
                {
                    arg0 = (TestEventListener.VoidDelegate)ToLua.ToObject(L, 2);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 2);
                    arg0 = DelegateFactory.CreateDelegate(typeof(TestEventListener.VoidDelegate), func) as TestEventListener.VoidDelegate;
                }

                obj.SetOnFinished(arg0);
                return(0);
            }
            else if (count == 2 && ToLua.CheckTypes(L, 1, typeof(TestEventListener), typeof(TestEventListener.OnClick)))
            {
                TestEventListener         obj  = (TestEventListener)ToLua.ToObject(L, 1);
                TestEventListener.OnClick arg0 = null;
                LuaTypes funcType2             = LuaDLL.lua_type(L, 2);

                if (funcType2 != LuaTypes.LUA_TFUNCTION)
                {
                    arg0 = (TestEventListener.OnClick)ToLua.ToObject(L, 2);
                }
                else
                {
                    LuaFunction func = ToLua.ToLuaFunction(L, 2);
                    arg0 = DelegateFactory.CreateDelegate(typeof(TestEventListener.OnClick), func) as TestEventListener.OnClick;
                }

                obj.SetOnFinished(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.tolua_error(L, "invalid arguments to method: TestEventListener.SetOnFinished"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Example #5
0
 public static Delegate TestEventListener_VoidDelegate(LuaFunction func, LuaTable self, bool flag)
 {
     if (func == null)
     {
         return(new TestEventListener.VoidDelegate(delegate
         {
         }));
     }
     TestDelegate.TestEventListener_VoidDelegate_Event testEventListener_VoidDelegate_Event = new TestDelegate.TestEventListener_VoidDelegate_Event(func);
     TestEventListener.VoidDelegate voidDelegate = new TestEventListener.VoidDelegate(testEventListener_VoidDelegate_Event.Call);
     testEventListener_VoidDelegate_Event.method = voidDelegate.Method;
     return(voidDelegate);
 }
Example #6
0
    public static TestEventListener.VoidDelegate TestEventListener_VoidDelegate(LuaFunction func, LuaTable self, bool flag)
    {
        if (func == null)
        {
            TestEventListener.VoidDelegate fn = delegate { };
            return(fn);
        }

        TestEventListener_VoidDelegate_Event target = new TestEventListener_VoidDelegate_Event(func);

        TestEventListener.VoidDelegate d = target.Call;
        target.method = d.Method;
        return(d);
    }
Example #7
0
    public TestEventListener.VoidDelegate TestEventListener_VoidDelegate(LuaFunction func, LuaTable self, bool flag)
    {
        if (func == null)
        {
            TestEventListener.VoidDelegate fn = delegate(UnityEngine.GameObject param0) { };
            return(fn);
        }

        if (!flag)
        {
            TestEventListener_VoidDelegate_Event target = new TestEventListener_VoidDelegate_Event(func);
            TestEventListener.VoidDelegate       d      = target.Call;
            target.method = d.Method;
            return(d);
        }
        else
        {
            TestEventListener_VoidDelegate_Event target = new TestEventListener_VoidDelegate_Event(func, self);
            TestEventListener.VoidDelegate       d      = target.CallWithSelf;
            target.method = d.Method;
            return(d);
        }
    }
Example #8
0
 public void SetOnFinished(TestEventListener.VoidDelegate click)
 {
     Debugger.Log("SetOnFinished VoidDelegate");
 }
Example #9
0
 void Push_TestEventListener_VoidDelegate(IntPtr L, TestEventListener.VoidDelegate o)
 {
     ToLua.Push(L, o);
 }