From 6db6465d1b938ec494cd66c9984bff5cc14bde11 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 20 Oct 2024 12:09:48 +0200 Subject: next commit --- Game/States/Build/StateBuild.gd | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Game/States/Build') diff --git a/Game/States/Build/StateBuild.gd b/Game/States/Build/StateBuild.gd index dee5084..e7f122d 100644 --- a/Game/States/Build/StateBuild.gd +++ b/Game/States/Build/StateBuild.gd @@ -7,6 +7,10 @@ static var current_builder_element: BuilderElement func _state_enter(): %BuildGrid.visible = true + + if Tower.selected_towers: + for tower in Tower.selected_towers.duplicate(): + tower.is_selected = false func _state_exit(): @@ -20,11 +24,6 @@ func _state_input(event: InputEvent): var placed_tower = current_builder_element.element.instantiate() as Tower placed_tower.global_position = current_builder_element.global_position - placed_tower.attack_range = [ - Client.current_stage.map.tile_set.tile_size.x * 2, - Client.current_stage.map.tile_set.tile_size.x * 3, - Client.current_stage.map.tile_set.tile_size.x * 4, - ].pick_random() Client.place_tower(placed_tower) -- cgit v1.2.3