Reset the addChild functions of SpriteBatchNode and add some lua deprecated functions

This commit is contained in:
samuele3hu 2013-09-16 10:54:12 +08:00
parent 6b0d365d91
commit a3a915ead2
2 changed files with 21 additions and 3 deletions

View File

@ -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;

View File

@ -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