Last active
August 29, 2015 14:01
-
-
Save anzfactory/4c9ef455b5905aa239c3 to your computer and use it in GitHub Desktop.
AnzSound.hのさんぷる (https://github.com/anzfactory/SampleForCocos)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void play() | |
{ | |
// 一旦0に(SpriteをFadeInするときとかに、最初は非表示にしておくようなもん) | |
SimpleAudioEngine::getInstanse->setBackgroundMusicVolume(0.f); | |
stopAllActions(); // 多重実行しないように | |
runAction(Sequence::create( | |
PlayBGM::create("bgm.mp3"), // bgm再生 | |
FadeToVolumeOfBGM::create(3.f, .5f), // 3秒かけて音量0.5に | |
DelayTime::create(5.f), | |
FadeToVolumeOfBGM::create(3.f, 0.f), // 3秒書けて音量0に | |
StopBGM::create(), // bgm停止 | |
NULL | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment