#include <SchedulerTest.h>
◆ CREATE_FUNC()
◆ onEnter()
| void ScheduleUpdatePriority::onEnter |
( |
| ) |
|
|
overridevirtual |
重载 TestCase .
在文件 SchedulerTest.cpp 第 1193 行定义.
1199 auto listener = EventListenerTouchOneByOne::create();
1201 _eventDispatcher->addEventListenerWithSceneGraphPriority(listener,
this);
bool onTouchBegan(cocos2d::Touch *touch, cocos2d::Event *event)
virtual void onEnter() override
引用了 TestCase::onEnter() , 以及 onTouchBegan().
◆ onExit()
| void ScheduleUpdatePriority::onExit |
( |
| ) |
|
|
override |
◆ onTouchBegan()
| bool ScheduleUpdatePriority::onTouchBegan |
( |
cocos2d::Touch * |
touch, |
|
|
cocos2d::Event * |
event |
|
) |
| |
在文件 SchedulerTest.cpp 第 1185 行定义.
1187 int priority =
static_cast<int>(CCRANDOM_0_1() * 11) - 5;
1188 CCLOG(
"change update priority to %d", priority);
1189 scheduleUpdateWithPriority(priority);
被这些函数引用 onEnter().
◆ subtitle()
| std::string ScheduleUpdatePriority::subtitle |
( |
| ) |
const |
|
overridevirtual |
◆ title()
| std::string ScheduleUpdatePriority::title |
( |
| ) |
const |
|
overridevirtual |
◆ update()
| void ScheduleUpdatePriority::update |
( |
float |
dt | ) |
|
|
overridevirtual |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.cpp