2010-08-25 17:02:58 +08:00
|
|
|
#ifndef _MOTION_STREAK_TEST_H_
|
|
|
|
#define _MOTION_STREAK_TEST_H_
|
2012-04-19 14:35:52 +08:00
|
|
|
|
|
|
|
////----#include "cocos2d.h"
|
|
|
|
#include "../testBasic.h"
|
2013-06-07 08:12:28 +08:00
|
|
|
#include "../BaseTest.h"
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2012-06-14 05:19:13 +08:00
|
|
|
//USING_NS_CC;
|
2012-04-19 14:35:52 +08:00
|
|
|
|
2013-06-07 08:12:28 +08:00
|
|
|
class MotionStreakTest : public BaseTest
|
2010-08-25 17:02:58 +08:00
|
|
|
{
|
2012-04-19 14:35:52 +08:00
|
|
|
public:
|
|
|
|
MotionStreakTest(void);
|
|
|
|
~MotionStreakTest(void);
|
|
|
|
|
|
|
|
virtual std::string title();
|
2012-06-12 16:56:34 +08:00
|
|
|
virtual std::string subtitle();
|
2012-04-19 14:35:52 +08:00
|
|
|
virtual void onEnter();
|
|
|
|
|
|
|
|
void restartCallback(CCObject* pSender);
|
|
|
|
void nextCallback(CCObject* pSender);
|
|
|
|
void backCallback(CCObject* pSender);
|
|
|
|
void modeCallback(CCObject* pSender);
|
2012-03-22 14:32:32 +08:00
|
|
|
protected:
|
2012-04-19 14:35:52 +08:00
|
|
|
CCMotionStreak *streak;
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class MotionStreakTest1 : public MotionStreakTest
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
CCNode* m_root;
|
|
|
|
CCNode* m_target;
|
|
|
|
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
2012-06-12 01:43:07 +08:00
|
|
|
void onUpdate(float delta);
|
2012-04-19 14:35:52 +08:00
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class MotionStreakTest2 : public MotionStreakTest
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
CCNode* m_root;
|
|
|
|
CCNode* m_target;
|
|
|
|
|
|
|
|
public:
|
|
|
|
virtual void onEnter();
|
|
|
|
void ccTouchesMoved(CCSet* touches, CCEvent* event);
|
|
|
|
virtual std::string title();
|
2010-08-25 17:02:58 +08:00
|
|
|
};
|
|
|
|
|
2012-06-12 16:56:34 +08:00
|
|
|
class Issue1358 : public MotionStreakTest
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual std::string title();
|
|
|
|
virtual std::string subtitle();
|
|
|
|
virtual void onEnter();
|
|
|
|
virtual void update(float dt);
|
|
|
|
private:
|
|
|
|
CCPoint m_center;
|
|
|
|
float m_fRadius;
|
|
|
|
float m_fAngle;
|
|
|
|
};
|
|
|
|
|
2010-08-25 17:02:58 +08:00
|
|
|
class MotionStreakTestScene : public TestScene
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void runThisTest();
|
|
|
|
};
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
//CCLayer* nextAction();
|
|
|
|
|
|
|
|
#endif
|