@ -106,9 +106,13 @@ void State_LevelComplete::OnUserUpdate(AiL*game){
Audio : : Engine ( ) . SetVolume ( xpGainSound , Audio : : GetCalculatedSFXVolume ( 0.6f ) ) ;
Audio : : Engine ( ) . SetVolume ( xpGainSound , Audio : : GetCalculatedSFXVolume ( 0.6f ) ) ;
if ( lastXPGain < = 0.f ) {
if ( lastXPGain < = 0.f ) {
int incrementAmt = gainRate * ( 1 / 60.f ) + 1 ;
int incrementAmt = gainRate * ( 1 / 60.f ) + 1 ;
accumulatedXP = std : : max ( 0 , accumulatedXP - incrementAmt ) ;
auto progressBar = Component < ProgressBar > ( MenuType : : LEVEL_COMPLETE , " XP Bar " ) ;
auto progressBar = Component < ProgressBar > ( MenuType : : LEVEL_COMPLETE , " XP Bar " ) ;
if ( accumulatedXP - incrementAmt < 0 ) {
progressBar - > UpdateProgressBar ( progressBar - > GetCurrentProgress ( ) + accumulatedXP ) ;
} else {
progressBar - > UpdateProgressBar ( progressBar - > GetCurrentProgress ( ) + incrementAmt ) ;
progressBar - > UpdateProgressBar ( progressBar - > GetCurrentProgress ( ) + incrementAmt ) ;
}
accumulatedXP = std : : max ( 0 , accumulatedXP - incrementAmt ) ;
if ( progressBar - > GetCurrentProgress ( ) > = progressBar - > GetFinalProgress ( ) ) {
if ( progressBar - > GetCurrentProgress ( ) > = progressBar - > GetFinalProgress ( ) ) {
levelUpTextPos = Menu : : menus [ LEVEL_COMPLETE ] - > pos + Component < MenuLabel > ( LEVEL_COMPLETE , " Level Display " ) - > GetPos ( ) + Component < MenuLabel > ( LEVEL_COMPLETE , " Level Display " ) - > GetSize ( ) ;
levelUpTextPos = Menu : : menus [ LEVEL_COMPLETE ] - > pos + Component < MenuLabel > ( LEVEL_COMPLETE , " Level Display " ) - > GetPos ( ) + Component < MenuLabel > ( LEVEL_COMPLETE , " Level Display " ) - > GetSize ( ) ;
levelUpTimer = " Interface.HUD Level Up Timer " _F ;
levelUpTimer = " Interface.HUD Level Up Timer " _F ;