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

33 lines
571 B
C
Raw Normal View History

#ifndef _TEST_BASIC_H_
#define _TEST_BASIC_H_
#include "cocos2d.h"
#include "VisibleRect.h"
USING_NS_CC;
2013-09-17 23:03:33 +08:00
using namespace std;
class TestScene : public Scene
{
public:
TestScene(bool bPortrait = false);
virtual bool initTest();
virtual void onEnter();
virtual void runThisTest() = 0;
};
typedef Layer* (*NEWTESTFUNC)();
2012-11-21 15:22:54 +08:00
#define TESTLAYER_CREATE_FUNC(className) \
static Layer* create##className() \
2012-11-21 15:22:54 +08:00
{ return new className(); }
#define CF(className) create##className
// C++ 11
#define CL(__className__) [](){ return new __className__();}
#endif