Massive work on level, UI, sound, and player functionality, small progress on netcode. Renamed project to Net Gunner.

This commit is contained in:
2025-12-22 09:04:22 -05:00
parent 9a8f06437d
commit 3b6407d6e5
566 changed files with 42735 additions and 183 deletions

24
scripts/trap_icon.gd Normal file
View File

@@ -0,0 +1,24 @@
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"),
}
@onready var icon_image : TextureRect = %Icon
@onready var qty_label : Label = %Label
func setup(type : Game.TrapType, qty : int) -> void:
icon_image.texture = trap_icons[type]
set_quantity(qty)
func set_quantity(qty : int) -> void:
qty_label.text = str(qty)
if qty < 1:
icon_image.modulate = Color.DIM_GRAY
else:
icon_image.modulate = Color.WHITE