Fix NewRendererTest after change

This commit is contained in:
Nite Luo 2013-11-26 16:54:48 -08:00
parent 92b57c79ba
commit f1ca3f9a8a
2 changed files with 20 additions and 17 deletions

View File

@ -31,8 +31,6 @@ Layer* nextTest()
sceneIdx = sceneIdx % MAX_LAYER; sceneIdx = sceneIdx % MAX_LAYER;
auto layer = (createFunctions[sceneIdx])(); auto layer = (createFunctions[sceneIdx])();
layer->autorelease();
return layer; return layer;
} }
@ -44,7 +42,6 @@ Layer* prevTest()
sceneIdx += total; sceneIdx += total;
auto layer = (createFunctions[sceneIdx])(); auto layer = (createFunctions[sceneIdx])();
layer->autorelease();
return layer; return layer;
} }
@ -52,7 +49,6 @@ Layer* prevTest()
Layer* restartTest() Layer* restartTest()
{ {
auto layer = (createFunctions[sceneIdx])(); auto layer = (createFunctions[sceneIdx])();
layer->autorelease();
return layer; return layer;
} }

View File

@ -26,9 +26,7 @@ public:
class MultiSceneTest : public BaseTest class MultiSceneTest : public BaseTest
{ {
public: public:
MultiSceneTest(); CREATE_FUNC(MultiSceneTest);
virtual ~MultiSceneTest();
virtual string title(); virtual string title();
virtual string subtitle(); virtual string subtitle();
virtual void onEnter(); virtual void onEnter();
@ -36,13 +34,17 @@ public:
void restartCallback(Object* sender); void restartCallback(Object* sender);
void nextCallback(Object* sender); void nextCallback(Object* sender);
void backCallback(Object* sender); void backCallback(Object* sender);
protected:
MultiSceneTest();
virtual ~MultiSceneTest();
}; };
class NewSpriteTest : public MultiSceneTest class NewSpriteTest : public MultiSceneTest
{ {
public: public:
NewSpriteTest(); CREATE_FUNC(NewSpriteTest);
virtual ~NewSpriteTest();
virtual string title(); virtual string title();
virtual string subtitle(); virtual string subtitle();
@ -52,29 +54,31 @@ public:
void onTouchesEnded(const std::vector<Touch*>& touches, Event* event); void onTouchesEnded(const std::vector<Touch*>& touches, Event* event);
protected: protected:
NewSpriteTest();
virtual ~NewSpriteTest();
}; };
class NewSpriteBatchTest : public MultiSceneTest class NewSpriteBatchTest : public MultiSceneTest
{ {
public: public:
NewSpriteBatchTest();
virtual ~NewSpriteBatchTest();
CREATE_FUNC(NewSpriteBatchTest);
virtual string title(); virtual string title();
virtual string subtitle(); virtual string subtitle();
void onTouchesEnded(const vector<Touch*>& touches, Event* event); void onTouchesEnded(const vector<Touch*>& touches, Event* event);
void addNewSpriteWithCoords(Point p); void addNewSpriteWithCoords(Point p);
protected:
NewSpriteBatchTest();
virtual ~NewSpriteBatchTest();
}; };
class NewClippingNodeTest : public MultiSceneTest class NewClippingNodeTest : public MultiSceneTest
{ {
public: public:
NewClippingNodeTest();
virtual ~NewClippingNodeTest();
CREATE_FUNC(NewClippingNodeTest);
virtual string title(); virtual string title();
virtual string subtitle(); virtual string subtitle();
@ -83,6 +87,9 @@ public:
void onTouchesEnded(const std::vector<Touch*>& touches, Event *event); void onTouchesEnded(const std::vector<Touch*>& touches, Event *event);
protected: protected:
NewClippingNodeTest();
virtual ~NewClippingNodeTest();
bool _scrolling; bool _scrolling;
Point _lastPoint; Point _lastPoint;
}; };
@ -90,14 +97,14 @@ protected:
class NewDrawNodeTest : public MultiSceneTest class NewDrawNodeTest : public MultiSceneTest
{ {
public: public:
NewDrawNodeTest();
virtual ~NewDrawNodeTest();
CREATE_FUNC(NewDrawNodeTest)
virtual string title(); virtual string title();
virtual string subtitle(); virtual string subtitle();
protected: protected:
NewDrawNodeTest();
virtual ~NewDrawNodeTest();
}; };
#endif //__NewRendererTest_H_ #endif //__NewRendererTest_H_