void CallAction() { LuaThread thread = LuaThread.CurrentThread; int frameBase = thread.BeginCall(this, 0); thread.Call(frameBase, 0); thread.EndCall(frameBase); }
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); }
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); }
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); }
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); }
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); }
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); }