feat: Implement tile scarcity model for tile generation and power-up inventory UI for player interaction.

This commit is contained in:
Yogi Wiguna
2026-02-25 12:09:14 +08:00
parent 040e6e53ce
commit 4990ce3c89
7 changed files with 116 additions and 36 deletions
+18 -8
View File
@@ -89,14 +89,24 @@ func handle_unhandled_input(event):
# --- Keyboard Shortcuts (Event-based) ---
if event is InputEventKey and event.pressed and not event.echo:
match event.keycode:
KEY_KP_1, KEY_1:
player.activate_powerup(0) # FASTER_SPEED
KEY_KP_2, KEY_2:
player.activate_powerup(2) # BLOCK_FLOOR
KEY_KP_3, KEY_3:
player.activate_powerup(1) # AREA_FREEZE
KEY_KP_4, KEY_4:
player.activate_powerup(3) # INVISIBLE_MODE
KEY_KP_1, KEY_1, KEY_KP_2, KEY_2, KEY_KP_3, KEY_3, KEY_KP_4, KEY_4:
var is_sng = LobbyManager.game_mode == "Stop n Go"
match event.keycode:
KEY_KP_1, KEY_1:
player.activate_powerup(0) # FASTER_SPEED
KEY_KP_2, KEY_2:
if is_sng:
player.activate_powerup(1) # AREA_FREEZE (StopNGo)
else:
player.activate_powerup(2) # BLOCK_FLOOR (Free)
KEY_KP_3, KEY_3:
if is_sng:
player.activate_powerup(3) # INVISIBLE_MODE (StopNGo)
else:
player.activate_powerup(1) # AREA_FREEZE (Free)
KEY_KP_4, KEY_4:
if not is_sng:
player.activate_powerup(3) # INVISIBLE_MODE (Free)
# KEY_R:
# player.auto_put_item()
KEY_Q: