From 0912b98ac28b8c4a263bc541aa66339935dde6aa Mon Sep 17 00:00:00 2001 From: Diego Ramirez Date: Mon, 4 Mar 2024 12:36:04 -0600 Subject: [PATCH] Allow users to skip a scene, and reset `savedata.json` --- savedata.json | 2 +- src/scenes.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/savedata.json b/savedata.json index e9dbc56..c5f65bc 100644 --- a/savedata.json +++ b/savedata.json @@ -1,3 +1,3 @@ { - "level": "one" + "level": "intro" } \ No newline at end of file diff --git a/src/scenes.py b/src/scenes.py index fef3a46..09ecd08 100644 --- a/src/scenes.py +++ b/src/scenes.py @@ -52,6 +52,10 @@ def update(self): self.next = "menu" elif self.finished: self.next = self.nextseq + if pyxel.btnp(pyxel.KEY_DELETE): + self.finished = True + self.next = self.nextseq + return if pyxel.btnp(pyxel.KEY_SPACE): self.sno += 1 if self.sno >= len(self.scenes): @@ -66,6 +70,7 @@ def draw(self): pyxel.rect(0, 80, 128, 50, self.boxcol1) pyxel.rect(0, 79, 128, 1, self.boxcol2) draw_text(st[2], 1, 81) + draw_text("DELETE: skip\nSPACE: continue", 1, 112) draw_text(">>", 120, 120)