worldSpawnHill2 = new World();
worldSpawnHill2->generate(700);
worldSpawnHill2->setBackground(BG_FOREST);
- worldSpawnHill2->setBGM("assets/music/embark.wav");
+ worldSpawnHill2->setBGM("assets/music/ozone.wav");
worldSpawnHill2->addMob(MS_TRIGGER,-400,0,worldSpawnHill2_infoSprint);
worldSpawnHill3 = new World();
}
}
-void World::bgmPlay(World *prev){
- if(!prev || strcmp(bgm,prev->bgm)){
+void World::bgmPlay(World *prev){
+ if(prev && strcmp(bgm,prev->bgm)){
+ Mix_FadeOutMusic(800);
Mix_VolumeMusic(50);
Mix_PlayMusic(bgmObj,-1); // Loop infinitely
- }/*else{
- Mix_FadeOutMusic(800);
- }*/
+ }
}
int worldShade = 0;