summaryrefslogtreecommitdiff
path: root/Game/States/Default/StateDefault.gd
blob: 26384c51894cedd442e13f6ef71b1b4c6149b35f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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("builder_tower_select"):
		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
	
	if event.is_action_pressed("select"):
		if Unit.selected_unit:
			Unit.selected_unit.is_selected = false