diff options
author | altaf-creator <dev@altafcreator.com> | 2024-04-13 14:55:31 +0700 |
---|---|---|
committer | altaf-creator <dev@altafcreator.com> | 2024-04-13 14:55:31 +0700 |
commit | 24f5e910dd8f575adc483f768422ab51fdf905cc (patch) | |
tree | 3486579c0949ec89f3550ee94d35dc20a111ab0d /Scripts/NumberArea.gd |
Initial commit. Exists: NumberNode, Player, dragging and dropping, joining NumberNodes
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 |