Global refactor

This commit is contained in:
Rendo 2025-12-09 11:53:52 +05:00
commit 0589ca4e23
180 changed files with 249 additions and 401 deletions

View file

@ -0,0 +1,15 @@
extends Button
@export var weapon: WeaponResource
func _ready() -> void:
icon = weapon.preview
text = str(weapon.cost)
func _pressed() -> void:
var player_data = Session.get_player_data()
if player_data["money"] >= weapon.cost:
var player: Player = Session.player_nodes[multiplayer.get_unique_id()]
player_data["money"] -= weapon.cost
player.get_node("WeaponSystem").add(weapon.weapon_system_scene.instantiate(),"ability_first")