aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/drawing.gd
diff options
context:
space:
mode:
authorLibravatar IcECreAm777 <hgk.1998@googlemail.com>2023-07-08 18:17:15 +0200
committerLibravatar IcECreAm777 <hgk.1998@googlemail.com>2023-07-08 18:17:15 +0200
commit179ad5a11b5a5780df494db61ed72baae4b7cec2 (patch)
tree350388f9cb5423b1c9fca0adfed257d97edd1fdc /Scripts/drawing.gd
parent516635e22464699fa940ed981a186088352ba734 (diff)
download2023-179ad5a11b5a5780df494db61ed72baae4b7cec2.tar.gz
2023-179ad5a11b5a5780df494db61ed72baae4b7cec2.tar.bz2
2023-179ad5a11b5a5780df494db61ed72baae4b7cec2.zip
resetting level and loading next level
Diffstat (limited to 'Scripts/drawing.gd')
-rw-r--r--Scripts/drawing.gd11
1 files changed, 7 insertions, 4 deletions
diff --git a/Scripts/drawing.gd b/Scripts/drawing.gd
index 18e2a6c..61896f9 100644
--- a/Scripts/drawing.gd
+++ b/Scripts/drawing.gd
@@ -9,11 +9,9 @@ func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
-func _start_drawing():
- line.clear_points()
- path.curve.clear_points()
+func start_drawing():
+ reset()
drawing = true
- owner.set_driving(false)
func _end_drawing():
@@ -25,3 +23,8 @@ func _input(event):
if drawing and event is InputEventMouseMotion:
line.add_point(event.position)
path.curve.add_point(event.position)
+
+
+func reset():
+ line.clear_points()
+ path.curve.clear_points()