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
@@ -27,7 +27,7 @@ class WeaponHandler
weapon = @weapons[selected_item]
if $bus.get(:count, selected_item) > 0
if id == Gosu::KB_SPACE
if id == $bus.get(:settings, :attack)
player_x, player_y = $bus.get(:player_position)
cam_x, cam_y = $bus.get(:camera_pos) || [0, 0]
mouse_x, mouse_y = $bus.get(:mouse_pos) || [0, 0]