diff options
author | perivesta <> | 2023-07-08 11:40:53 +0200 |
---|---|---|
committer | perivesta <> | 2023-07-08 11:40:53 +0200 |
commit | 892ed4854bcccbac546f5ac32c0c5fa0245f5fa7 (patch) | |
tree | 6c3403e1734790c48a90741e62e0369301b1e06a /Nodes/drawing_and_driving.tscn | |
parent | a10d0e582a9a614b933f3e689592595e6438513e (diff) | |
download | 2023-892ed4854bcccbac546f5ac32c0c5fa0245f5fa7.tar.gz 2023-892ed4854bcccbac546f5ac32c0c5fa0245f5fa7.tar.bz2 2023-892ed4854bcccbac546f5ac32c0c5fa0245f5fa7.zip |
draw a path for car to follow
Diffstat (limited to 'Nodes/drawing_and_driving.tscn')
-rw-r--r-- | Nodes/drawing_and_driving.tscn | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/Nodes/drawing_and_driving.tscn b/Nodes/drawing_and_driving.tscn index 9e2a36a..32ef3e1 100644 --- a/Nodes/drawing_and_driving.tscn +++ b/Nodes/drawing_and_driving.tscn @@ -1,3 +1,27 @@ -[gd_scene format=3 uid="uid://bj5wruvb2hg20"] +[gd_scene load_steps=6 format=3 uid="uid://bj5wruvb2hg20"] + +[ext_resource type="Script" path="res://Scripts/scene_control.gd" id="1_6bj13"] +[ext_resource type="PackedScene" uid="uid://c1mvbh2fwqtkb" path="res://Nodes/car.tscn" id="1_ktvsb"] +[ext_resource type="Script" path="res://Scripts/drawing.gd" id="3_el555"] +[ext_resource type="Texture2D" uid="uid://dg3v488vx0oj6" path="res://Assets/checkpoint.png" id="4_ar5ae"] + +[sub_resource type="Curve2D" id="Curve2D_wmfhm"] [node name="drawing_and_driving" type="Node2D"] +script = ExtResource("1_6bj13") + +[node name="Car" parent="." instance=ExtResource("1_ktvsb")] + +[node name="DrawNode" type="Node2D" parent="."] +script = ExtResource("3_el555") + +[node name="TrackLine" type="Line2D" parent="DrawNode"] + +[node name="TrackPath" type="Path2D" parent="DrawNode"] +curve = SubResource("Curve2D_wmfhm") + +[node name="TrackFollower" type="PathFollow2D" parent="DrawNode/TrackPath"] + +[node name="Sprite2D" type="Sprite2D" parent="DrawNode/TrackPath/TrackFollower"] +scale = Vector2(0.604, 0.604) +texture = ExtResource("4_ar5ae") |