aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/drawing.gd
diff options
context:
space:
mode:
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()