Keep current level on defeat instead of resetting to 1
On game over (defeat) + START, restart the maze at the same level the player had reached instead of resetting to 1. Only starting a new game from the title screen zeroes the counter. Victory still increments as before.
This commit is contained in:
+3
-4
@@ -225,12 +225,11 @@ void engine_update(uint8_t keys, uint8_t prev_keys) {
|
||||
|
||||
// Attende la pressione di START per riavviare
|
||||
if ((keys & J_START) && !(prev_keys & J_START)) {
|
||||
// Nasconde la grafica testuale e ricarica tutto l'engine
|
||||
// Vittoria (Going Deeper) -> livello successivo; Sconfitta -> nuova partita dal livello 1.
|
||||
// Nasconde la grafica testuale e ricarica tutto l'engine.
|
||||
// Vittoria (Going Deeper) -> livello successivo.
|
||||
// Sconfitta -> si ricomincia dallo stesso livello raggiunto (non si azzera).
|
||||
if (game_over == 2) {
|
||||
level++;
|
||||
} else {
|
||||
level = 1;
|
||||
}
|
||||
move_metasprite(gameover_metasprites[0], player_TILE_COUNT + enemy_TILE_COUNT, 8, 0, 0);
|
||||
SHOW_SPRITES;
|
||||
|
||||
Reference in New Issue
Block a user