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

157 lines
2.7 KiB
C
Raw Normal View History

#ifndef _NODE_TEST_H_
#define _NODE_TEST_H_
////----#include "cocos2d.h"
#include "../testBasic.h"
2010-08-26 15:09:02 +08:00
class TestCocosNodeDemo : public CCLayer
{
public:
TestCocosNodeDemo(void);
~TestCocosNodeDemo(void);
virtual std::string title();
virtual std::string subtitle();
virtual void onEnter();
2010-08-26 15:09:02 +08:00
void restartCallback(CCObject* pSender);
void nextCallback(CCObject* pSender);
void backCallback(CCObject* pSender);
2010-08-26 15:09:02 +08:00
};
class Test2 : public TestCocosNodeDemo
{
public:
virtual void onEnter();
virtual std::string title();
2010-08-26 15:09:02 +08:00
};
class Test4 : public TestCocosNodeDemo
{
public:
Test4();
2012-06-08 13:55:28 +08:00
void delay2(float dt);
void delay4(float dt);
2010-08-26 15:09:02 +08:00
virtual std::string title();
2010-08-26 15:09:02 +08:00
};
class Test5 : public TestCocosNodeDemo
{
public:
Test5();
2012-06-08 13:55:28 +08:00
void addAndRemove(float dt);
2010-08-26 15:09:02 +08:00
virtual std::string title();
2010-08-26 15:09:02 +08:00
};
class Test6 : public TestCocosNodeDemo
{
public:
Test6();
2012-06-08 13:55:28 +08:00
void addAndRemove(float dt);
2010-08-26 15:09:02 +08:00
virtual std::string title();
2010-08-26 15:09:02 +08:00
};
class StressTest1 : public TestCocosNodeDemo
{
2012-06-08 13:55:28 +08:00
void shouldNotCrash(float dt);
void removeMe(CCNode* node);
public:
StressTest1();
2010-08-26 15:09:02 +08:00
virtual std::string title();
2010-08-26 15:09:02 +08:00
};
class StressTest2 : public TestCocosNodeDemo
{
2012-06-08 13:55:28 +08:00
void shouldNotLeak(float dt);
public:
StressTest2();
2010-08-26 15:09:02 +08:00
virtual std::string title();
2010-08-26 15:09:02 +08:00
};
class SchedulerTest1 : public TestCocosNodeDemo
{
public:
SchedulerTest1();
2012-06-08 13:55:28 +08:00
void doSomething(float dt);
2010-08-26 15:09:02 +08:00
virtual std::string title();
2010-08-26 15:09:02 +08:00
};
class NodeToWorld : public TestCocosNodeDemo
{
public:
NodeToWorld();
virtual std::string title();
2010-08-26 15:09:02 +08:00
};
class CameraOrbitTest : public TestCocosNodeDemo
{
public:
CameraOrbitTest();
2010-08-26 15:09:02 +08:00
virtual void onEnter();
virtual void onExit();
virtual std::string title();
2010-08-26 15:09:02 +08:00
};
class CameraZoomTest : public TestCocosNodeDemo
{
float m_z;
public:
CameraZoomTest();
2012-06-08 13:55:28 +08:00
void update(float dt);
2010-08-26 15:09:02 +08:00
virtual void onEnter();
virtual void onExit();
2010-08-26 15:09:02 +08:00
virtual std::string title();
2010-08-26 15:09:02 +08:00
};
class CameraCenterTest : public TestCocosNodeDemo
{
public:
CameraCenterTest();
virtual std::string title();
virtual std::string subtitle();
2010-08-26 15:09:02 +08:00
};
2011-02-23 16:47:25 +08:00
class ConvertToNode : public TestCocosNodeDemo
{
public:
ConvertToNode();
2011-03-18 09:39:34 +08:00
virtual void ccTouchesEnded(CCSet* touches, CCEvent *event);
2011-02-23 16:47:25 +08:00
virtual std::string title();
virtual std::string subtitle();
};
class NodeOpaqueTest : public TestCocosNodeDemo
{
public:
NodeOpaqueTest();
virtual std::string title();
virtual std::string subtitle();
};
class NodeNonOpaqueTest : public TestCocosNodeDemo
{
public:
NodeNonOpaqueTest();
virtual std::string title();
virtual std::string subtitle();
};
2010-08-26 15:09:02 +08:00
class CocosNodeTestScene : public TestScene
{
public:
virtual void runThisTest();
};
//CCLayer* nextAction();
#endif