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;
|
2012-04-19 14:35:52 +08:00
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
class TestScene : public CCScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestScene(bool bPortrait = false);
|
|
|
|
virtual void onEnter();
|
|
|
|
|
|
|
|
virtual void runThisTest() = 0;
|
|
|
|
|
|
|
|
// The CallBack for back to the main menu scene
|
|
|
|
virtual void MainMenuCallback(CCObject* pSender);
|
|
|
|
};
|
|
|
|
|
2012-11-21 15:22:54 +08:00
|
|
|
typedef CCLayer* (*NEWTESTFUNC)();
|
|
|
|
#define TESTLAYER_CREATE_FUNC(className) \
|
|
|
|
static CCLayer* create##className() \
|
|
|
|
{ return new className(); }
|
|
|
|
|
|
|
|
#define CF(className) create##className
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
#endif
|