PuzzleSDK
SpriteProgressToRadial类 参考

#include <ActionsProgressTest.h>

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

Public 成员函数

 CREATE_FUNC (SpriteProgressToRadial)
 
virtual void onEnter () override
 
virtual std::string subtitle () const override
 
- Public 成员函数 继承自 SpriteDemo
 SpriteDemo ()
 
 ~SpriteDemo ()
 
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
 

额外继承的成员函数

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

详细描述

在文件 ActionsProgressTest.h44 行定义.

成员函数说明

◆ CREATE_FUNC()

SpriteProgressToRadial::CREATE_FUNC ( SpriteProgressToRadial  )

◆ onEnter()

void SpriteProgressToRadial::onEnter ( )
overridevirtual

重载 SpriteDemo .

在文件 ActionsProgressTest.cpp74 行定义.

75{
77
78 auto s = Director::getInstance()->getWinSize();
79
80 auto to1 = Sequence::createWithTwoActions(ProgressTo::create(2, 100), ProgressTo::create(0, 0));
81 auto to2 = Sequence::createWithTwoActions(ProgressTo::create(2, 100), ProgressTo::create(0, 0));
82
83 auto left = ProgressTimer::create(Sprite::create(s_pathSister1));
84 left->setType( ProgressTimer::Type::RADIAL );
85 addChild(left);
86 left->setPosition(100, s.height/2);
87 left->runAction( RepeatForever::create(to1));
88
89 auto right = ProgressTimer::create(Sprite::create(s_pathBlock));
90 right->setType(ProgressTimer::Type::RADIAL);
91 // Makes the ridial CCW
92 right->setReverseDirection(true);
93 addChild(right);
94 right->setPosition(s.width-100, s.height/2);
95 right->runAction( RepeatForever::create(to2));
96}
virtual void onEnter() override
static const char s_pathSister1[]
Definition: testResource.h:29
static const char s_pathBlock[]
Definition: testResource.h:37

引用了 SpriteDemo::onEnter(), s_pathBlock , 以及 s_pathSister1.

+ 函数调用图:

◆ subtitle()

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

重载 TestCase .

在文件 ActionsProgressTest.cpp98 行定义.

99{
100 return "ProgressTo Radial";
101}

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