UI work, placing traps, removing traps, disarming traps, new sound fx.

This commit is contained in:
2025-12-25 17:52:30 -05:00
parent 3b6407d6e5
commit 55eb37ca74
34 changed files with 867 additions and 72 deletions

View File

@@ -1,18 +1,18 @@
class_name TrapIcon extends Control
const trap_icons : Dictionary = {
Game.TrapType.BOMB : preload("res://visuals/images/icons/bomb.png"),
Game.TrapType.GAS : preload("res://visuals/images/icons/gas.png"),
Game.TrapType.PITFALL : preload("res://visuals/images/icons/pitfall.png"),
Game.TrapType.FORCE_PANEL : preload("res://visuals/images/icons/force_panel.png"),
Game.TrapType.SWITCH : preload("res://visuals/images/icons/switch.png"),
Game.TrapType.MINE : preload("res://visuals/images/icons/mine.png"),
Trap.Type.BOMB : preload("res://visuals/images/icons/bomb.png"),
Trap.Type.GAS : preload("res://visuals/images/icons/gas.png"),
Trap.Type.PITFALL : preload("res://visuals/images/icons/pitfall.png"),
Trap.Type.FORCE_PANEL : preload("res://visuals/images/icons/force_panel.png"),
Trap.Type.SWITCH : preload("res://visuals/images/icons/switch.png"),
Trap.Type.MINE : preload("res://visuals/images/icons/mine.png"),
}
@onready var icon_image : TextureRect = %Icon
@onready var qty_label : Label = %Label
func setup(type : Game.TrapType, qty : int) -> void:
func setup(type : Trap.Type, qty : int) -> void:
icon_image.texture = trap_icons[type]
set_quantity(qty)