PuzzleSDK
SchedulerCallbackTest类 参考

#include <NodeTest.h>

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

Public 成员函数

 CREATE_FUNC (SchedulerCallbackTest)
 
virtual std::string subtitle () const override
 
virtual void onEnter () 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
 

Protected 成员函数

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

Protected 属性

float _total
 
- Protected 属性 继承自 TestCocosNodeDemo
cocos2d::Director::Projection _preProjection
 
- Protected 属性 继承自 TestCase
cocos2d::MenuItemImage * _priorTestItem
 
cocos2d::MenuItemImage * _restartTestItem
 
cocos2d::MenuItemImage * _nextTestItem
 
cocos2d::Label * _titleLabel
 
cocos2d::Label * _subtitleLabel
 

额外继承的成员函数

- Public 类型 继承自 TestCase
enum class  Type { ROBUSTNESS , UNIT , GRAPHICAL_STATIC , MANUAL }
 
- Public 属性 继承自 TestCase
CC_CONSTRUCTOR_ACCESS __pad0__: virtual bool init() override
 

详细描述

在文件 NodeTest.h126 行定义.

构造及析构函数说明

◆ SchedulerCallbackTest()

SchedulerCallbackTest::SchedulerCallbackTest ( )
protected

在文件 NodeTest.cpp433 行定义.

434{
435 auto node = Node::create();
436 addChild(node, 0);
437 node->setName("a node");
438
439 _total = 0;
440 node->schedule([&](float dt) {
441 _total += dt;
442 log("hello world: %f - total: %f", dt, _total);
443 }
444 ,0.5
445 ,"some_key");
446
447
448 node->scheduleOnce([&](float dt) {
449 // the local variable "node" will go out of scope, so I have to get it from "this"
450 auto anode = this->getChildByName("a node");
451 anode->unschedule("some_key");
452 }
453 ,5
454 ,"ignore_key");
455}

引用了 _total.

成员函数说明

◆ CREATE_FUNC()

SchedulerCallbackTest::CREATE_FUNC ( SchedulerCallbackTest  )

◆ onEnter()

void SchedulerCallbackTest::onEnter ( )
overridevirtual

重载 TestCase .

在文件 NodeTest.cpp457 行定义.

458{
460 log("--onEnter-- Must be called before the scheduled lambdas");
461}
virtual void onEnter() override
Definition: BaseTest.cpp:430

引用了 TestCase::onEnter().

+ 函数调用图:

◆ subtitle()

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

重载 TestCase .

在文件 NodeTest.cpp463 行定义.

464{
465 return "Node scheduler with lambda";
466}

类成员变量说明

◆ _total

float SchedulerCallbackTest::_total
protected

在文件 NodeTest.h134 行定义.

被这些函数引用 SchedulerCallbackTest().


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