static int AddFrameDelegateToTimeCalc(IntPtr L) { try { ToLua.CheckArgsCount(L, 4); TimeHelper obj = (TimeHelper)ToLua.CheckObject(L, 1, typeof(TimeHelper)); string arg0 = ToLua.CheckString(L, 2); float arg1 = (float)LuaDLL.luaL_checknumber(L, 3); DelegateHelper.FloatDelegate arg2 = null; LuaTypes funcType4 = LuaDLL.lua_type(L, 4); if (funcType4 != LuaTypes.LUA_TFUNCTION) { arg2 = (DelegateHelper.FloatDelegate)ToLua.CheckObject(L, 4, typeof(DelegateHelper.FloatDelegate)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 4); arg2 = DelegateFactory.CreateDelegate(typeof(DelegateHelper.FloatDelegate), func) as DelegateHelper.FloatDelegate; } bool o = obj.AddFrameDelegateToTimeCalc(arg0, arg1, arg2); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }