|
|
|
@ -2008,7 +2008,7 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){ |
|
|
|
|
LoadingScreen::Reset(); |
|
|
|
|
previousLevel=currentLevel; |
|
|
|
|
currentLevel=map; |
|
|
|
|
loadingWaitTime=0.f; |
|
|
|
|
game->loadingWaitTime=0.f; |
|
|
|
|
|
|
|
|
|
#pragma region Reset all data (Loading phase 1) |
|
|
|
|
LoadingScreen::AddPhase([&](){ |
|
|
|
@ -2029,7 +2029,6 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){ |
|
|
|
|
DAMAGENUMBER_LIST.clear(); |
|
|
|
|
backgroundEffects.clear(); |
|
|
|
|
foregroundEffects.clear(); |
|
|
|
|
ZONE_LIST.clear(); |
|
|
|
|
ItemDrop::drops.clear(); |
|
|
|
|
GameEvent::events.clear(); |
|
|
|
|
Audio::SetBGMPitch(1.f); |
|
|
|
@ -2064,6 +2063,15 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){ |
|
|
|
|
return true; |
|
|
|
|
}); |
|
|
|
|
#pragma endregion |
|
|
|
|
|
|
|
|
|
#ifdef __EMSCRIPTEN__ |
|
|
|
|
LoadingScreen::AddPhase([&](){ |
|
|
|
|
Audio::muted=true; |
|
|
|
|
Audio::UpdateBGMVolume(); |
|
|
|
|
game->loadingWaitTime+=game->GetElapsedTime(); |
|
|
|
|
return game->loadingWaitTime>=0.4f; |
|
|
|
|
}); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#pragma region Monster Spawn Data Setup (Loading phase 2) |
|
|
|
|
LoadingScreen::AddPhase([&](){ |
|
|
|
@ -2370,6 +2378,8 @@ void AiL::_PrepareLevel(MapName map,MusicChange changeMusic){ |
|
|
|
|
for(int trackID:track.GetChannelIDs()){ |
|
|
|
|
audioEngine.Engine().Play(trackID,true); |
|
|
|
|
} |
|
|
|
|
Audio::muted=false; |
|
|
|
|
Audio::UpdateBGMVolume(); |
|
|
|
|
return true; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|