summaryrefslogtreecommitdiff
path: root/UI/spawn_button.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-11-06 12:27:51 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-11-06 12:27:51 +0100
commit6f17d6c1d458275e8744d57a7f433cc3eb5434d7 (patch)
tree588434069b86aa079a0b36c78367dfb14003321e /UI/spawn_button.gd
parentc8f674ac6fa0914d9e448d2929f2385cdad80d60 (diff)
next commit
Diffstat (limited to 'UI/spawn_button.gd')
-rw-r--r--UI/spawn_button.gd6
1 files changed, 6 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