Made particles emit from resource

This commit is contained in:
2024-03-12 10:23:11 -05:00
parent 4b362fabed
commit 4718108407
8 changed files with 72 additions and 22 deletions

View File

@@ -29,7 +29,7 @@ func change_building(data: BuildingBase) -> void:
layer_info[Constants.TilemapLayers.BUILDINGS] = data
func get_resource() -> GameResource:
return layer_info[Constants.TilemapLayers.ENVIRONMENT] as GameResource
return layer_info[Constants.TilemapLayerss.ENVIRONMENT] as GameResource
func has_resource() -> bool:
return has_layer(Constants.TilemapLayers.ENVIRONMENT)

View File

@@ -14,6 +14,7 @@ func _ready() -> void:
func _cleanup_gather() -> void:
interaction_finished.emit()
#TODO add the interaction for buildings
var res: GameResource = Grid.get_location_data(grid_position).get_resource()
ResourceManager.pickup(res)
self.queue_free()