#include <NewAudioEngineTest.h>
|
| float | _time |
| |
| CC_CONSTRUCTOR_ACCESS | __pad0__: virtual bool init() override |
| |
◆ CREATE_FUNC()
◆ init()
| bool AudioIssue18597Test::init |
( |
| ) |
|
|
overridevirtual |
在文件 NewAudioEngineTest.cpp 第 658 行定义.
660 if (AudioEngineTestDemo::init())
662 auto& layerSize = this->getContentSize();
665 this->schedule([=](
float dt)
667 CCLOG(
"issues 18597 audio crash test");
668 for (
int i = 0; i< 2;++i)
670 auto id = AudioEngine::play2d(
"audio/MUS_BGM_Battle_Round1_v1.caf",
true, 1.0f);
671 this->runAction(Sequence::create(
672 DelayTime::create(8.0f),
673 CallFunc::create([=]()
675 AudioEngine::stop(
id);
680 }, 2.0, 10000, 0.0,
"audio test");
683 auto labelTime = Label::createWithBMFont(
"fonts/bitmapFontTest2.fnt",
"time: ");
684 labelTime->setPosition(layerSize.width * 0.5f, layerSize.height * 0.5f);
685 labelTime->setTag(999);
686 this->addChild(labelTime);
688 this->schedule([=](
float dt){
690 char timeString[20] = {0};
691 sprintf(timeString,
"Time %2.2f",
_time);
692 dynamic_cast<Label *
>(this->getChildByTag(999))->setString(timeString);
693 }, 0.05, 1000000, 0,
"update label quickly");
引用了 _time.
◆ subtitle()
| std::string AudioIssue18597Test::subtitle |
( |
| ) |
const |
|
overridevirtual |
◆ title()
| std::string AudioIssue18597Test::title |
( |
| ) |
const |
|
overridevirtual |
◆ _time
| float AudioIssue18597Test::_time |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/NewAudioEngineTest/NewAudioEngineTest.cpp