1
0
Fork 0
This repository has been archived on 2025-09-12. You can view files and clone it, but cannot push or open issues or pull requests.
honest-jam-2/game/construction/BuildingThumbnail.gd

13 lines
293 B
GDScript

extends Button
export var building: PackedScene
onready var game: Node = find_parent("Game")
func _ready() -> void:
connect("pressed", self, "pressed")
func pressed() -> void:
if game.selected_building:
game.selected_building.queue_free()
game.selected_building = building.instance()