axmol/tests/Classes/MotionStreakTest/MotionStreakTest.h

78 lines
1.6 KiB
C
Raw Normal View History

2010-08-25 17:02:58 +08:00
#ifndef _MOTION_STREAK_TEST_H_
#define _MOTION_STREAK_TEST_H_
////----#include "cocos2d.h"
#include "../testBasic.h"
#include "../BaseTest.h"
//USING_NS_CC;
class MotionStreakTest : public BaseTest
2010-08-25 17:02:58 +08:00
{
public:
MotionStreakTest(void);
~MotionStreakTest(void);
virtual std::string title() const override;
virtual std::string subtitle() const override;
virtual void onEnter() override;
void restartCallback(Ref* sender);
void nextCallback(Ref* sender);
void backCallback(Ref* sender);
void modeCallback(Ref* sender);
2012-03-22 14:32:32 +08:00
protected:
MotionStreak *streak;
2010-08-25 17:02:58 +08:00
};
class MotionStreakTest1 : public MotionStreakTest
{
protected:
Node* _root;
Node* _target;
public:
2013-11-14 09:36:33 +08:00
CREATE_FUNC(MotionStreakTest1);
virtual void onEnter() override;
2012-06-12 01:43:07 +08:00
void onUpdate(float delta);
virtual std::string title() const override;
2010-08-25 17:02:58 +08:00
};
class MotionStreakTest2 : public MotionStreakTest
{
protected:
Node* _root;
Node* _target;
public:
2013-11-14 09:36:33 +08:00
CREATE_FUNC(MotionStreakTest2);
virtual void onEnter() override;
void onTouchesMoved(const std::vector<Touch*>& touches, Event* event);
virtual std::string title() const override;
2010-08-25 17:02:58 +08:00
};
2012-06-12 16:56:34 +08:00
class Issue1358 : public MotionStreakTest
{
public:
2013-11-14 09:36:33 +08:00
CREATE_FUNC(Issue1358);
virtual std::string title() const override;
virtual std::string subtitle() const override;
virtual void onEnter() override;
2012-06-12 16:56:34 +08:00
virtual void update(float dt);
private:
Point _center;
float _radius;
float _angle;
2012-06-12 16:56:34 +08:00
};
2010-08-25 17:02:58 +08:00
class MotionStreakTestScene : public TestScene
{
public:
virtual void runThisTest();
};
//CCLayer* nextAction();
#endif