2010-09-01 11:34:30 +08:00
|
|
|
#ifndef _SCENE_TEST_H_
|
|
|
|
#define _SCENE_TEST_H_
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
////----#include "cocos2d.h"
|
|
|
|
#include "../testBasic.h"
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
class SceneTestLayer1 : public Layer
|
2010-09-01 11:34:30 +08:00
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
SceneTestLayer1();
|
|
|
|
~SceneTestLayer1();
|
2010-09-01 11:34:30 +08:00
|
|
|
|
2014-02-27 21:10:03 +08:00
|
|
|
virtual void onEnter() override;
|
|
|
|
virtual void onEnterTransitionDidFinish() override;
|
2011-02-23 16:47:25 +08:00
|
|
|
|
2012-06-08 13:55:28 +08:00
|
|
|
void testDealloc(float dt);
|
2014-02-20 10:53:49 +08:00
|
|
|
void onPushScene(Ref* sender);
|
|
|
|
void onPushSceneTran(Ref* sender);
|
|
|
|
void onQuit(Ref* sender);
|
2010-09-01 11:34:30 +08:00
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
//CREATE_NODE(SceneTestLayer1);
|
2010-09-01 11:34:30 +08:00
|
|
|
} ;
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
class SceneTestLayer2 : public Layer
|
2010-09-01 11:34:30 +08:00
|
|
|
{
|
2013-06-15 14:03:30 +08:00
|
|
|
float _timeCounter;
|
2010-09-01 11:34:30 +08:00
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
SceneTestLayer2();
|
2010-09-01 11:34:30 +08:00
|
|
|
|
2012-06-08 13:55:28 +08:00
|
|
|
void testDealloc(float dt);
|
2014-02-20 10:53:49 +08:00
|
|
|
void onGoBack(Ref* sender);
|
|
|
|
void onReplaceScene(Ref* sender);
|
|
|
|
void onReplaceSceneTran(Ref* sender);
|
2010-09-01 11:34:30 +08:00
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
//CREATE_NODE(SceneTestLayer2);
|
2010-09-01 11:34:30 +08:00
|
|
|
} ;
|
|
|
|
|
2013-06-20 14:17:10 +08:00
|
|
|
class SceneTestLayer3 : public LayerColor
|
2010-09-01 11:34:30 +08:00
|
|
|
{
|
|
|
|
public:
|
2012-04-19 14:35:52 +08:00
|
|
|
SceneTestLayer3();
|
2012-06-12 16:22:25 +08:00
|
|
|
bool init();
|
2012-06-08 13:55:28 +08:00
|
|
|
virtual void testDealloc(float dt);
|
2014-02-20 10:53:49 +08:00
|
|
|
void item0Clicked(Ref* sender);
|
|
|
|
void item1Clicked(Ref* sender);
|
|
|
|
void item2Clicked(Ref* sender);
|
|
|
|
void item3Clicked(Ref* sender);
|
2012-08-27 16:11:07 +08:00
|
|
|
CREATE_FUNC(SceneTestLayer3)
|
2010-09-01 11:34:30 +08:00
|
|
|
} ;
|
|
|
|
|
|
|
|
class SceneTestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void runThisTest();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|