PuzzleSDK
SequenceWithFinalInstant类 参考

#include <ActionsTest.h>

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

Public 成员函数

 CREATE_FUNC (SequenceWithFinalInstant)
 
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.h624 行定义.

成员函数说明

◆ CREATE_FUNC()

SequenceWithFinalInstant::CREATE_FUNC ( SequenceWithFinalInstant  )

◆ onEnter()

void SequenceWithFinalInstant::onEnter ( )
overridevirtual

重载 ActionsDemo .

在文件 ActionsTest.cpp2408 行定义.

2409{
2411
2412 _manager = new cocos2d::ActionManager();
2413
2414 _target = cocos2d::Node::create();
2415 _target->setActionManager( _manager );
2416 _target->retain();
2417 _target->onEnter();
2418
2419 bool called( false );
2420 const auto f
2421 ( [ &called ]() -> void
2422 {
2423 cocos2d::log("Callback called.");
2424 called = true;
2425 } );
2426
2427 const auto action =
2428 cocos2d::Sequence::create
2429 (cocos2d::DelayTime::create(0.05f),
2430 cocos2d::CallFunc::create(f),
2431 nullptr);
2432
2433 _target->runAction(action);
2434 _manager->update(0);
2435 _manager->update(0.05f - FLT_EPSILON);
2436
2437 if ( action->isDone() && !called )
2438 assert(false);
2439
2440 _manager->update(FLT_EPSILON);
2441
2442 if ( action->isDone() && !called )
2443 assert(false);
2444}
cocos2d::Node * _target
Definition: ActionsTest.h:635
cocos2d::ActionManager * _manager
Definition: ActionsTest.h:634
virtual void onEnter() override
Definition: BaseTest.cpp:430

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

+ 函数调用图:

◆ onExit()

void SequenceWithFinalInstant::onExit ( )
overridevirtual

重载 ActionsDemo .

在文件 ActionsTest.cpp2446 行定义.

2447{
2448 TestCase::onExit();
2449 _target->onExit();
2450 _target->release();
2451 _manager->release();
2452}

引用了 _manager , 以及 _target.

◆ subtitle()

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

重载 TestCase .

在文件 ActionsTest.cpp2454 行定义.

2455{
2456 return "Instant action should not crash";
2457}

类成员变量说明

◆ _manager

cocos2d::ActionManager* SequenceWithFinalInstant::_manager
private

在文件 ActionsTest.h634 行定义.

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

◆ _target

cocos2d::Node* SequenceWithFinalInstant::_target
private

在文件 ActionsTest.h635 行定义.

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


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