diff --git a/cocos2dx/sprite_nodes/CCSpriteBatchNode.h b/cocos2dx/sprite_nodes/CCSpriteBatchNode.h index c8770667eb..091c012160 100644 --- a/cocos2dx/sprite_nodes/CCSpriteBatchNode.h +++ b/cocos2dx/sprite_nodes/CCSpriteBatchNode.h @@ -154,7 +154,8 @@ public: virtual const BlendFunc& getBlendFunc(void) const override; virtual void visit(void) override; - using Node::addChild; + virtual void addChild(Node* child) override{ Node::addChild(child);} + virtual void addChild(Node * child, int zOrder) override { Node::addChild(child, zOrder);} virtual void addChild(Node * child, int zOrder, int tag) override; virtual void reorderChild(Node *child, int zOrder) override; diff --git a/scripting/lua/script/Deprecated.lua b/scripting/lua/script/Deprecated.lua index 75587fb4e9..8b951e098f 100644 --- a/scripting/lua/script/Deprecated.lua +++ b/scripting/lua/script/Deprecated.lua @@ -986,11 +986,28 @@ if (kTargetIphone == targetPlatform) or (kTargetIpad == targetPlatform) or (kTar end --functions of WebSocket will be deprecated end ---enums of CCRenderTexture will be deprecated begin +--functions of CCRenderTexture will be deprecated begin local CCRenderTextureDeprecated = { } function CCRenderTextureDeprecated.newCCImage(self) deprecatedTip("CCRenderTexture:newCCImage","CCRenderTexture:newImage") return self:newImage() end rawset(CCRenderTexture, "newCCImage", CCRenderTextureDeprecated.newCCImage) ---enums of CCRenderTexture will be deprecated end +--functions of CCRenderTexture will be deprecated end + +--functions of Sprite will be deprecated begin +local CCSpriteDeprecated = { } +function CCSpriteDeprecated.setFlipX(self,flag) + deprecatedTip("CCSpriteDeprecated:setFlipX","CCSpriteDeprecated:setFlippedX") + return self:setFlippedX(flag) +end +rawset(cc.Sprite, "setFlipX", CCSpriteDeprecated.setFlipX) + +function CCSpriteDeprecated.setFlipY(self,flag) + deprecatedTip("CCSpriteDeprecated:setFlipY","CCSpriteDeprecated:setFlippedY") + return self:setFlippedY(flag) +end +rawset(cc.Sprite, "setFlipY", CCSpriteDeprecated.setFlipY) +--functions of Sprite will be deprecated end + +