diff --git a/cocos2dx/tilemap_parallax_nodes/CCParallaxNode.cpp b/cocos2dx/tilemap_parallax_nodes/CCParallaxNode.cpp index ec24fd74d8..c8d6d82186 100644 --- a/cocos2dx/tilemap_parallax_nodes/CCParallaxNode.cpp +++ b/cocos2dx/tilemap_parallax_nodes/CCParallaxNode.cpp @@ -72,14 +72,15 @@ ParallaxNode * ParallaxNode::create() return pRet; } -void ParallaxNode::addChild(Node * child, unsigned int zOrder, int tag) +void ParallaxNode::addChild(Node * child, int zOrder, int tag) { CC_UNUSED_PARAM(zOrder); CC_UNUSED_PARAM(child); CC_UNUSED_PARAM(tag); CCAssert(0,"ParallaxNode: use addChild:z:parallaxRatio:positionOffset instead"); } -void ParallaxNode::addChild(Node *child, unsigned int z, const Point& ratio, const Point& offset) + +void ParallaxNode::addChild(Node *child, int z, const Point& ratio, const Point& offset) { CCAssert( child != NULL, "Argument must be non-nil"); PointObject *obj = PointObject::pointWithPoint(ratio, offset); diff --git a/cocos2dx/tilemap_parallax_nodes/CCParallaxNode.h b/cocos2dx/tilemap_parallax_nodes/CCParallaxNode.h index 1366bdcd4f..75fb982684 100644 --- a/cocos2dx/tilemap_parallax_nodes/CCParallaxNode.h +++ b/cocos2dx/tilemap_parallax_nodes/CCParallaxNode.h @@ -45,10 +45,10 @@ The children will be moved faster / slower than the parent according the the par */ class CC_DLL ParallaxNode : public Node { - /** array that holds the offset / ratio of the children */ - CC_SYNTHESIZE(struct _ccArray *, _parallaxArray, ParallaxArray) - public: + // Create a Parallax node + static ParallaxNode * create(); + /** Adds a child to the container with a z-order, a parallax ratio and a position offset It returns self, so you can chain several addChilds. @since v0.8 @@ -56,17 +56,21 @@ public: ParallaxNode(); virtual ~ParallaxNode(); - static ParallaxNode * create(); - virtual void addChild(Node * child, unsigned int z, const Point& parallaxRatio, const Point& positionOffset); - // super methods - virtual void addChild(Node * child, unsigned int zOrder, int tag); - virtual void removeChild(Node* child, bool cleanup); - virtual void removeAllChildrenWithCleanup(bool cleanup); - virtual void visit(void); + virtual void addChild(Node * child, int z, const Point& parallaxRatio, const Point& positionOffset); + + // + // Overrides + // + virtual void addChild(Node * child, int zOrder, int tag) override; + virtual void removeChild(Node* child, bool cleanup) override; + virtual void removeAllChildrenWithCleanup(bool cleanup) override; + virtual void visit(void) override; private: Point absolutePosition(); protected: Point _lastPosition; + /** array that holds the offset / ratio of the children */ + CC_SYNTHESIZE(struct _ccArray *, _parallaxArray, ParallaxArray) }; // end of tilemap_parallax_nodes group diff --git a/samples/Cpp/TestCpp/Classes/Box2DTest/Box2dTest.h b/samples/Cpp/TestCpp/Classes/Box2DTest/Box2dTest.h index 48304fa48e..d9b2edb6cd 100644 --- a/samples/Cpp/TestCpp/Classes/Box2DTest/Box2dTest.h +++ b/samples/Cpp/TestCpp/Classes/Box2DTest/Box2dTest.h @@ -5,17 +5,6 @@ #include "Box2D/Box2D.h" #include "../testBasic.h" -class PhysicsSprite : public Sprite -{ -public: - PhysicsSprite(); - void setPhysicsBody(b2Body * body); - virtual bool isDirty(void); - virtual AffineTransform nodeToParentTransform(void); -private: - b2Body* _body; // strong ref -}; - class Box2DTestLayer : public Layer { Texture2D* _spriteTexture; // weak ref diff --git a/samples/Cpp/TestCpp/Classes/SpriteTest/SpriteTest.cpp.REMOVED.git-id b/samples/Cpp/TestCpp/Classes/SpriteTest/SpriteTest.cpp.REMOVED.git-id index b47473e929..2e0ea9daa3 100644 --- a/samples/Cpp/TestCpp/Classes/SpriteTest/SpriteTest.cpp.REMOVED.git-id +++ b/samples/Cpp/TestCpp/Classes/SpriteTest/SpriteTest.cpp.REMOVED.git-id @@ -1 +1 @@ -31da76f078d1058b703cd45135e59ad906994e9b \ No newline at end of file +963dd3732308b99e5251cb07db6e2260d3574e29 \ No newline at end of file