extends Button
class_name TowerButton

@export var tower : PackedScene
var tower_in_game : Tower

func _on_pressed() -> void:
	EventBus.tower_selected.emit(tower, self)

func _process(delta: float) -> void:
	if tower_in_game:
		$EnergyBar.value = tower_in_game.energy/tower_in_game.max_energy * 100.0
