Add debug teleportation and player position display; enhance maze debug output

This commit is contained in:
2026-03-25 09:20:06 +00:00
parent 8d643a3842
commit 84004a9f67
3 changed files with 53 additions and 34 deletions
+10
View File
@@ -1,4 +1,6 @@
class Character
attr_reader :world_x, :world_y
SPEED = 2.5
SIZE = [25, 30]
@@ -89,6 +91,14 @@ class Character
@world_y -= dy
end
# teleport to boss room for debug purposes
if DEBUG && Gosu.button_down?(Gosu::KB_T)
room_coords = $bus.get(:boss_room_coords)
if room_coords
@world_x, @world_y = [room_coords[0] * 60 + 5, room_coords[1] * 60 + 5]
end
end
# Camera follow
cam_x = @world_x - SCREEN_SIZE[0] / 2.0
cam_y = @world_y - SCREEN_SIZE[1] / 2.0