Refactor input handling: replace hardcoded key inputs with configurable key bindings for character movement, inventory navigation, and actions; enhance settings scene with key rebind functionality and add credits scene.

This commit is contained in:
2026-04-03 14:46:35 +01:00
parent 5814a1fdee
commit bf1171a775
13 changed files with 175 additions and 41 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ class PropsHandler
@grid.delete([prop.x, prop.y])
end
end
if Gosu.button_down?(Gosu::KB_P) # place selected if it is a placeable item
if Gosu.button_down?($bus.get(:settings, :place))
selected_item = $bus.get(:selected_item)
if selected_item == :torch
player_x, player_y = $bus.get(:player_position) || [0, 0]