sigonasr2 1 year ago
parent 7e2bf32734
commit 62f5fe938e
  1. 6
      olcCodeJam2023Entry/VirusAttack.cpp
  2. 2
      olcCodeJam2023Entry/VirusAttack.h

@ -688,6 +688,12 @@ bool VirusAttack::OnUserUpdate(float fElapsedTime){
#pragma region MAIN_MENU
case GameState::MAIN_MENU:{
mainMenu.Update(this);
if(campaignStartButton->bPressed){
state=GameState::GAMEPLAY;
RestartLevel();
}
titleScreenY=std::min(0.f,titleScreenY+fElapsedTime*120);
nextColorChange=std::max(0.f,nextColorChange-fElapsedTime);
transition=std::min(1.f,transition+fElapsedTime);

@ -111,7 +111,7 @@ private:
bool reloadLevel=false;
bool restartButtonHeldDown=false;
float restartButtonHoldTime=0;
GameState state=GameState::MAIN_MENU;
GameState state=GameState::GAMEPLAY;
float nextColorChange=10;
std::array<Pixel,7>colorChangeOptions={VERY_DARK_BLUE,VERY_DARK_CYAN,VERY_DARK_GREEN,VERY_DARK_GREY,VERY_DARK_MAGENTA,VERY_DARK_RED,VERY_DARK_YELLOW};
Pixel currentBackCol;

Loading…
Cancel
Save