PuzzleSDK
ActionManagerTest.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 _ACTION_MANAGER_TEST_H_
26#define _ACTION_MANAGER_TEST_H_
27
28#include "../BaseTest.h"
29
30DEFINE_TEST_SUITE(ActionManagerTests);
31
33{
34protected:
35 cocos2d::TextureAtlas* _atlas;
36
37 std::string _title;
38
39public:
42
43 virtual std::string title() const override;
44 virtual std::string subtitle() const override;
45};
46
48{
49public:
51
52 virtual std::string subtitle() const override;
53 virtual void onEnter() override;
54 void removeThis();
55};
56
58{
59public:
61
62 virtual std::string subtitle() const override;
63 virtual void onEnter() override;
64 void bugMe(Node* node);
65};
66
68{
69public:
71
72 virtual std::string subtitle() const override;
73 virtual void onEnter() override;
74 void unpause(float dt);
75};
76
78{
79public:
81
82 virtual std::string subtitle() const override;
83 virtual void onEnter() override;
84 void stopAction();
85};
86
88{
89public:
91
92 virtual std::string subtitle() const override;
93 virtual void onEnter() override;
94 void stopAction(float time);
95};
96
98{
99public:
101
102 virtual std::string subtitle() const override;
103 virtual void onEnter() override;
104 void resumeGrossini(float time);
105};
106
108{
109public:
111
112 virtual std::string subtitle() const override;
113 virtual void onEnter() override;
114 void stopAction(float time);
115protected:
116 const unsigned int kMoveFlag = 0x01;
117 const unsigned int kScaleFlag = 0x02;
118 const unsigned int kRotateFlag = 0x04;
119 const unsigned int kRepeatForeverFlag = 0x08; // You don't need this for the test, but it's for demonstration how to activate several flags on an action.
120};
121
123{
124public:
126
127 virtual std::string subtitle() const override;
128 virtual void onEnter() override;
129protected:
130};
131
132#endif
DEFINE_TEST_SUITE(ActionManagerTests)
virtual std::string title() const override
cocos2d::TextureAtlas * _atlas
virtual std::string subtitle() const override
virtual std::string subtitle() const override
virtual void onEnter() override
CREATE_FUNC(CrashTest)
virtual void onEnter() override
virtual std::string subtitle() const override
CREATE_FUNC(Issue14050Test)
virtual void onEnter() override
virtual std::string subtitle() const override
void bugMe(Node *node)
CREATE_FUNC(LogicTest)
CREATE_FUNC(PauseTest)
virtual std::string subtitle() const override
virtual void onEnter() override
void unpause(float dt)
virtual std::string subtitle() const override
void resumeGrossini(float time)
CREATE_FUNC(ResumeTest)
virtual void onEnter() override
virtual void onEnter() override
virtual std::string subtitle() const override
CREATE_FUNC(StopActionTest)
virtual std::string subtitle() const override
virtual void onEnter() override
CREATE_FUNC(StopActionsByFlagsTest)
const unsigned int kRepeatForeverFlag
const unsigned int kScaleFlag
const unsigned int kMoveFlag
const unsigned int kRotateFlag
void stopAction(float time)
CREATE_FUNC(StopAllActionsTest)
virtual void onEnter() override
virtual std::string subtitle() const override