summaryrefslogtreecommitdiff
path: root/Game/States
diff options
context:
space:
mode:
Diffstat (limited to 'Game/States')
-rw-r--r--Game/States/Build/StateBuild.gd5
-rw-r--r--Game/States/Default/StateDefault.gd5
2 files changed, 4 insertions, 6 deletions
diff --git a/Game/States/Build/StateBuild.gd b/Game/States/Build/StateBuild.gd
index 0bd5efb..303a2b1 100644
--- a/Game/States/Build/StateBuild.gd
+++ b/Game/States/Build/StateBuild.gd
@@ -8,9 +8,8 @@ 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
+ for tower: Tower in Client.selection.get_nodes().duplicate():
+ tower.is_selected = false
func _state_exit():
diff --git a/Game/States/Default/StateDefault.gd b/Game/States/Default/StateDefault.gd
index b7b630c..014eb40 100644
--- a/Game/States/Default/StateDefault.gd
+++ b/Game/States/Default/StateDefault.gd
@@ -16,6 +16,5 @@ func _state_unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("select"):
# if not multi selecting
if not event.is_double_click() and not Input.is_action_pressed("select_multiple"):
- if Tower.selected_towers:
- for tower in Tower.selected_towers.duplicate():
- tower.is_selected = false
+ for tower: Tower in Client.selection.get_nodes().duplicate():
+ tower.is_selected = false