diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-11-03 14:10:07 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-11-03 14:10:07 +0100 |
commit | 84365b6f901a9c0251a9f724a8d9f81a3787e97d (patch) | |
tree | 401e2bf99e6573d1d069f5044e7448067cdfb384 /Game/Selection | |
parent | a43499efa6c228cea3633f9661f3ff09127bd82d (diff) |
next commit
Diffstat (limited to 'Game/Selection')
-rw-r--r-- | Game/Selection/SelectionManager.gd | 6 | ||||
-rw-r--r-- | Game/Selection/selectable_area.gd | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/Game/Selection/SelectionManager.gd b/Game/Selection/SelectionManager.gd new file mode 100644 index 0000000..c58dc69 --- /dev/null +++ b/Game/Selection/SelectionManager.gd @@ -0,0 +1,6 @@ +class_name SelectionManager +extends Node + + +func _ready() -> void: + pass diff --git a/Game/Selection/selectable_area.gd b/Game/Selection/selectable_area.gd index b3336f1..0b3557d 100644 --- a/Game/Selection/selectable_area.gd +++ b/Game/Selection/selectable_area.gd @@ -3,7 +3,9 @@ extends Area2D signal hover_enter signal hover_exit -signal select(event: InputEvent) + +signal select_primary(event: InputEvent) +signal select_secondary(event: InputEvent) #func _on_area_entered(_area: Area2D) -> void: @@ -26,4 +28,6 @@ func _on_mouse_exited() -> void: func _on_input_event(_viewport: Node, event: InputEvent, _shape_idx: int) -> void: if event.is_action_pressed("select"): - select.emit(event) + select_primary.emit(event) + if event.is_action_pressed("select_secondary"): + select_secondary.emit(event) |