small racing game im working on
Diffstat (limited to 'main.tscn')
-rw-r--r--main.tscn79
1 files changed, 37 insertions, 42 deletions
diff --git a/main.tscn b/main.tscn
index 6b4e788..a816bf4 100644
--- a/main.tscn
+++ b/main.tscn
@@ -1,18 +1,17 @@
-[gd_scene load_steps=17 format=3 uid="uid://bnbab2hgqh4w5"]
+[gd_scene load_steps=15 format=3 uid="uid://bnbab2hgqh4w5"]
[ext_resource type="Script" path="res://main.gd" id="1_cps4g"]
[ext_resource type="Environment" uid="uid://biwshm46yl62v" path="res://default_env.tres" id="1_rbfsw"]
[ext_resource type="CameraAttributesPractical" uid="uid://nhsovwj5hjip" path="res://cam.tres" id="2_rymfk"]
-[ext_resource type="Material" uid="uid://b3sesqrdyxv5t" path="res://assets/mats/grass.tres" id="3_iiti7"]
+[ext_resource type="Material" path="res://assets/mats/grass.tres" id="3_iiti7"]
[ext_resource type="Script" path="res://cam.gd" id="4_u07o8"]
-[ext_resource type="PackedScene" uid="uid://duba8yjseopy6" path="res://scenes/track.tscn" id="6_u5ece"]
+[ext_resource type="PackedScene" uid="uid://dyd5mqhgu6qfv" path="res://assets/cars/kenney_sedan/sedan.tscn" id="6_1vlt4"]
+[ext_resource type="PackedScene" uid="uid://clw61td2wh84w" path="res://scenes/track.tscn" id="6_u5ece"]
[ext_resource type="Theme" uid="uid://ch2uo5qd8ubx6" path="res://ui/theme.tres" id="8_qjj2f"]
-[ext_resource type="Script" path="res://ui/revs.gd" id="9_hvuf0"]
+[ext_resource type="Script" path="res://ui/map.gd" id="9_17iea"]
[ext_resource type="Script" path="res://ui/speedometer.gd" id="10_fu5aw"]
-[ext_resource type="Script" path="res://ui/gears.gd" id="10_gvf44"]
[ext_resource type="Curve3D" uid="uid://u2f56xx8h2re" path="res://tracks/speedway_curve.tres" id="12_5lojs"]
[ext_resource type="Resource" uid="uid://d3te55uy5ei7k" path="res://tracks/speedway_track.tres" id="13_pjowj"]
-[ext_resource type="Script" path="res://test.gd" id="14_6hrhe"]
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_tkhh8"]
@@ -20,13 +19,12 @@
material = ExtResource("3_iiti7")
size = Vector2(5000, 5000)
-[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_h85yi"]
-
[node name="main" type="Node3D"]
script = ExtResource("1_cps4g")
[node name="Sun" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.261981, -0.791013, -0.55287, 0.791617, -0.15154, 0.591927, -0.552004, -0.592735, 0.586479, 0, 37.0187, 0)
+directional_shadow_mode = 0
[node name="Env" type="WorldEnvironment" parent="."]
environment = ExtResource("1_rbfsw")
@@ -44,12 +42,17 @@ mesh = SubResource("PlaneMesh_ta0cd")
[node name="Camera3D" type="Camera3D" parent="." node_paths=PackedStringArray("follow_this")]
transform = Transform3D(-0.718418, -0.318909, -0.618201, 0.111279, -0.92996, 0.350416, -0.686653, 0.182953, 0.703588, -7.07504, 13.1712, 16.3801)
+far = 400.0
script = ExtResource("4_u07o8")
-follow_this = NodePath("../Car/SedanSports")
-target_distance = 7.0
+follow_this = NodePath("../Car/Sedan")
+target_distance = 9.0
target_height = 5.0
[node name="Car" type="Node3D" parent="."]
+transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 2, 100)
+
+[node name="Sedan" parent="Car" instance=ExtResource("6_1vlt4")]
+show_debug = true
[node name="CanvasLayer" type="CanvasLayer" parent="."]
@@ -67,20 +70,6 @@ grow_vertical = 0
theme = ExtResource("8_qjj2f")
theme_override_constants/separation = 50
-[node name="Panel3" type="PanelContainer" parent="CanvasLayer/HBoxContainer"]
-layout_mode = 2
-theme = ExtResource("8_qjj2f")
-
-[node name="Revometer" type="Label" parent="CanvasLayer/HBoxContainer/Panel3" node_paths=PackedStringArray("car")]
-custom_minimum_size = Vector2(0, 105)
-layout_mode = 2
-size_flags_horizontal = 4
-text = " 0rpm"
-horizontal_alignment = 1
-vertical_alignment = 1
-script = ExtResource("9_hvuf0")
-car = NodePath("../../../../Car/SedanSports")
-
[node name="Panel" type="PanelContainer" parent="CanvasLayer/HBoxContainer"]
layout_mode = 2
theme = ExtResource("8_qjj2f")
@@ -93,28 +82,34 @@ text = "龍 0km/h"
horizontal_alignment = 1
vertical_alignment = 1
script = ExtResource("10_fu5aw")
-car = NodePath("../../../../Car/SedanSports")
+car = NodePath("../../../../Car/Sedan")
-[node name="Panel2" type="PanelContainer" parent="CanvasLayer/HBoxContainer"]
-layout_mode = 2
-theme = ExtResource("8_qjj2f")
-
-[node name="Gearometer" type="RichTextLabel" parent="CanvasLayer/HBoxContainer/Panel2" node_paths=PackedStringArray("car")]
-custom_minimum_size = Vector2(244, 0)
-layout_mode = 2
-bbcode_enabled = true
-text = "[center] [b][color=#4682b4]N[/color][/b][/center]"
-fit_content_height = true
-scroll_active = false
-script = ExtResource("10_gvf44")
-car = NodePath("../../../../Car/SedanSports")
+[node name="MiniMap" type="Line2D" parent="CanvasLayer" node_paths=PackedStringArray("track")]
+position = Vector2(200, 150)
+default_color = Color(0.588235, 0.588235, 0.588235, 0.807843)
+joint_mode = 2
+antialiased = true
+script = ExtResource("9_17iea")
+track = NodePath("../../Track")
[node name="Track" parent="." instance=ExtResource("6_u5ece")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
curve = ExtResource("12_5lojs")
track = ExtResource("13_pjowj")
-[node name="CSGBox3D" type="CSGBox3D" parent="."]
-transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.43223, 0)
-material = SubResource("StandardMaterial3D_h85yi")
-script = ExtResource("14_6hrhe")
+[node name="Road" parent="Track" index="0"]
+polygon = PackedVector2Array(-20, 0, -20, -0.1, 20, -0.1, 20, 0)
+
+[node name="CollisionShape" parent="Track" index="1"]
+polygon = PackedVector2Array(-23, 0, 23, 0, 23, 5, 26, 5, 26, -1, -26, -1, -26, 5, -23, 5)
+
+[node name="Rail-L" parent="Track" index="2"]
+polygon = PackedVector2Array(23, 0.5, 22.95, 0.47, 22.95, 0.43, 23, 0.4, 23, 0.55, 22.95, 0.32, 22.95, 0.28, 23, 0.25, 23.05, 0.25, 23.05, 0.5)
+
+[node name="Rail-R" parent="Track" index="3"]
+polygon = PackedVector2Array(-23, 0.5, -22.95, 0.47, -22.95, 0.43, -23, 0.4, -23, 0.55, -22.95, 0.32, -22.95, 0.28, -23, 0.25, -23.05, 0.25, -23.05, 0.5)
+
+[node name="Support" parent="Track" index="4"]
+polygon = PackedVector2Array(-22, -0.17, 22, -0.17, 25.1, -2, -25, -2)
+
+[editable path="Track"]