250 lines
5.7 KiB
C#
250 lines
5.7 KiB
C#
//this source code was auto-generated by tolua#, do not modify it
|
|
using System;
|
|
using LuaInterface;
|
|
|
|
public class GameLogic_GlobalEventWrap
|
|
{
|
|
public static void Register(LuaState L)
|
|
{
|
|
L.BeginClass(typeof(GameLogic.GlobalEvent), typeof(GameLogic.GameEvent));
|
|
L.RegFunction("add", add);
|
|
L.RegFunction("remove", remove);
|
|
L.RegFunction("dispatch", dispatch);
|
|
L.RegFunction("dispatchAsync", dispatchAsync);
|
|
L.RegFunction("hasEvent", hasEvent);
|
|
L.RegFunction("updateEvent", updateEvent);
|
|
L.RegFunction("AddLuaEvent", AddLuaEvent);
|
|
L.RegFunction("RemoveLuaEvent", RemoveLuaEvent);
|
|
L.RegFunction("DispatchLuaEvent", DispatchLuaEvent);
|
|
L.RegFunction("New", _CreateGameLogic_GlobalEvent);
|
|
L.RegFunction("__tostring", ToLua.op_ToString);
|
|
L.RegVar("inst", get_inst, null);
|
|
L.EndClass();
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _CreateGameLogic_GlobalEvent(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
|
|
if (count == 0)
|
|
{
|
|
GameLogic.GlobalEvent obj = new GameLogic.GlobalEvent();
|
|
ToLua.PushObject(L, obj);
|
|
return 1;
|
|
}
|
|
else
|
|
{
|
|
return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: GameLogic.GlobalEvent.New");
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int add(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
|
|
if (count == 2)
|
|
{
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
GameLogic.GameEventHandler arg1 = (GameLogic.GameEventHandler)ToLua.CheckDelegate<GameLogic.GameEventHandler>(L, 2);
|
|
GameLogic.GlobalEvent.add(arg0, arg1);
|
|
return 0;
|
|
}
|
|
else if (count == 3)
|
|
{
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
GameLogic.GameEventHandler arg1 = (GameLogic.GameEventHandler)ToLua.CheckDelegate<GameLogic.GameEventHandler>(L, 2);
|
|
bool arg2 = LuaDLL.luaL_checkboolean(L, 3);
|
|
GameLogic.GlobalEvent.add(arg0, arg1, arg2);
|
|
return 0;
|
|
}
|
|
else
|
|
{
|
|
return LuaDLL.luaL_throw(L, "invalid arguments to method: GameLogic.GlobalEvent.add");
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int remove(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
|
|
if (count == 0)
|
|
{
|
|
GameLogic.GlobalEvent.remove();
|
|
return 0;
|
|
}
|
|
else if (count == 1)
|
|
{
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
GameLogic.GlobalEvent.remove(arg0);
|
|
return 0;
|
|
}
|
|
else if (count == 2)
|
|
{
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
GameLogic.GameEventHandler arg1 = (GameLogic.GameEventHandler)ToLua.CheckDelegate<GameLogic.GameEventHandler>(L, 2);
|
|
GameLogic.GlobalEvent.remove(arg0, arg1);
|
|
return 0;
|
|
}
|
|
else
|
|
{
|
|
return LuaDLL.luaL_throw(L, "invalid arguments to method: GameLogic.GlobalEvent.remove");
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int dispatch(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
object[] arg1 = ToLua.ToParamsObject(L, 2, count - 1);
|
|
GameLogic.GlobalEvent.dispatch(arg0, arg1);
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int dispatchAsync(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
object[] arg1 = ToLua.ToParamsObject(L, 2, count - 1);
|
|
GameLogic.GlobalEvent.dispatchAsync(arg0, arg1);
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int hasEvent(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 1);
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
bool o = GameLogic.GlobalEvent.hasEvent(arg0);
|
|
LuaDLL.lua_pushboolean(L, o);
|
|
return 1;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int updateEvent(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 0);
|
|
GameLogic.GlobalEvent.updateEvent();
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int AddLuaEvent(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 2);
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
GameLogic.GameEventHandler arg1 = (GameLogic.GameEventHandler)ToLua.CheckDelegate<GameLogic.GameEventHandler>(L, 2);
|
|
GameLogic.GlobalEvent.AddLuaEvent(arg0, arg1);
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int RemoveLuaEvent(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 2);
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
GameLogic.GameEventHandler arg1 = (GameLogic.GameEventHandler)ToLua.CheckDelegate<GameLogic.GameEventHandler>(L, 2);
|
|
GameLogic.GlobalEvent.RemoveLuaEvent(arg0, arg1);
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int DispatchLuaEvent(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
object[] arg1 = ToLua.ToParamsObject(L, 2, count - 1);
|
|
GameLogic.GlobalEvent.DispatchLuaEvent(arg0, arg1);
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int get_inst(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.PushObject(L, GameLogic.GlobalEvent.inst);
|
|
return 1;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
}
|
|
|