diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js index 08a2ef2a0a..3f9337c24b 100644 --- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_auto_api.js @@ -16858,9 +16858,9 @@ getBarChangeRate : function ( /** * @method setReverseDirection -* @param {bool|bool} bool -*/ -setReverseDirection : function( + * @param {bool} arg0 + */ +setReverseDirection : function ( bool ) { diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp index a38cbd9a20..be93134dc8 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_auto.cpp @@ -45761,36 +45761,22 @@ bool js_cocos2dx_ProgressTimer_getBarChangeRate(JSContext *cx, uint32_t argc, js } bool js_cocos2dx_ProgressTimer_setReverseDirection(JSContext *cx, uint32_t argc, jsval *vp) { - bool ok = true; - cocos2d::ProgressTimer* cobj = nullptr; - JS::CallArgs args = JS::CallArgsFromVp(argc, vp); - JS::RootedObject obj(cx); - obj.set(args.thisv().toObjectOrNull()); + bool ok = true; + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); js_proxy_t *proxy = jsb_get_js_proxy(obj); - cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : nullptr); + cocos2d::ProgressTimer* cobj = (cocos2d::ProgressTimer *)(proxy ? proxy->ptr : NULL); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_ProgressTimer_setReverseDirection : Invalid Native Object"); - do { - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - cobj->setReverseDirection(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); + if (argc == 1) { + bool arg0; + arg0 = JS::ToBoolean(args.get(0)); + JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_ProgressTimer_setReverseDirection : Error processing arguments"); + cobj->setReverseDirection(arg0); + args.rval().setUndefined(); + return true; + } - do { - if (argc == 1) { - bool arg0; - arg0 = JS::ToBoolean(args.get(0)); - cobj->setReverseProgress(arg0); - args.rval().setUndefined(); - return true; - } - } while(0); - - JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setReverseDirection : wrong number of arguments"); + JS_ReportError(cx, "js_cocos2dx_ProgressTimer_setReverseDirection : wrong number of arguments: %d, was expecting %d", argc, 1); return false; } bool js_cocos2dx_ProgressTimer_getMidpoint(JSContext *cx, uint32_t argc, jsval *vp) diff --git a/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua b/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua index adf5619125..da3d9b52dc 100644 --- a/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua +++ b/cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua @@ -12,7 +12,7 @@ -- @return bool#bool ret (return value: bool) -------------------------------- --- Return the Reverse direction.
+-- Return the Reverse direction.
-- return If the direction is Anti-clockwise,it will return true. -- @function [parent=#ProgressTimer] isReverseDirection -- @param self @@ -81,13 +81,13 @@ -- @return vec2_table#vec2_table ret (return value: vec2_table) -------------------------------- --- @overload self, bool --- @overload self, bool --- @function [parent=#ProgressTimer] setReverseDirection +-- Set the Reverse direction.
+-- param value If value is false it will clockwise,if is true it will Anti-clockwise. +-- @function [parent=#ProgressTimer] setReverseDirection -- @param self --- @param #bool reverse +-- @param #bool value -- @return ProgressTimer#ProgressTimer self (return value: cc.ProgressTimer) - + -------------------------------- -- Returns the Midpoint.
-- return A Vec2. diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index a35cc968ea..f19ff25a5e 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -71407,47 +71407,42 @@ int lua_cocos2dx_ProgressTimer_setReverseDirection(lua_State* tolua_S) int argc = 0; cocos2d::ProgressTimer* cobj = nullptr; bool ok = true; + #if COCOS2D_DEBUG >= 1 tolua_Error tolua_err; #endif + #if COCOS2D_DEBUG >= 1 if (!tolua_isusertype(tolua_S,1,"cc.ProgressTimer",0,&tolua_err)) goto tolua_lerror; #endif + cobj = (cocos2d::ProgressTimer*)tolua_tousertype(tolua_S,1,0); + #if COCOS2D_DEBUG >= 1 - if (!cobj) + if (!cobj) { tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'", nullptr); return 0; } #endif + argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - bool arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); + if (argc == 1) + { + bool arg0; - if (!ok) { break; } - cobj->setReverseDirection(arg0); - lua_settop(tolua_S, 1); - return 1; + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ProgressTimer_setReverseDirection'", nullptr); + return 0; } - }while(0); - ok = true; - do{ - if (argc == 1) { - bool arg0; - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.ProgressTimer:setReverseDirection"); - - if (!ok) { break; } - cobj->setReverseProgress(arg0); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setReverseProgress",argc, 1); + cobj->setReverseDirection(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ProgressTimer:setReverseDirection",argc, 1); return 0; #if COCOS2D_DEBUG >= 1