PuzzleSDK
MotionStreakTest.h
浏览该文件的文档.
1/****************************************************************************
2 Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
3
4 http://www.cocos2d-x.org
5
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 THE SOFTWARE.
23 ****************************************************************************/
24
25#ifndef _MOTION_STREAK_TEST_H_
26#define _MOTION_STREAK_TEST_H_
27
28#include "../BaseTest.h"
29
30
31DEFINE_TEST_SUITE(MotionStreakTests);
32
34{
35public:
38
39 virtual std::string title() const override;
40 virtual std::string subtitle() const override;
41 virtual void onEnter() override;
42
43 void modeCallback(cocos2d::Ref* sender);
44protected:
45 cocos2d::MotionStreak* _streak;
46};
47
49{
50protected:
51 cocos2d::Node* _root;
52 cocos2d::Node* _target;
53
54public:
56 virtual void onEnter() override;
57 void onUpdate(float delta);
58 virtual std::string title() const override;
59};
60
62{
63protected:
64 cocos2d::Node* _root;
65 cocos2d::Node* _target;
66
67public:
69 virtual void onEnter() override;
70 void onTouchesMoved(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
71 virtual std::string title() const override;
72 virtual std::string subtitle() const override;
73};
74
76{
77public:
79
80 virtual std::string title() const override;
81 virtual std::string subtitle() const override;
82 virtual void onEnter() override;
83 virtual void update(float dt) override;
84private:
85 cocos2d::Vec2 _center;
86 float _radius;
87 float _angle;
88};
89
91{
92public:
94
95 virtual std::string title() const override;
96 virtual std::string subtitle() const override;
97 virtual void onEnter() override;
98};
99
100
101#endif
DEFINE_TEST_SUITE(MotionStreakTests)
CREATE_FUNC(Issue12226)
virtual std::string subtitle() const override
virtual std::string title() const override
virtual void onEnter() override
virtual std::string subtitle() const override
cocos2d::Vec2 _center
virtual std::string title() const override
CREATE_FUNC(Issue1358)
virtual void onEnter() override
virtual void update(float dt) override
CREATE_FUNC(MotionStreakTest1)
cocos2d::Node * _target
void onUpdate(float delta)
virtual void onEnter() override
virtual std::string title() const override
cocos2d::Node * _root
void onTouchesMoved(const std::vector< cocos2d::Touch * > &touches, cocos2d::Event *event)
virtual void onEnter() override
virtual std::string title() const override
virtual std::string subtitle() const override
CREATE_FUNC(MotionStreakTest2)
cocos2d::Node * _root
cocos2d::Node * _target
virtual std::string title() const override
void modeCallback(cocos2d::Ref *sender)
virtual void onEnter() override
virtual std::string subtitle() const override
cocos2d::MotionStreak * _streak