diff --git a/cocos/scripting/lua-bindings/auto/api/Node.lua b/cocos/scripting/lua-bindings/auto/api/Node.lua index 3fc9d7d51d..c26db8b953 100644 --- a/cocos/scripting/lua-bindings/auto/api/Node.lua +++ b/cocos/scripting/lua-bindings/auto/api/Node.lua @@ -181,9 +181,9 @@ -------------------------------- -- --- @function [parent=#Node] _setLocalZOrder +-- @function [parent=#Node] getOpacity -- @param self --- @param #int z +-- @return unsigned char#unsigned char ret (return value: unsigned char) -------------------------------- -- @@ -275,12 +275,6 @@ -- @param self -- @param #function callback --------------------------------- --- --- @function [parent=#Node] getOpacity --- @param self --- @return unsigned char#unsigned char ret (return value: unsigned char) - -------------------------------- -- Sets the position (x,y) using values between 0 and 1.
-- The positions in pixels is calculated like the following:
@@ -486,18 +480,6 @@ -- @function [parent=#Node] updateTransform -- @param self --------------------------------- --- Sets the shader program for this node
--- Since v2.0, each rendering node must set its shader program.
--- It should be set in initialize phase.
--- code
--- node->setGLrProgram(GLProgramCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR));
--- endcode
--- param shaderProgram The shader program --- @function [parent=#Node] setGLProgram --- @param self --- @param #cc.GLProgram glprogram - -------------------------------- -- Determines if the node is visible
-- see `setVisible(bool)`
@@ -977,6 +959,18 @@ -- @param self -- @return mat4_table#mat4_table ret (return value: mat4_table) +-------------------------------- +-- Sets the shader program for this node
+-- Since v2.0, each rendering node must set its shader program.
+-- It should be set in initialize phase.
+-- code
+-- node->setGLrProgram(GLProgramCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR));
+-- endcode
+-- param shaderProgram The shader program +-- @function [parent=#Node] setGLProgram +-- @param self +-- @param #cc.GLProgram glprogram + -------------------------------- -- Gets the scale factor of the node, when X and Y have the same scale factor.
-- warning Assert when `_scaleX != _scaleY`
diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp index 74a9ae1232..ed6dccab3a 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp @@ -3683,7 +3683,7 @@ int lua_cocos2dx_Node_removeAllComponents(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Node__setLocalZOrder(lua_State* tolua_S) +int lua_cocos2dx_Node_getOpacity(lua_State* tolua_S) { int argc = 0; cocos2d::Node* cobj = nullptr; @@ -3703,28 +3703,26 @@ int lua_cocos2dx_Node__setLocalZOrder(lua_State* tolua_S) #if COCOS2D_DEBUG >= 1 if (!cobj) { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node__setLocalZOrder'", nullptr); + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getOpacity'", nullptr); return 0; } #endif argc = lua_gettop(tolua_S)-1; - if (argc == 1) + if (argc == 0) { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Node:_setLocalZOrder"); if(!ok) return 0; - cobj->_setLocalZOrder(arg0); - return 0; + uint16_t ret = cobj->getOpacity(); + tolua_pushnumber(tolua_S,(lua_Number)ret); + return 1; } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:_setLocalZOrder",argc, 1); + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOpacity",argc, 0); return 0; #if COCOS2D_DEBUG >= 1 tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node__setLocalZOrder'.",&tolua_err); + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOpacity'.",&tolua_err); #endif return 0; @@ -4300,50 +4298,6 @@ int lua_cocos2dx_Node_setOnEnterCallback(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Node_getOpacity(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getOpacity'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - uint16_t ret = cobj->getOpacity(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getOpacity",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getOpacity'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Node_setNormalizedPosition(lua_State* tolua_S) { int argc = 0; @@ -5542,52 +5496,6 @@ int lua_cocos2dx_Node_updateTransform(lua_State* tolua_S) return 0; } -int lua_cocos2dx_Node_setGLProgram(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setGLProgram'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::GLProgram* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); - if(!ok) - return 0; - cobj->setGLProgram(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgram",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgram'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_Node_isVisible(lua_State* tolua_S) { int argc = 0; @@ -8498,6 +8406,52 @@ int lua_cocos2dx_Node_getWorldToNodeTransform(lua_State* tolua_S) return 0; } +int lua_cocos2dx_Node_setGLProgram(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setGLProgram'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::GLProgram* arg0; + + ok &= luaval_to_object(tolua_S, 2, "cc.GLProgram",&arg0); + if(!ok) + return 0; + cobj->setGLProgram(arg0); + return 0; + } + CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setGLProgram",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setGLProgram'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_Node_getScale(lua_State* tolua_S) { int argc = 0; @@ -8922,7 +8876,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"setRotationSkewX",lua_cocos2dx_Node_setRotationSkewX); tolua_function(tolua_S,"setonEnterTransitionDidFinishCallback",lua_cocos2dx_Node_setonEnterTransitionDidFinishCallback); tolua_function(tolua_S,"removeAllComponents",lua_cocos2dx_Node_removeAllComponents); - tolua_function(tolua_S,"_setLocalZOrder",lua_cocos2dx_Node__setLocalZOrder); + tolua_function(tolua_S,"getOpacity",lua_cocos2dx_Node_getOpacity); tolua_function(tolua_S,"setCameraMask",lua_cocos2dx_Node_setCameraMask); tolua_function(tolua_S,"getTag",lua_cocos2dx_Node_getTag); tolua_function(tolua_S,"getGLProgram",lua_cocos2dx_Node_getGLProgram); @@ -8935,7 +8889,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"setSkewX",lua_cocos2dx_Node_setSkewX); tolua_function(tolua_S,"setGLProgramState",lua_cocos2dx_Node_setGLProgramState); tolua_function(tolua_S,"setOnEnterCallback",lua_cocos2dx_Node_setOnEnterCallback); - tolua_function(tolua_S,"getOpacity",lua_cocos2dx_Node_getOpacity); tolua_function(tolua_S,"setNormalizedPosition",lua_cocos2dx_Node_setNormalizedPosition); tolua_function(tolua_S,"setonExitTransitionDidStartCallback",lua_cocos2dx_Node_setonExitTransitionDidStartCallback); tolua_function(tolua_S,"convertTouchToNodeSpace",lua_cocos2dx_Node_convertTouchToNodeSpace); @@ -8962,7 +8915,6 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"getAnchorPoint",lua_cocos2dx_Node_getAnchorPoint); tolua_function(tolua_S,"getNumberOfRunningActions",lua_cocos2dx_Node_getNumberOfRunningActions); tolua_function(tolua_S,"updateTransform",lua_cocos2dx_Node_updateTransform); - tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Node_setGLProgram); tolua_function(tolua_S,"isVisible",lua_cocos2dx_Node_isVisible); tolua_function(tolua_S,"getChildrenCount",lua_cocos2dx_Node_getChildrenCount); tolua_function(tolua_S,"convertToNodeSpaceAR",lua_cocos2dx_Node_convertToNodeSpaceAR); @@ -9026,6 +8978,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S) tolua_function(tolua_S,"update",lua_cocos2dx_Node_update); tolua_function(tolua_S,"sortAllChildren",lua_cocos2dx_Node_sortAllChildren); tolua_function(tolua_S,"getWorldToNodeTransform",lua_cocos2dx_Node_getWorldToNodeTransform); + tolua_function(tolua_S,"setGLProgram",lua_cocos2dx_Node_setGLProgram); tolua_function(tolua_S,"getScale",lua_cocos2dx_Node_getScale); tolua_function(tolua_S,"getNormalizedPosition",lua_cocos2dx_Node_getNormalizedPosition); tolua_function(tolua_S,"getRotationSkewX",lua_cocos2dx_Node_getRotationSkewX); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 4d85878dfc..e75f438ea3 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1560,7 +1560,6 @@ int register_all_cocos2dx(lua_State* tolua_S); - #endif // __cocos2dx_h__