94 lines
2.1 KiB
C#
94 lines
2.1 KiB
C#
//this source code was auto-generated by tolua#, do not modify it
|
|
using System;
|
|
using LuaInterface;
|
|
|
|
public class GameLogic_LuaLoaderWrap
|
|
{
|
|
public static void Register(LuaState L)
|
|
{
|
|
L.BeginClass(typeof(GameLogic.LuaLoader), typeof(LuaInterface.LuaFileUtils));
|
|
L.RegFunction("InitConfigs", InitConfigs);
|
|
L.RegFunction("AddBundle", AddBundle);
|
|
L.RegFunction("ReadFile", ReadFile);
|
|
L.RegFunction("New", _CreateGameLogic_LuaLoader);
|
|
L.RegFunction("__tostring", ToLua.op_ToString);
|
|
L.EndClass();
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _CreateGameLogic_LuaLoader(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
|
|
if (count == 0)
|
|
{
|
|
GameLogic.LuaLoader obj = new GameLogic.LuaLoader();
|
|
ToLua.PushObject(L, obj);
|
|
return 1;
|
|
}
|
|
else
|
|
{
|
|
return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: GameLogic.LuaLoader.New");
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int InitConfigs(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 1);
|
|
GameLogic.LuaLoader obj = (GameLogic.LuaLoader)ToLua.CheckObject<GameLogic.LuaLoader>(L, 1);
|
|
obj.InitConfigs();
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int AddBundle(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 2);
|
|
GameLogic.LuaLoader obj = (GameLogic.LuaLoader)ToLua.CheckObject<GameLogic.LuaLoader>(L, 1);
|
|
string arg0 = ToLua.CheckString(L, 2);
|
|
obj.AddBundle(arg0);
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int ReadFile(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 2);
|
|
GameLogic.LuaLoader obj = (GameLogic.LuaLoader)ToLua.CheckObject<GameLogic.LuaLoader>(L, 1);
|
|
string arg0 = ToLua.CheckString(L, 2);
|
|
byte[] o = obj.ReadFile(arg0);
|
|
ToLua.Push(L, o);
|
|
return 1;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
}
|
|
|