Exemplo n.º 1
0
    private Delegate System_Action_Create(LuaFunction func, LuaTable self, bool flag)
    {
        if (func == null)
        {
            Action fn = delegate() { };
            return(fn);
        }

        if (!flag)
        {
            System_Action_Event target = new System_Action_Event(func);
            System.Action       d      = target.Call;
            return(d);
        }
        else
        {
            System_Action_Event target = new System_Action_Event(func, self);
            System.Action       d      = target.CallWithSelf;
            return(d);
        }
    }
Exemplo n.º 2
0
    public System.Action System_Action(LuaFunction func, LuaTable self, bool flag)
    {
        if (func == null)
        {
            System.Action fn = delegate() { };
            return(fn);
        }

        if (!flag)
        {
            System_Action_Event target = new System_Action_Event(func);
            System.Action       d      = target.Call;
            target.method = d.Method;
            return(d);
        }
        else
        {
            System_Action_Event target = new System_Action_Event(func, self);
            System.Action       d      = target.CallWithSelf;
            target.method = d.Method;
            return(d);
        }
    }
Exemplo n.º 3
0
    public static Delegate System_Action(LuaFunction func, LuaTable self, bool flag)
    {
        if (func == null)
        {
            System.Action fn = delegate() { };
            return fn;
        }

        if(!flag)
        {
            System_Action_Event target = new System_Action_Event(func);
            System.Action d = target.Call;
            target.method = d.Method;
            return d;
        }
        else
        {
            System_Action_Event target = new System_Action_Event(func, self);
            System.Action d = target.CallWithSelf;
            target.method = d.Method;
            return d;
        }
    }