Made building consume resources

Now may build more than one if resources allow
building placement is red/green for indicating success
This commit is contained in:
2024-03-10 07:50:26 -05:00
parent 856b6a0400
commit d74bfda9a3
8 changed files with 53 additions and 9 deletions

View File

@@ -6,6 +6,9 @@ const SCIFI_TILESHEET = preload("res://assets/scifi_tilesheet@2.png")
var _resource_displays := {}
func _ready() -> void:
ResourceManager.changed_resource.connect(_on_resource_manager_changed_resource)
func _on_resource_manager_changed_resource(changed: ResourceChangedSignal) -> void:
for resource: GameResource in changed.changed_resources.keys():
if not _resource_displays.has(resource):