diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-10-20 12:09:48 +0200 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-10-20 12:09:48 +0200 |
commit | 6db6465d1b938ec494cd66c9984bff5cc14bde11 (patch) | |
tree | 9533b364e3e40ff813ef263ab05bd69ac31f8777 /Game/States | |
parent | e82990eeafdf0be5d42d8aaa9b7fb6091e0d8435 (diff) |
next commit
Diffstat (limited to 'Game/States')
-rw-r--r-- | Game/States/Build/StateBuild.gd | 9 |
1 files changed, 4 insertions, 5 deletions
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) |