class_name StateDefault extends State func _state_input(event: InputEvent) -> void: if event.is_action_pressed("build_mode_start"): set_state("StateBuild") if event.is_action_pressed("select"): if Unit.selected_unit: Unit.selected_unit.is_selected = false func _state_unhandled_input(event: InputEvent) -> void: # deselect if event.is_action_pressed("select"): # if not multi selecting if not event.is_double_click() and not Input.is_action_pressed("select_multiple"): for tower: Tower in Client.selection.get_nodes().duplicate(): tower.is_selected = false