Added a (shrinking) finish line, and ensured maximum smoothness of the track at finish
This commit is contained in:
parent
8c7870092f
commit
098033bbbf
2 changed files with 27 additions and 2 deletions
|
@ -1,8 +1,9 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://c77xk0mywwt5f"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://c77xk0mywwt5f"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/game/level.gd" id="1_hv75i"]
|
||||
[ext_resource type="PackedScene" uid="uid://ckau5s2tsb3oc" path="res://src/game/player.tscn" id="2_5nf51"]
|
||||
[ext_resource type="Texture2D" uid="uid://bd0jqkgq1gh7p" path="res://assets/track.png" id="2_knecs"]
|
||||
[ext_resource type="Texture2D" uid="uid://cd7bqj3v0k8yi" path="res://assets/finish.png" id="4_r6pvu"]
|
||||
|
||||
[sub_resource type="Curve2D" id="Curve2D_ll8bj"]
|
||||
_data = {
|
||||
|
@ -10,13 +11,14 @@ _data = {
|
|||
}
|
||||
point_count = 7
|
||||
|
||||
[node name="level1" type="Node2D" node_paths=PackedStringArray("path", "line", "player")]
|
||||
[node name="level1" type="Node2D" node_paths=PackedStringArray("path", "line", "player", "finish")]
|
||||
script = ExtResource("1_hv75i")
|
||||
starting_width = 400.0
|
||||
shrink_factor = 5.0
|
||||
path = NodePath("TrackPath")
|
||||
line = NodePath("TrackLine")
|
||||
player = NodePath("player")
|
||||
finish = NodePath("FinishLine")
|
||||
|
||||
[node name="TrackPath" type="Path2D" parent="."]
|
||||
curve = SubResource("Curve2D_ll8bj")
|
||||
|
@ -26,6 +28,11 @@ texture_repeat = 2
|
|||
texture = ExtResource("2_knecs")
|
||||
texture_mode = 2
|
||||
|
||||
[node name="FinishLine" type="Line2D" parent="."]
|
||||
texture_repeat = 2
|
||||
texture = ExtResource("4_r6pvu")
|
||||
texture_mode = 1
|
||||
|
||||
[node name="player" parent="." instance=ExtResource("2_5nf51")]
|
||||
position = Vector2(42.7545, -14.9219)
|
||||
brake_strength = 800.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue