small racing game im working on
Diffstat (limited to 'race.tscn')
| -rw-r--r-- | race.tscn | 269 |
1 files changed, 5 insertions, 264 deletions
@@ -1,280 +1,21 @@ -[gd_scene load_steps=28 format=3 uid="uid://cech6c4yrmcvq"] +[gd_scene load_steps=8 format=3 uid="uid://cech6c4yrmcvq"] [ext_resource type="Script" path="res://race.gd" id="1_ckbwd"] [ext_resource type="Environment" uid="uid://biwshm46yl62v" path="res://default_env.tres" id="2_pnp7e"] [ext_resource type="PackedScene" uid="uid://bbj2agqv581cd" path="res://assets/cars/kenney_sedan/sedan.blend" id="3_cb3p0"] [ext_resource type="CameraAttributesPractical" uid="uid://nhsovwj5hjip" path="res://cam.tres" id="3_jx550"] -[ext_resource type="Material" uid="uid://bdyn312e6c3ll" path="res://assets/mats/grass.tres" id="4_i1mlf"] -[ext_resource type="Script" path="res://cam.gd" id="5_nb035"] -[ext_resource type="Curve3D" uid="uid://u2f56xx8h2re" path="res://tracks/multilap_test_curve.tres" id="5_yk721"] -[ext_resource type="Resource" uid="uid://crye0ijvmtsyb" path="res://tracks/multilap_test.tres" id="6_506fu"] [ext_resource type="PackedScene" uid="uid://ccn1nk1a0b0sa" path="res://assets/cars/kenney_sedan/sedan.tscn" id="6_nu32e"] -[ext_resource type="Theme" uid="uid://ch2uo5qd8ubx6" path="res://ui/theme.tres" id="7_6itw5"] -[ext_resource type="Script" path="res://ui/speedometer.gd" id="8_awr5n"] -[ext_resource type="Script" path="res://ui/timer.gd" id="9_dn61b"] -[ext_resource type="Script" path="res://ui/map.gd" id="10_58kgt"] +[ext_resource type="PackedScene" uid="uid://cd4a5y0hi58ks" path="res://scenes/floor.tscn" id="10_p60d8"] [ext_resource type="PackedScene" uid="uid://clw61td2wh84w" path="res://scenes/track.tscn" id="11_6q53c"] -[ext_resource type="PackedScene" uid="uid://nkh2xi7tnumc" path="res://ui/splits/splits.tscn" id="14_ge1w6"] -[ext_resource type="Texture2D" uid="uid://bfe4ytl0vjosb" path="res://ui/assets/line.png" id="14_n0r0n"] -[ext_resource type="Script" path="res://ui/intro_cam.gd" id="14_yajvg"] -[ext_resource type="Script" path="res://ui/laps.gd" id="16_mxur4"] -[ext_resource type="Texture2D" uid="uid://b3nmp7eyu0hjk" path="res://ui/assets/flag.png" id="16_rp311"] -[ext_resource type="Texture2D" uid="uid://b6ad1yrgtg6qk" path="res://ui/assets/player_indicator.png" id="17_ptq57"] -[ext_resource type="Texture2D" uid="uid://dkbrx7rpa8dvc" path="res://ui/assets/ghost.png" id="18_v7a53"] -[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_tkhh8"] - -[sub_resource type="PlaneMesh" id="PlaneMesh_ta0cd"] -material = ExtResource("4_i1mlf") -size = Vector2(5000, 5000) - -[sub_resource type="Gradient" id="Gradient_2kvil"] -offsets = PackedFloat32Array(0, 0.178744, 0.454106, 0.719807, 1) -colors = PackedColorArray(0.85098, 0.85098, 0.85098, 1, 0.942823, 0.942823, 0.942822, 1, 0.868985, 0.868985, 0.868985, 1, 0.838897, 0.838897, 0.838897, 1, 0.85098, 0.85098, 0.85098, 1) - -[sub_resource type="Animation" id="Animation_2si4r"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Counter:text") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [" -"] -} - -[sub_resource type="Animation" id="Animation_uaks0"] -resource_name = "count_in" -length = 3.0 -step = 0.5 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Counter:text") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 1, 2, 3), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 1, -"values": ["[center][b]3[/b][/center]", "[center][b]2[/b][/center] -", "[center][b]1[/b][/center] -", ""] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Counter:theme_override_colors/default_color") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0, 3), -"transitions": PackedFloat32Array(1, 1), -"update": 0, -"values": [Color(1, 0.360784, 0.227451, 1), Color(0.980392, 0.737255, 0, 1)] -} -tracks/2/type = "method" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("CanvasLayer/HBoxContainer/Panel2/Timer") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(3), -"transitions": PackedFloat32Array(1), -"values": [{ -"args": [], -"method": &"start" -}] -} -tracks/3/type = "method" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("Counter") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(), -"transitions": PackedFloat32Array(), -"values": [] -} -tracks/4/type = "method" -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/path = NodePath("Camera") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/keys = { -"times": PackedFloat32Array(3), -"transitions": PackedFloat32Array(1), -"values": [{ -"args": [], -"method": &"make_current" -}] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_hplnw"] -_data = { -"RESET": SubResource("Animation_2si4r"), -"count_in": SubResource("Animation_uaks0") -} - -[node name="race" type="Node3D" node_paths=PackedStringArray("track", "splits", "timer")] +[node name="race" type="Node3D"] script = ExtResource("1_ckbwd") car_scene = ExtResource("6_nu32e") ghost_scene = ExtResource("3_cb3p0") -track = NodePath("Track") -splits = NodePath("CanvasLayer/Splits") -timer = NodePath("CanvasLayer/HBoxContainer/Panel2/Timer") - -[node name="Track" parent="." instance=ExtResource("11_6q53c")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) -curve = ExtResource("5_yk721") -track = ExtResource("6_506fu") - -[node name="Camera" type="Camera3D" parent="."] -transform = Transform3D(0.226651, 0, -0.973976, 0, 1, 0, 0.973976, 0, 0.226651, -25.1963, 1.82268, -2.33777) -far = 500.0 -script = ExtResource("5_nb035") -target_distance = 9.0 -target_height = 4.0 +track_loader_scene = ExtResource("11_6q53c") [node name="Env" type="WorldEnvironment" parent="."] environment = ExtResource("2_pnp7e") camera_attributes = ExtResource("3_jx550") -[node name="Ground" type="StaticBody3D" parent="."] -metadata/_edit_lock_ = true -metadata/_edit_group_ = true - -[node name="CollisionShape" type="CollisionShape3D" parent="Ground"] -shape = SubResource("WorldBoundaryShape3D_tkhh8") - -[node name="MeshInstance" type="MeshInstance3D" parent="Ground"] -mesh = SubResource("PlaneMesh_ta0cd") - -[node name="CanvasLayer" type="CanvasLayer" parent="."] - -[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer"] -anchors_preset = 12 -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_top = -105.0 -grow_horizontal = 2 -grow_vertical = 0 -theme = ExtResource("7_6itw5") -theme_override_constants/separation = 50 -alignment = 1 - -[node name="Panel" type="PanelContainer" parent="CanvasLayer/HBoxContainer"] -layout_mode = 2 - -[node name="Speedometer" type="Label" parent="CanvasLayer/HBoxContainer/Panel"] -custom_minimum_size = Vector2(0, 105) -layout_mode = 2 -size_flags_horizontal = 4 -text = "龍 0km/h" -horizontal_alignment = 1 -vertical_alignment = 1 -script = ExtResource("8_awr5n") - -[node name="Panel2" type="PanelContainer" parent="CanvasLayer/HBoxContainer"] -layout_mode = 2 - -[node name="Timer" type="Label" parent="CanvasLayer/HBoxContainer/Panel2"] -custom_minimum_size = Vector2(0, 105) -layout_mode = 2 -size_flags_horizontal = 4 -text = "祥 0:00:00" -horizontal_alignment = 1 -vertical_alignment = 1 -script = ExtResource("9_dn61b") - -[node name="MiniMap" type="Line2D" parent="CanvasLayer" node_paths=PackedStringArray("track")] -texture_repeat = 2 -width = 40.0 -default_color = Color(0.854902, 0.854902, 0.854902, 1) -gradient = SubResource("Gradient_2kvil") -texture = ExtResource("14_n0r0n") -texture_mode = 1 -antialiased = true -script = ExtResource("10_58kgt") -track = NodePath("../../Track") -player_color = Color(1, 0.388235, 0.321569, 1) -finish_indicator = ExtResource("16_rp311") -player_indicator = ExtResource("17_ptq57") -ghost_indicator = ExtResource("18_v7a53") - -[node name="Splits" parent="CanvasLayer" instance=ExtResource("14_ge1w6")] -visible = false - -[node name="Laps" type="PanelContainer" parent="CanvasLayer" node_paths=PackedStringArray("track", "label")] -anchors_preset = 2 -anchor_top = 1.0 -anchor_bottom = 1.0 -offset_left = 10.0 -offset_top = -80.0 -offset_right = 105.0 -grow_vertical = 0 -theme = ExtResource("7_6itw5") -script = ExtResource("16_mxur4") -track = NodePath("../../Track") -label = NodePath("Label") - -[node name="Label" type="Label" parent="CanvasLayer/Laps"] -layout_mode = 2 -size_flags_horizontal = 4 -theme_override_font_sizes/font_size = 50 -text = " 1/3" -horizontal_alignment = 1 -vertical_alignment = 1 - -[node name="IntroCamera" type="Camera3D" parent="." node_paths=PackedStringArray("main_cam", "track", "count_player")] -transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0) -current = true -far = 500.0 -script = ExtResource("14_yajvg") -main_cam = NodePath("../Camera") -track = NodePath("../Track") -count_player = NodePath("../CountPlayer") - -[node name="Counter" type="RichTextLabel" parent="."] -custom_minimum_size = Vector2(1400, 0) -anchors_preset = 8 -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -offset_left = -20.0 -offset_top = -20.0 -offset_right = 20.0 -offset_bottom = 20.0 -grow_horizontal = 2 -grow_vertical = 2 -theme_override_colors/default_color = Color(0.980392, 0.737255, 0, 1) -theme_override_colors/font_outline_color = Color(0, 0, 0, 1) -theme_override_constants/outline_size = 50 -theme_override_font_sizes/bold_font_size = 800 -bbcode_enabled = true -text = " -" -fit_content = true - -[node name="CountPlayer" type="AnimationPlayer" parent="."] -libraries = { -"": SubResource("AnimationLibrary_hplnw") -} - -[connection signal="created_car" from="." to="Camera" method="_on_race_created_car"] -[connection signal="created_car" from="." to="CanvasLayer/HBoxContainer/Panel/Speedometer" method="_on_race_created_car"] -[connection signal="created_car" from="." to="CanvasLayer/MiniMap" method="_on_race_created_car"] -[connection signal="created_car" from="." to="IntroCamera" method="_on_race_created_car"] -[connection signal="created_ghost" from="." to="CanvasLayer/MiniMap" method="_on_race_created_ghost"] -[connection signal="next_lap" from="." to="CanvasLayer/Laps" method="increment"] -[connection signal="race_started" from="IntroCamera" to="." method="_on_intro_camera_race_started"] +[node name="Ground" parent="." instance=ExtResource("10_p60d8")] |