Returning to camp/map after dying now lets you obtain already collected resources/XP. Fix bug with XP bar display (visual error) in the level complete window. Release Build 7969.
This commit is contained in:
parent
dec1f0516f
commit
68bdb6bc26
@ -55,11 +55,7 @@ void Menu::InitializeDeathWindow(){
|
|||||||
return true;
|
return true;
|
||||||
},ButtonAttr::FIT_TO_LABEL)END;
|
},ButtonAttr::FIT_TO_LABEL)END;
|
||||||
deathWindow->ADD("Return to Camp Button",MenuComponent)(geom2d::rect<float>{{6.f,28.f},{84.f,24.f}},"Return to Camp",[](MenuFuncData data){
|
deathWindow->ADD("Return to Camp Button",MenuComponent)(geom2d::rect<float>{{6.f,28.f},{84.f,24.f}},"Return to Camp",[](MenuFuncData data){
|
||||||
if(!Unlock::IsUnlocked("STORY_1_1")){
|
Component<MenuComponent>(MenuType::PAUSE,"Return to Camp Button")->Click();
|
||||||
GameState::ChangeState(States::OVERWORLD_MAP);
|
|
||||||
}else{
|
|
||||||
GameState::ChangeState(States::GAME_HUB);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
},ButtonAttr::FIT_TO_LABEL)END;
|
},ButtonAttr::FIT_TO_LABEL)END;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 4
|
#define VERSION_MINOR 4
|
||||||
#define VERSION_PATCH 5
|
#define VERSION_PATCH 5
|
||||||
#define VERSION_BUILD 7967
|
#define VERSION_BUILD 7969
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user