您好,登錄后才能下訂單哦!
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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。