Reworked weapons and projectiles

This commit is contained in:
2025-12-20 18:35:27 +03:00
parent 2ecc53416a
commit 8227e8bcf3
312 changed files with 2466 additions and 1376 deletions
+27
View File
@@ -0,0 +1,27 @@
class_name WeaponSelector
extends Control
signal weapon_selected(weapon_data: WeaponData)
@export var weapon_data: WeaponData:
set = _set_weapon_data
@onready var button : Button = $%Button
@onready var name_label : Label = $%NameLabel
@onready var description_label : Label = $%DescriptionLabel
func _set_weapon_data(data: WeaponData) -> void:
weapon_data = data
if weapon_data == null: return
name_label.text = weapon_data.name
description_label.text = weapon_data.description
func _on_button_pressed() -> void:
weapon_selected.emit(weapon_data)