summaryrefslogtreecommitdiff
path: root/UI
diff options
context:
space:
mode:
Diffstat (limited to 'UI')
-rw-r--r--UI/spawn_button.gd6
-rw-r--r--UI/tower_configuration.gd6
2 files changed, 12 insertions, 0 deletions
diff --git a/UI/spawn_button.gd b/UI/spawn_button.gd
index a773406..3051dfb 100644
--- a/UI/spawn_button.gd
+++ b/UI/spawn_button.gd
@@ -4,6 +4,12 @@ extends TextureButton
@export var texture: Texture2D
@export var sprite_sheet: SpriteFrames
+@export var cost := 5
+
+
+func _ready():
+ tooltip_text = "Cost: " + str(cost)
+
func _on_pressed() -> void:
var unit = preload("res://Units/Unit.tscn").instantiate() as Unit
diff --git a/UI/tower_configuration.gd b/UI/tower_configuration.gd
index 7031de5..302a0ac 100644
--- a/UI/tower_configuration.gd
+++ b/UI/tower_configuration.gd
@@ -3,6 +3,12 @@ extends PanelContainer
var is_hovered = false
+@export var cost := 5
+
+
+func _ready() -> void:
+ tooltip_text = "Cost: " + str(cost)
+
func _on_mouse_entered() -> void:
is_hovered = true