PuzzleSDK
Issue18003类 参考

#include <ActionsTest.h>

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

Public 成员函数

 CREATE_FUNC (Issue18003)
 
virtual std::string subtitle () const override
 
virtual void onEnter () override
 
virtual void onExit () override
 
- Public 成员函数 继承自 ActionsDemo
void centerSprites (unsigned int numberOfSprites)
 
void alignSpritesLeft (unsigned int numberOfSprites)
 
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
 

Private 属性

cocos2d::ActionManager * _manager
 
cocos2d::Node * _target
 

额外继承的成员函数

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

详细描述

在文件 ActionsTest.h639 行定义.

成员函数说明

◆ CREATE_FUNC()

Issue18003::CREATE_FUNC ( Issue18003  )

◆ onEnter()

void Issue18003::onEnter ( )
overridevirtual

重载 ActionsDemo .

在文件 ActionsTest.cpp2465 行定义.

2466{
2468
2469 _manager = new ActionManager();
2470
2471 _target = Node::create();
2472 _target->setActionManager(_manager);
2473 _target->retain();
2474 _target->onEnter();
2475
2476 // instant action + interval action
2477
2478 const auto f
2479 ( []() -> void
2480 {
2481 // do nothing
2482 });
2483
2484 auto action = Sequence::create(CallFunc::create(f),
2485 DelayTime::create(1),
2486 nullptr);
2487
2488 _target->runAction(action);
2489 _manager->update(0);
2490 _manager->update(2);
2491
2492 assert(action->isDone());
2493
2494 _target->stopAction(action);
2495
2496 // instant action + instant action
2497 action = Sequence::create(CallFunc::create(f),
2498 CallFunc::create(f),
2499 nullptr);
2500 _target->runAction(action);
2501 _manager->update(0);
2502 _manager->update(1);
2503 assert(action->isDone());
2504 _target->stopAction(action);
2505
2506 // interval action + instant action
2507 action = Sequence::create(DelayTime::create(1),
2508 CallFunc::create(f),
2509 nullptr);
2510 _target->runAction(action);
2511 _manager->update(0);
2512 _manager->update(2);
2513 assert(action->isDone());
2514 _target->stopAction(action);
2515
2516 // interval action + interval action
2517 action = Sequence::create(DelayTime::create(1), DelayTime::create(1), nullptr);
2518 _target->runAction(action);
2519 _manager->update(0);
2520 _manager->update(3);
2521 assert(action->isDone());
2522 _target->stopAction(action);
2523}
cocos2d::ActionManager * _manager
Definition: ActionsTest.h:649
cocos2d::Node * _target
Definition: ActionsTest.h:650
virtual void onEnter() override
Definition: BaseTest.cpp:430

引用了 _manager, _target , 以及 TestCase::onEnter().

+ 函数调用图:

◆ onExit()

void Issue18003::onExit ( )
overridevirtual

重载 ActionsDemo .

在文件 ActionsTest.cpp2525 行定义.

2526{
2527 TestCase::onExit();
2528 _target->onExit();
2529 _target->release();
2530 _manager->release();
2531}

引用了 _manager , 以及 _target.

◆ subtitle()

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

重载 TestCase .

在文件 ActionsTest.cpp2533 行定义.

2534{
2535 return "issue18003: should not crash";
2536}

类成员变量说明

◆ _manager

cocos2d::ActionManager* Issue18003::_manager
private

在文件 ActionsTest.h649 行定义.

被这些函数引用 onEnter() , 以及 onExit().

◆ _target

cocos2d::Node* Issue18003::_target
private

在文件 ActionsTest.h650 行定义.

被这些函数引用 onEnter() , 以及 onExit().


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