public static Delegate UIDrawCall_OnCreateDrawCall(LuaFunction func)
 {
     UIDrawCall.OnCreateDrawCall d = (param0, param1, param2) =>
     {
         int    top = func.BeginPCall();
         IntPtr L   = func.GetLuaState();
         LuaScriptMgr.Push(L, param0);
         LuaScriptMgr.Push(L, param1);
         LuaScriptMgr.Push(L, param2);
         func.PCall(top, 3);
         func.EndPCall(top);
     };
     return(d);
 }
Esempio n. 2
0
	static int get_onCreateDrawCall(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			UIPanel obj = (UIPanel)o;
			UIDrawCall.OnCreateDrawCall ret = obj.onCreateDrawCall;
			ToLua.Push(L, ret);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o, "attempt to index onCreateDrawCall on a nil value");
		}
	}
Esempio n. 3
0
	static int set_onCreateDrawCall(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			UIPanel obj = (UIPanel)o;
			UIDrawCall.OnCreateDrawCall arg0 = (UIDrawCall.OnCreateDrawCall)ToLua.CheckDelegate<UIDrawCall.OnCreateDrawCall>(L, 2);
			obj.onCreateDrawCall = arg0;
			return 0;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o, "attempt to index onCreateDrawCall on a nil value");
		}
	}
Esempio n. 4
0
        static internal int checkDelegate(IntPtr l, int p, out UIDrawCall.OnCreateDrawCall ua)
        {
            int op = extractFunction(l, p);

            if (LuaDLL.lua_isnil(l, p))
            {
                ua = null;
                return(op);
            }
            else if (LuaDLL.lua_isuserdata(l, p) == 1)
            {
                ua = (UIDrawCall.OnCreateDrawCall)checkObj(l, p);
                return(op);
            }
            LuaDelegate ld;

            checkType(l, -1, out ld);
            LuaDLL.lua_pop(l, 1);
            if (ld.d != null)
            {
                ua = (UIDrawCall.OnCreateDrawCall)ld.d;
                return(op);
            }

            l  = LuaState.get(l).L;
            ua = (UIDrawCall a1, UnityEngine.MeshFilter a2, UnityEngine.MeshRenderer a3) =>
            {
                int error = pushTry(l);

                pushValue(l, a1);
                pushValue(l, a2);
                pushValue(l, a3);
                ld.pcall(3, error);
                LuaDLL.lua_settop(l, error - 1);
            };
            ld.d = ua;
            return(op);
        }