您好,登录后才能下订单哦!
public List<object> call(string func, params object[] list)
{
int top1 = LuaDLL.lua_gettop(LuaState.getInstance.L);
LuaDLL.lua_getglobal(LuaState.getInstance.L, func);
foreach(object o in list)
{
if(o.GetType() == typeof(string))
{
LuaDLL.lua_pushstring(LuaState.getInstance.L, (string)o);
}else if(o.GetType() == typeof(Int64))
{
LuaDLL.lua_pushnumber(LuaState.getInstance.L, (Int64)o);
}else if(o.GetType() == typeof(double))
{
LuaDLL.lua_pushnumber(LuaState.getInstance.L, (double)o);
}
else if (o.GetType() == typeof(bool))
{
LuaDLL.lua_pushboolean(LuaState.getInstance.L, (bool)o);
}
else if (o.GetType() == typeof(Dictionary<object,object>))
{
pushMapParams(LuaState.getInstance.L, (Dictionary<object, object>)o);
}
else
{
LuaDLL.lua_pushlightuserdata(LuaState.getInstance.L,(IntPtr)o);
}
}
。。。。
}
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。