From 179ad5a11b5a5780df494db61ed72baae4b7cec2 Mon Sep 17 00:00:00 2001 From: IcECreAm777 Date: Sat, 8 Jul 2023 18:17:15 +0200 Subject: resetting level and loading next level --- Scripts/drawing.gd | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Scripts/drawing.gd') 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() -- cgit