static int AddOneDelegateToTimeCalc(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(TimeHelper), typeof(string), typeof(float), typeof(DelegateHelper.StringDelegate))) { TimeHelper obj = (TimeHelper)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); float arg1 = (float)LuaDLL.lua_tonumber(L, 3); DelegateHelper.StringDelegate arg2 = null; LuaTypes funcType4 = LuaDLL.lua_type(L, 4); if (funcType4 != LuaTypes.LUA_TFUNCTION) { arg2 = (DelegateHelper.StringDelegate)ToLua.ToObject(L, 4); } else { LuaFunction func = ToLua.ToLuaFunction(L, 4); arg2 = DelegateFactory.CreateDelegate(typeof(DelegateHelper.StringDelegate), func) as DelegateHelper.StringDelegate; } bool o = obj.AddOneDelegateToTimeCalc(arg0, arg1, arg2); LuaDLL.lua_pushboolean(L, o); return(1); } else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(TimeHelper), typeof(string), typeof(float), typeof(DelegateHelper.VoidDelegate))) { TimeHelper obj = (TimeHelper)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); float arg1 = (float)LuaDLL.lua_tonumber(L, 3); DelegateHelper.VoidDelegate arg2 = null; LuaTypes funcType4 = LuaDLL.lua_type(L, 4); if (funcType4 != LuaTypes.LUA_TFUNCTION) { arg2 = (DelegateHelper.VoidDelegate)ToLua.ToObject(L, 4); } else { LuaFunction func = ToLua.ToLuaFunction(L, 4); arg2 = DelegateFactory.CreateDelegate(typeof(DelegateHelper.VoidDelegate), func) as DelegateHelper.VoidDelegate; } bool o = obj.AddOneDelegateToTimeCalc(arg0, arg1, arg2); LuaDLL.lua_pushboolean(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: TimeHelper.AddOneDelegateToTimeCalc")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }