aboutsummaryrefslogtreecommitdiffstats
path: root/Scripts/drawing.gd
diff options
context:
space:
mode:
authorLibravatar IcECreAm777 <hgk.1998@googlemail.com>2023-07-09 17:31:37 +0200
committerLibravatar IcECreAm777 <hgk.1998@googlemail.com>2023-07-09 17:31:37 +0200
commit6b6d02ead8b1f5b0f5cf44d0a88abe50769128ca (patch)
treef84fd031e519515d6e72a917e8316a54f6572e31 /Scripts/drawing.gd
parent338c1b1c778af4a64aac3a3ae2cd5c06304a65cc (diff)
parentfd37d1030f79705fc7a2498bcd356ebc86462544 (diff)
download2023-6b6d02ead8b1f5b0f5cf44d0a88abe50769128ca.tar.gz
2023-6b6d02ead8b1f5b0f5cf44d0a88abe50769128ca.tar.bz2
2023-6b6d02ead8b1f5b0f5cf44d0a88abe50769128ca.zip
Merge branch 'master' of bunny.garden:jam/gmtk/2023
the commit.
Diffstat (limited to 'Scripts/drawing.gd')
-rw-r--r--Scripts/drawing.gd6
1 files changed, 5 insertions, 1 deletions
diff --git a/Scripts/drawing.gd b/Scripts/drawing.gd
index 832c42d..6b94f6e 100644
--- a/Scripts/drawing.gd
+++ b/Scripts/drawing.gd
@@ -2,7 +2,7 @@ extends Node
var drawing = false
-@onready var line: Line2D = $TrackLine
+@onready var line = $Road
@onready var path: Path2D = $TrackPath
func _ready():
@@ -16,6 +16,10 @@ func start_drawing():
func _end_drawing():
drawing = false
+ line.simplify()
+ line.draw_borders()
+ for point in line.points:
+ path.curve.add_point(point)
owner.set_driving(true)