aboutsummaryrefslogtreecommitdiffstats
path: root/Nodes
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2023-07-09 14:02:37 +0100
committerLibravatar cel 🌸 <cel@blos.sm>2023-07-09 14:02:37 +0100
commitae7b7226c64e7b9ce62e045991c315040563fe5a (patch)
treeabca4450641dee1a63150d45eeaf4fb3b6fb7676 /Nodes
parentf1677fac1f7c7989a28d078498357c88f9f631f3 (diff)
download2023-ae7b7226c64e7b9ce62e045991c315040563fe5a.tar.gz
2023-ae7b7226c64e7b9ce62e045991c315040563fe5a.tar.bz2
2023-ae7b7226c64e7b9ce62e045991c315040563fe5a.zip
road simplification via Ramer–Douglas–Peucker
Diffstat (limited to 'Nodes')
-rw-r--r--Nodes/Level_test.tscn11
1 files changed, 8 insertions, 3 deletions
diff --git a/Nodes/Level_test.tscn b/Nodes/Level_test.tscn
index f082198..0703906 100644
--- a/Nodes/Level_test.tscn
+++ b/Nodes/Level_test.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=11 format=3 uid="uid://dliou1u4o6bib"]
+[gd_scene load_steps=12 format=3 uid="uid://dliou1u4o6bib"]
[ext_resource type="Script" path="res://Scripts/scene_control.gd" id="1_0esj3"]
[ext_resource type="Texture2D" uid="uid://5xqahgawme4m" path="res://Assets/start.png" id="1_wenkl"]
@@ -6,7 +6,8 @@
[ext_resource type="Texture2D" uid="uid://dg3v488vx0oj6" path="res://Assets/checkpoint.png" id="3_cgigr"]
[ext_resource type="PackedScene" uid="uid://c1mvbh2fwqtkb" path="res://Nodes/car.tscn" id="4_xvobs"]
[ext_resource type="Script" path="res://Scripts/drawing.gd" id="5_x7h3g"]
-[ext_resource type="PackedScene" uid="uid://wkfai2lvnp7n" path="res://Nodes/checkpoint.tscn" id="7_52mhf"]
+[ext_resource type="PackedScene" path="res://Nodes/checkpoint.tscn" id="7_52mhf"]
+[ext_resource type="Script" path="res://Scripts/Road.gd" id="7_nyjk7"]
[ext_resource type="PackedScene" uid="uid://c8r6i3bu37ogu" path="res://Nodes/ui.tscn" id="8_8u1ba"]
[sub_resource type="CircleShape2D" id="CircleShape2D_6g88q"]
@@ -42,7 +43,11 @@ acceleration = 0.05
[node name="DrawNode" type="Node2D" parent="."]
script = ExtResource("5_x7h3g")
-[node name="TrackLine" type="Line2D" parent="DrawNode"]
+[node name="Road" type="Line2D" parent="DrawNode"]
+width = 100.0
+default_color = Color(0.133333, 0.133333, 0.133333, 1)
+joint_mode = 2
+script = ExtResource("7_nyjk7")
[node name="TrackPath" type="Path2D" parent="DrawNode"]
curve = SubResource("Curve2D_0exre")