axmol/samples/Cpp/TestCpp/Classes/NewRendererTest/NewRendererTest.h

91 lines
1.8 KiB
C
Raw Normal View History

//
// Created by NiTe Luo on 11/1/13.
//
#ifndef __NewRendererTest_H_
#define __NewRendererTest_H_
#include "cocos2d.h"
#include "../testBasic.h"
#include "../BaseTest.h"
2013-11-13 03:19:18 +08:00
using namespace std;
2013-11-13 03:53:53 +08:00
#define kTagSpriteBatchNode 100
2013-11-16 03:29:11 +08:00
#define kTagClipperNode 101
#define kTagContentNode 102
2013-11-13 03:53:53 +08:00
2013-11-13 03:19:18 +08:00
class NewRendererTestScene : public TestScene
{
public:
virtual void runThisTest();
};
class MultiSceneTest : public BaseTest
{
public:
MultiSceneTest();
virtual ~MultiSceneTest();
virtual string title();
virtual string subtitle();
virtual void onEnter();
void restartCallback(Object* sender);
void nextCallback(Object* sender);
void backCallback(Object* sender);
};
class NewSpriteTest : public MultiSceneTest
{
public:
NewSpriteTest();
virtual ~NewSpriteTest();
2013-11-13 03:19:18 +08:00
virtual string title();
virtual string subtitle();
void createSpriteTest();
void createNewSpriteTest();
void onTouchesEnded(const std::vector<Touch*>& touches, Event* event);
protected:
};
2013-11-13 03:53:53 +08:00
class NewSpriteBatchTest : public MultiSceneTest
{
public:
NewSpriteBatchTest();
virtual ~NewSpriteBatchTest();
virtual string title();
virtual string subtitle();
void onTouchesEnded(const vector<Touch*>& touches, Event* event);
void addNewSpriteWithCoords(Point p);
};
2013-11-16 03:29:11 +08:00
class NewClippingNodeTest : public MultiSceneTest
{
public:
NewClippingNodeTest();
virtual ~NewClippingNodeTest();
2013-11-16 03:29:11 +08:00
virtual string title();
virtual string subtitle();
2013-11-15 08:39:03 +08:00
2013-11-16 03:29:11 +08:00
void onTouchesBegan(const std::vector<Touch*>& touches, Event *event);
void onTouchesMoved(const std::vector<Touch*>& touches, Event *event);
void onTouchesEnded(const std::vector<Touch*>& touches, Event *event);
protected:
bool _scrolling;
Point _lastPoint;
};
2013-11-15 08:39:03 +08:00
#endif //__NewRendererTest_H_