Add new assets and implement minimap functionality

- Added new image assets for game over screens: `game_over_dead_bg.png`, `game_over_victory_bg.png`, and their respective Aseprite files.
- Introduced a new `Minimap` class to manage torch placement and rendering on the minimap.
- Implemented methods for adding and removing torches, updating the grid area, and drawing the minimap based on the current state of the game.
- Enhanced the minimap display with color coding for walls, empty spaces, and torches.
This commit is contained in:
2026-04-03 02:51:11 +01:00
parent b325b35c88
commit 222b28d196
24 changed files with 209 additions and 32 deletions
+4
View File
@@ -9,6 +9,8 @@ require_relative 'character'
class Game < Scene
def initialize
super
$is_dead = false
@font = Gosu::Font.new(24)
@floor_image = Gosu::Image.new("assets/images/floor.png", retro: true)
@@ -94,6 +96,8 @@ class Game < Scene
end
def button_down(id, pos)
# Pressing ESC returns to the menu, this is bad but I don't have time to make a proper pause menu,
# as the game has no persistent state outside of the current scene, just returning to the menu resets everything
return $bus.emit(:change_scene, Menu.new) if id == Gosu::KB_ESCAPE
return if @hud.button_down(id, pos)