feat: Add core manager scripts for camera context, player input, special tiles, and a powerup inventory UI.

This commit is contained in:
Yogi Wiguna
2026-03-04 13:27:22 +08:00
parent b32565203f
commit a78acd12b8
4 changed files with 78 additions and 198 deletions
+16 -16
View File
@@ -97,22 +97,22 @@ func handle_unhandled_input(event):
KEY_KP_1, KEY_1, KEY_KP_2, KEY_2, KEY_KP_3, KEY_3, KEY_KP_4, KEY_4:
var mode = LobbyManager.get_game_mode()
var is_restricted = GameMode.is_restricted(mode)
match event.keycode:
KEY_KP_1, KEY_1:
player.activate_powerup(0) # FASTER_SPEED
KEY_KP_2, KEY_2:
if is_restricted:
player.activate_powerup(1) # AREA_FREEZE (Restricted)
else:
player.activate_powerup(2) # BLOCK_FLOOR (Free)
KEY_KP_3, KEY_3:
if is_restricted:
player.activate_powerup(3) # INVISIBLE_MODE (Restricted)
else:
player.activate_powerup(1) # AREA_FREEZE (Free)
KEY_KP_4, KEY_4:
if not is_restricted:
player.activate_powerup(3) # INVISIBLE_MODE (Free)
if is_restricted:
match event.keycode:
KEY_KP_1, KEY_1:
player.activate_powerup(0) # FASTER_SPEED
KEY_KP_2, KEY_2:
player.activate_powerup(3) # INVISIBLE_MODE (Ghost is now 2)
else:
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_R:
# player.auto_put_item()
KEY_Q: