- [FIX] Variable pública innecesaria
- [NEW] Cheat mode
This commit is contained in:
@@ -36,7 +36,6 @@ namespace arounders
|
||||
arounder *siguiente;
|
||||
};
|
||||
|
||||
extern arounder *first;
|
||||
extern arounder *seleccionat;
|
||||
|
||||
void init();
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace gamestate
|
||||
const int no = 0;
|
||||
const int postfase = 1;
|
||||
const int mort = 2;
|
||||
const int cheat = 3;
|
||||
}
|
||||
|
||||
draw::surface *faded = nullptr;
|
||||
@@ -94,6 +95,7 @@ namespace gamestate
|
||||
// I anem on toque
|
||||
if (play::exit==play::eixir::postfase) gamestate::postfase::init();
|
||||
else if (play::exit==play::eixir::mort) gamestate::mort::init();
|
||||
else if (play::exit==play::eixir::cheat) gamestate::prefase::init();
|
||||
}
|
||||
// En qualsevol cas, renderitzem i eixim ja del bucle (fins que acabe el fadeout)
|
||||
draw::render();
|
||||
@@ -253,6 +255,13 @@ namespace gamestate
|
||||
}
|
||||
}
|
||||
|
||||
if (input::keyPressed(SDL_SCANCODE_F12)) {
|
||||
game::setConfig("fase", game::getConfig("fase")+1);
|
||||
draw::fadeout();
|
||||
audio::fadeOutMusic();
|
||||
play::exit = play::eixir::cheat;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user