Added dynamic labels for gamepad controls input helper. Fixed wrapping bug for pressing right on monster loot scrollable container. Added XP gain sound effect. Release Build 7112.
This commit is contained in:
@@ -48,6 +48,10 @@ INCLUDE_MONSTER_LIST
|
||||
INCLUDE_game
|
||||
|
||||
void State_LevelComplete::OnStateChange(GameState*prevState){
|
||||
if(xpGainSound==std::numeric_limits<size_t>::max()){
|
||||
xpGainSound=Audio::LoadAndPlay("xpgain.ogg"_SFX,true);
|
||||
Audio::Engine().SetVolume(xpGainSound,0.f);
|
||||
}
|
||||
if(Menu::IsMenuOpen()){
|
||||
Menu::CloseAllMenus();
|
||||
}
|
||||
@@ -84,6 +88,7 @@ void State_LevelComplete::OnUserUpdate(AiL*game){
|
||||
|
||||
if(accumulatedXP>0){
|
||||
lastXPChangeTimer-=game->GetElapsedTime();
|
||||
Audio::Engine().SetVolume(xpGainSound,0.6f);
|
||||
while(lastXPChangeTimer<=0.f){
|
||||
int incrementAmt=int(accumulatedXP/(1/"Interface.HUD XP Bar Tick Rate"_F))+1;
|
||||
accumulatedXP-=incrementAmt;
|
||||
@@ -97,6 +102,8 @@ void State_LevelComplete::OnUserUpdate(AiL*game){
|
||||
}
|
||||
lastXPChangeTimer+="Interface.HUD XP Bar Tick Rate"_F;
|
||||
}
|
||||
}else{
|
||||
Audio::Engine().SetVolume(xpGainSound,0.f);
|
||||
}
|
||||
};
|
||||
void State_LevelComplete::Draw(AiL*game){
|
||||
|
||||
Reference in New Issue
Block a user