Beispiel #1
0
        private static int _PrintCallback(LuaState luaState)
        {
            try {
                var n       = LuaLib.LuaGetTop(luaState);
                var builder = new StringBuilder();
                for (var i = 1; i <= n; ++i)
                {
                    if (LuaLib.LuaIsString(luaState, i))
                    {
                        builder.Append(LuaLib.LuaToString(luaState, i));
                        builder.Append(" ");
                    }
                }
                Logger <ILuaRuntime> .L(builder.ToString());
            } catch (Exception e) {
                Logger <ILuaRuntime> .X(e);
            }

            return(0);
        }