diff options
author | IcECreAm777 <hgk.1998@googlemail.com> | 2023-07-08 18:17:15 +0200 |
---|---|---|
committer | IcECreAm777 <hgk.1998@googlemail.com> | 2023-07-08 18:17:15 +0200 |
commit | 179ad5a11b5a5780df494db61ed72baae4b7cec2 (patch) | |
tree | 350388f9cb5423b1c9fca0adfed257d97edd1fdc /Scripts/drawing.gd | |
parent | 516635e22464699fa940ed981a186088352ba734 (diff) | |
download | 2023-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.gd | 11 |
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() |