PuzzleSDK
NodeTest4类 参考

#include <NodeTest.h>

+ 类 NodeTest4 继承关系图:
+ NodeTest4 的协作图:

Public 成员函数

 CREATE_FUNC (NodeTest4)
 
void delay2 (float dt)
 
void delay4 (float dt)
 
virtual std::string subtitle () const override
 
- Public 成员函数 继承自 TestCocosNodeDemo
virtual std::string title () const override
 
- Public 成员函数 继承自 TestCase
 TestCase ()
 
 ~TestCase ()
 
virtual Type getTestType () const
 
virtual float getDuration () const
 
virtual std::string getExpectedOutput () const
 
virtual std::string getActualOutput () const
 
virtual void restartTestCallback (cocos2d::Ref *sender)
 
virtual void nextTestCallback (cocos2d::Ref *sender)
 
virtual void priorTestCallback (cocos2d::Ref *sender)
 
virtual void onBackCallback (cocos2d::Ref *sender)
 
void setTestSuite (TestSuite *testSuite)
 
TestSuitegetTestSuite () const
 
float getRunTime () const
 
void setTestCaseName (const std::string &name)
 
std::string getTestCaseName () const
 
const cocos2d::Label * getSubtitleLable () const
 
const cocos2d::MenuItemImage * getRestartTestItem () const
 
virtual void onEnter () override
 

Protected 成员函数

 NodeTest4 ()
 
- Protected 成员函数 继承自 TestCocosNodeDemo
 TestCocosNodeDemo ()
 
virtual ~TestCocosNodeDemo ()
 

额外继承的成员函数

- Public 类型 继承自 TestCase
enum class  Type { ROBUSTNESS , UNIT , GRAPHICAL_STATIC , MANUAL }
 
- Public 属性 继承自 TestCase
CC_CONSTRUCTOR_ACCESS __pad0__: virtual bool init() override
 
- Protected 属性 继承自 TestCocosNodeDemo
cocos2d::Director::Projection _preProjection
 
- Protected 属性 继承自 TestCase
cocos2d::MenuItemImage * _priorTestItem
 
cocos2d::MenuItemImage * _restartTestItem
 
cocos2d::MenuItemImage * _nextTestItem
 
cocos2d::Label * _titleLabel
 
cocos2d::Label * _subtitleLabel
 

详细描述

在文件 NodeTest.h56 行定义.

构造及析构函数说明

◆ NodeTest4()

NodeTest4::NodeTest4 ( )
protected

在文件 NodeTest.cpp150 行定义.

151{
152 auto sp1 = Sprite::create(s_pathSister1);
153 auto sp2 = Sprite::create(s_pathSister2);
154
155 sp1->setPosition( Vec2(100,160) );
156 sp2->setPosition( Vec2(380,160) );
157
158 addChild(sp1, 0, 2);
159 addChild(sp2, 0, 3);
160
161 schedule(CC_CALLBACK_1(NodeTest4::delay2, this), 2.0f, "delay2_key");
162 schedule(CC_CALLBACK_1(NodeTest4::delay4, this), 4.0f, "delay4_key");
163}
void delay2(float dt)
Definition: NodeTest.cpp:165
void delay4(float dt)
Definition: NodeTest.cpp:172
static const char s_pathSister1[]
Definition: testResource.h:29
static const char s_pathSister2[]
Definition: testResource.h:30

引用了 delay2(), delay4(), s_pathSister1 , 以及 s_pathSister2.

+ 函数调用图:

成员函数说明

◆ CREATE_FUNC()

NodeTest4::CREATE_FUNC ( NodeTest4  )

◆ delay2()

void NodeTest4::delay2 ( float  dt)

在文件 NodeTest.cpp165 行定义.

166{
167 auto node = static_cast<Sprite*>(getChildByTag(2));
168 auto action1 = RotateBy::create(1, 360);
169 node->runAction(action1);
170}

被这些函数引用 NodeTest4().

+ 这是这个函数的调用关系图:

◆ delay4()

void NodeTest4::delay4 ( float  dt)

在文件 NodeTest.cpp172 行定义.

173{
174 unschedule("delay4_key");
175 removeChildByTag(3, false);
176}

被这些函数引用 NodeTest4().

+ 这是这个函数的调用关系图:

◆ subtitle()

std::string NodeTest4::subtitle ( ) const
overridevirtual

重载 TestCase .

在文件 NodeTest.cpp178 行定义.

179{
180 return "tags";
181}

该类的文档由以下文件生成: