2012-04-19 14:35:52 +08:00
|
|
|
#ifndef _TEST_BASIC_H_
|
|
|
|
#define _TEST_BASIC_H_
|
|
|
|
|
|
|
|
#include "cocos2d.h"
|
2012-10-23 17:48:50 +08:00
|
|
|
#include "VisibleRect.h"
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2012-04-27 18:47:49 +08:00
|
|
|
USING_NS_CC;
|
2013-09-17 23:03:33 +08:00
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
using namespace std;
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
class TestScene : public Scene
|
2012-04-19 14:35:52 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestScene(bool bPortrait = false);
|
2013-09-10 17:41:06 +08:00
|
|
|
virtual bool initTest();
|
2012-04-19 14:35:52 +08:00
|
|
|
virtual void onEnter();
|
|
|
|
|
|
|
|
virtual void runThisTest() = 0;
|
|
|
|
};
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
typedef Layer* (*NEWTESTFUNC)();
|
2012-11-21 15:22:54 +08:00
|
|
|
#define TESTLAYER_CREATE_FUNC(className) \
|
2013-06-20 14:17:10 +08:00
|
|
|
static Layer* create##className() \
|
2012-11-21 15:22:54 +08:00
|
|
|
{ return new className(); }
|
|
|
|
|
|
|
|
#define CF(className) create##className
|
|
|
|
|
2013-06-07 08:12:28 +08:00
|
|
|
// C++ 11
|
|
|
|
|
|
|
|
#define CL(__className__) [](){ return new __className__();}
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
#endif
|