diff options
Diffstat (limited to 'Scripts/NumberArea.gd')
-rw-r--r-- | Scripts/NumberArea.gd | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Scripts/NumberArea.gd b/Scripts/NumberArea.gd new file mode 100644 index 0000000..443fada --- /dev/null +++ b/Scripts/NumberArea.gd @@ -0,0 +1,20 @@ +extends Area2D + +var parent : NumberNode + +func _ready(): + parent = $".." + +func _on_mouse_entered(): + if !parent.do_scanning: + return + + if GlobalVariables.is_snapping && GlobalVariables.player.legal: + GlobalVariables.player.target = parent + +func _on_mouse_exited(): + if !parent.do_scanning: + return + + if GlobalVariables.is_snapping: + GlobalVariables.player.target = null |