#include <ActionsTest.h>
◆ CREATE_FUNC()
◆ onEnter()
| void Issue14936_1::onEnter |
( |
| ) |
|
|
overridevirtual |
重载 ActionsDemo .
在文件 ActionsTest.cpp 第 2335 行定义.
2339 auto origin = cocos2d::Director::getInstance()->getVisibleOrigin();
2340 auto visibleSize = cocos2d::Director::getInstance()->getVisibleSize();
2344 auto counterLabel = Label::createWithTTF(
"0",
"fonts/Marker Felt.ttf", 16.0f);
2345 counterLabel->setPosition(origin.x + visibleSize.width / 2, origin.y + visibleSize.height / 2);
2346 addChild(counterLabel);
2348 auto func = CallFunc::create([
this, counterLabel]{
2350 std::ostringstream os;
2352 counterLabel->setString(os.str());
2355 runAction(Spawn::create(func, func,
nullptr));
void centerSprites(unsigned int numberOfSprites)
virtual void onEnter() override
引用了 _count, ActionsDemo::centerSprites() , 以及 ActionsDemo::onEnter().
◆ subtitle()
| std::string Issue14936_1::subtitle |
( |
| ) |
const |
|
overridevirtual |
◆ title()
| std::string Issue14936_1::title |
( |
| ) |
const |
|
overridevirtual |
◆ _count
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/ActionsTest/ActionsTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/ActionsTest/ActionsTest.cpp