2010-08-31 17:03:58 +08:00
|
|
|
#ifndef _LAYER_TEST_H_
|
|
|
|
#define _LAYER_TEST_H_
|
|
|
|
|
2010-09-01 14:57:55 +08:00
|
|
|
////----#include "cocos2d.h"
|
2010-08-31 17:03:58 +08:00
|
|
|
#include "../testBasic.h"
|
|
|
|
|
|
|
|
class LayerTest : public CCLayer
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
std::string m_strTitle;
|
|
|
|
|
|
|
|
public:
|
|
|
|
LayerTest(void);
|
|
|
|
~LayerTest(void);
|
|
|
|
|
|
|
|
virtual std::string title();
|
|
|
|
virtual void onEnter();
|
|
|
|
|
|
|
|
void restartCallback(NSObject* pSender);
|
|
|
|
void nextCallback(NSObject* pSender);
|
|
|
|
void backCallback(NSObject* pSender);
|
|
|
|
};
|
|
|
|
|
|
|
|
class LayerTest1 : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
|
|
|
|
void registerWithTouchDispatcher();
|
|
|
|
void updateSize(CCTouch*touch);
|
|
|
|
|
|
|
|
virtual bool ccTouchBegan(CCTouch* touche, UIEvent* event);
|
|
|
|
virtual void ccTouchMoved(CCTouch* touche, UIEvent* event);
|
|
|
|
virtual void ccTouchEnded(CCTouch* touche, UIEvent* event);
|
|
|
|
};
|
|
|
|
|
|
|
|
class LayerTest2 : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class LayerTestBlend : public LayerTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
LayerTestBlend();
|
|
|
|
void newBlend(ccTime dt);
|
|
|
|
virtual std::string title();
|
|
|
|
};
|
|
|
|
|
|
|
|
class LayerTestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void runThisTest();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|