Пример #1
0
    public static Delegate UIWidget_HitCheck(LuaFunction func)
    {
        if (func == null)
        {
            UIWidget.HitCheck fn = delegate { return(false); };
            return(fn);
        }

        UIWidget.HitCheck d = (new UIWidget_HitCheck_Event(func)).Call;
        return(d);
    }
Пример #2
0
 public static Delegate UIWidget_HitCheck(LuaFunction func)
 {
     UIWidget.HitCheck d = (param0) =>
     {
         int    top = func.BeginPCall();
         IntPtr L   = func.GetLuaState();
         LuaScriptMgr.Push(L, param0);
         func.PCall(top, 1);
         object[] objs = func.PopValues(top);
         func.EndPCall(top);
         return((bool)objs[0]);
     };
     return(d);
 }
Пример #3
0
	static int get_hitCheck(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			UIWidget obj = (UIWidget)o;
			UIWidget.HitCheck ret = obj.hitCheck;
			ToLua.Push(L, ret);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o, "attempt to index hitCheck on a nil value");
		}
	}
Пример #4
0
	static int set_hitCheck(IntPtr L)
	{
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			UIWidget obj = (UIWidget)o;
			UIWidget.HitCheck arg0 = (UIWidget.HitCheck)ToLua.CheckDelegate<UIWidget.HitCheck>(L, 2);
			obj.hitCheck = arg0;
			return 0;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o, "attempt to index hitCheck on a nil value");
		}
	}
        static internal int checkDelegate(IntPtr l, int p, out UIWidget.HitCheck 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 = (UIWidget.HitCheck)checkObj(l, p);
                return(op);
            }
            LuaDelegate ld;

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

            l  = LuaState.get(l).L;
            ua = (UnityEngine.Vector3 a1) =>
            {
                int error = pushTry(l);

                pushValue(l, a1);
                ld.pcall(1, error);
                bool ret;
                checkType(l, error + 1, out ret);
                LuaDLL.lua_settop(l, error - 1);
                return(ret);
            };
            ld.d = ua;
            return(op);
        }
Пример #6
0
    public UIWidget.HitCheck UIWidget_HitCheck(LuaFunction func, LuaTable self, bool flag)
    {
        if (func == null)
        {
            UIWidget.HitCheck fn = delegate(UnityEngine.Vector3 param0) { return(false); };
            return(fn);
        }

        if (!flag)
        {
            UIWidget_HitCheck_Event target = new UIWidget_HitCheck_Event(func);
            UIWidget.HitCheck       d      = target.Call;
            target.method = d.Method;
            return(d);
        }
        else
        {
            UIWidget_HitCheck_Event target = new UIWidget_HitCheck_Event(func, self);
            UIWidget.HitCheck       d      = target.CallWithSelf;
            target.method = d.Method;
            return(d);
        }
    }
Пример #7
0
        internal static int checkDelegate(IntPtr l, int p, out UIWidget.HitCheck ua)
        {
            int result = LuaObject.extractFunction(l, p);

            if (LuaDLL.pua_isnil(l, p))
            {
                ua = null;
                return(result);
            }
            if (LuaDLL.pua_isuserdata(l, p) == 1)
            {
                ua = (UIWidget.HitCheck)LuaObject.checkObj(l, p);
                return(result);
            }
            LuaDelegate ld;

            LuaObject.checkType(l, -1, out ld);
            LuaDLL.pua_pop(l, 1);
            if (ld.d != null)
            {
                ua = (UIWidget.HitCheck)ld.d;
                return(result);
            }
            l  = LuaState.get(l).L;
            ua = delegate(Vector3 a1)
            {
                int num = LuaObject.pushTry(l);
                LuaObject.pushValue(l, a1);
                ld.pcall(1, num);
                bool result2;
                LuaObject.checkType(l, num + 1, out result2);
                LuaDLL.pua_settop(l, num - 1);
                return(result2);
            };
            ld.d = ua;
            return(result);
        }
Пример #8
0
 void Push_UIWidget_HitCheck(IntPtr L, UIWidget.HitCheck o)
 {
     ToLua.Push(L, o);
 }