public AddEventListener ( string strType, EventCallback0 callback ) : void | ||
strType | string | |
callback | EventCallback0 | |
return | void |
static public int AddEventListener(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (matchType(l, argc, 2, typeof(string), typeof(FairyGUI.EventCallback1))) { FairyGUI.EventDispatcher self = (FairyGUI.EventDispatcher)checkSelf(l); System.String a1; checkType(l, 2, out a1); FairyGUI.EventCallback1 a2; LuaDelegation.checkDelegate(l, 3, out a2); self.AddEventListener(a1, a2); pushValue(l, true); return(1); } else if (matchType(l, argc, 2, typeof(string), typeof(FairyGUI.EventCallback0))) { FairyGUI.EventDispatcher self = (FairyGUI.EventDispatcher)checkSelf(l); System.String a1; checkType(l, 2, out a1); FairyGUI.EventCallback0 a2; LuaDelegation.checkDelegate(l, 3, out a2); self.AddEventListener(a1, a2); pushValue(l, true); return(1); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
static int AddEventListener(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3 && TypeChecker.CheckTypes <FairyGUI.EventCallback0>(L, 3)) { FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1); string arg0 = ToLua.CheckString(L, 2); FairyGUI.EventCallback0 arg1 = (FairyGUI.EventCallback0)ToLua.ToObject(L, 3); obj.AddEventListener(arg0, arg1); return(0); } else if (count == 3 && TypeChecker.CheckTypes <FairyGUI.EventCallback1>(L, 3)) { FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.CheckObject <FairyGUI.EventDispatcher>(L, 1); string arg0 = ToLua.CheckString(L, 2); FairyGUI.EventCallback1 arg1 = (FairyGUI.EventCallback1)ToLua.ToObject(L, 3); obj.AddEventListener(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.EventDispatcher.AddEventListener")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int AddEventListener(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.EventDispatcher), typeof(string), typeof(FairyGUI.EventCallback1))) { FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); FairyGUI.EventCallback1 arg1 = null; LuaTypes funcType3 = LuaDLL.lua_type(L, 3); if (funcType3 != LuaTypes.LUA_TFUNCTION) { arg1 = (FairyGUI.EventCallback1)ToLua.ToObject(L, 3); } else { LuaFunction func = ToLua.ToLuaFunction(L, 3); arg1 = DelegateFactory.CreateDelegate(typeof(FairyGUI.EventCallback1), func) as FairyGUI.EventCallback1; } obj.AddEventListener(arg0, arg1); return(0); } else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.EventDispatcher), typeof(string), typeof(FairyGUI.EventCallback0))) { FairyGUI.EventDispatcher obj = (FairyGUI.EventDispatcher)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); FairyGUI.EventCallback0 arg1 = null; LuaTypes funcType3 = LuaDLL.lua_type(L, 3); if (funcType3 != LuaTypes.LUA_TFUNCTION) { arg1 = (FairyGUI.EventCallback0)ToLua.ToObject(L, 3); } else { LuaFunction func = ToLua.ToLuaFunction(L, 3); arg1 = DelegateFactory.CreateDelegate(typeof(FairyGUI.EventCallback0), func) as FairyGUI.EventCallback0; } obj.AddEventListener(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.EventDispatcher.AddEventListener")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }