Esempio n. 1
0
        void CallAction()
        {
            LuaThread thread    = LuaThread.CurrentThread;
            int       frameBase = thread.BeginCall(this, 0);

            thread.Call(frameBase, 0);
            thread.EndCall(frameBase);
        }
Esempio n. 2
0
        void CallAction <T>(T a)
        {
            LuaThread thread    = LuaThread.CurrentThread;
            int       frameBase = thread.BeginCall(this, 1);

            thread.CallArgument(frameBase, 0, a);
            thread.Call(frameBase, 0);
            thread.EndCall(frameBase);
        }
Esempio n. 3
0
        void CallAction <T1, T2>(T1 a, T2 b)
        {
            LuaThread thread    = LuaThread.CurrentThread;
            int       frameBase = thread.BeginCall(this, 2);

            thread.CallArgument(frameBase, 0, a);
            thread.CallArgument(frameBase, 1, b);
            thread.Call(frameBase, 0);
            thread.EndCall(frameBase);
        }
Esempio n. 4
0
        TResult CallFunc <TResult>()
        {
            LuaThread thread    = LuaThread.CurrentThread;
            int       frameBase = thread.BeginCall(this, 0);

            thread.Call(frameBase, 1);
            TResult result = thread.CallResult <TResult>(frameBase, 0);

            thread.EndCall(frameBase);
            return(result);
        }
Esempio n. 5
0
        void CallAction <T1, T2, T3, T4>(T1 a, T2 b, T3 c, T4 d)
        {
            LuaThread thread    = LuaThread.CurrentThread;
            int       frameBase = thread.BeginCall(this, 4);

            thread.CallArgument(frameBase, 0, a);
            thread.CallArgument(frameBase, 1, b);
            thread.CallArgument(frameBase, 2, c);
            thread.CallArgument(frameBase, 3, d);
            thread.Call(frameBase, 0);
            thread.EndCall(frameBase);
        }
Esempio n. 6
0
        internal virtual LuaValue Call(LuaValue a)
        {
            LuaThread thread    = LuaThread.CurrentThread;
            int       frameBase = thread.BeginCall(this, 1);

            thread.CallArgument(frameBase, 0, a);
            thread.Call(frameBase, 1);
            LuaValue result = thread.CallResult(frameBase, 0);

            thread.EndCall(frameBase);
            return(result);
        }
Esempio n. 7
0
        TResult CallFunc <T1, T2, TResult>(T1 a, T2 b)
        {
            LuaThread thread    = LuaThread.CurrentThread;
            int       frameBase = thread.BeginCall(this, 2);

            thread.CallArgument(frameBase, 0, a);
            thread.CallArgument(frameBase, 1, b);
            thread.Call(frameBase, 1);
            TResult result = thread.CallResult <TResult>(frameBase, 0);

            thread.EndCall(frameBase);
            return(result);
        }