PuzzleSDK
ScheduleUpdatePriority类 参考

#include <SchedulerTest.h>

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

Public 成员函数

 CREATE_FUNC (ScheduleUpdatePriority)
 
virtual std::string title () const override
 
virtual std::string subtitle () const override
 
void onEnter () override
 
void onExit () override
 
virtual void update (float dt) override
 
bool onTouchBegan (cocos2d::Touch *touch, cocos2d::Event *event)
 
- 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
 

详细描述

在文件 SchedulerTest.h336 行定义.

成员函数说明

◆ CREATE_FUNC()

ScheduleUpdatePriority::CREATE_FUNC ( ScheduleUpdatePriority  )

◆ onEnter()

void ScheduleUpdatePriority::onEnter ( )
overridevirtual

重载 TestCase .

在文件 SchedulerTest.cpp1193 行定义.

1194{
1196
1197 scheduleUpdate();
1198
1199 auto listener = EventListenerTouchOneByOne::create();
1200 listener->onTouchBegan = CC_CALLBACK_2(ScheduleUpdatePriority::onTouchBegan, this);
1201 _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);
1202}
bool onTouchBegan(cocos2d::Touch *touch, cocos2d::Event *event)
virtual void onEnter() override
Definition: BaseTest.cpp:430

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

+ 函数调用图:

◆ onExit()

void ScheduleUpdatePriority::onExit ( )
override

在文件 SchedulerTest.cpp1204 行定义.

1205{
1206 Node::onExit();
1207 unscheduleUpdate();
1208}

◆ onTouchBegan()

bool ScheduleUpdatePriority::onTouchBegan ( cocos2d::Touch *  touch,
cocos2d::Event *  event 
)

在文件 SchedulerTest.cpp1185 行定义.

1186{
1187 int priority = static_cast<int>(CCRANDOM_0_1() * 11) - 5; // -5 ~ 5
1188 CCLOG("change update priority to %d", priority);
1189 scheduleUpdateWithPriority(priority);
1190 return true;
1191}

被这些函数引用 onEnter().

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

◆ subtitle()

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

重载 TestCase .

在文件 SchedulerTest.cpp1180 行定义.

1181{
1182 return "click to change update priority with random value";
1183}

◆ title()

std::string ScheduleUpdatePriority::title ( ) const
overridevirtual

重载 TestCase .

在文件 SchedulerTest.cpp1175 行定义.

1176{
1177 return "ScheduleUpdatePriorityTest";
1178}

◆ update()

void ScheduleUpdatePriority::update ( float  dt)
overridevirtual

在文件 SchedulerTest.cpp1210 行定义.

1211{
1212}

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