static int set_OnRefEvent(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			TestExport obj = (TestExport)o;
			TestExport.TestRefEvent arg0 = null;
			LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

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

			obj.OnRefEvent = arg0;
			return 0;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index OnRefEvent on a nil value" : e.Message);
		}
	}
	static int get_OnRefEvent(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			TestExport obj = (TestExport)o;
			TestExport.TestRefEvent ret = obj.OnRefEvent;
			ToLua.Push(L, ret);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index OnRefEvent on a nil value" : e.Message);
		}
	}
Example #3
0
    static int set_OnRefEvent(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            TestExport obj = (TestExport)o;
            TestExport.TestRefEvent arg0 = (TestExport.TestRefEvent)ToLua.CheckDelegate <TestExport.TestRefEvent>(L, 2);
            obj.OnRefEvent = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index OnRefEvent on a nil value"));
        }
    }
    private static int get_OnRefEvent(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            TestExport testExport = (TestExport)obj;
            TestExport.TestRefEvent onRefEvent = testExport.OnRefEvent;
            ToLua.Push(L, onRefEvent);
            result = 1;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index OnRefEvent on a nil value");
        }
        return(result);
    }
Example #5
0
    public TestExport.TestRefEvent TestExport_TestRefEvent(LuaFunction func, LuaTable self, bool flag)
    {
        if (func == null)
        {
            TestExport.TestRefEvent fn = delegate(ref UnityEngine.GameObject param0) { };
            return(fn);
        }

        if (!flag)
        {
            TestExport_TestRefEvent_Event target = new TestExport_TestRefEvent_Event(func);
            TestExport.TestRefEvent       d      = target.Call;
            target.method = d.Method;
            return(d);
        }
        else
        {
            TestExport_TestRefEvent_Event target = new TestExport_TestRefEvent_Event(func, self);
            TestExport.TestRefEvent       d      = target.CallWithSelf;
            target.method = d.Method;
            return(d);
        }
    }
Example #6
0
 void Push_TestExport_TestRefEvent(IntPtr L, TestExport.TestRefEvent o)
 {
     ToLua.Push(L, o);
 }