axmol/tests/cpp-tests/Classes/MotionStreakTest/MotionStreakTest.h

66 lines
1.4 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 "../BaseTest.h"
DEFINE_TEST_SUITE(MotionStreakTests);
class MotionStreakTest : public TestCase
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 modeCallback(cocos2d::Ref* sender);
2012-03-22 14:32:32 +08:00
protected:
cocos2d::MotionStreak* streak;
2010-08-25 17:02:58 +08:00
};
class MotionStreakTest1 : public MotionStreakTest
{
protected:
cocos2d::Node* _root;
cocos2d::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:
cocos2d::Node* _root;
cocos2d::Node* _target;
public:
2013-11-14 09:36:33 +08:00
CREATE_FUNC(MotionStreakTest2);
virtual void onEnter() override;
void onTouchesMoved(const std::vector<cocos2d::Touch*>& touches, cocos2d::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;
virtual void update(float dt) override;
2012-06-12 16:56:34 +08:00
private:
cocos2d::Vec2 _center;
float _radius;
float _angle;
2012-06-12 16:56:34 +08:00
};
#endif