Files
Trinittu/scenes/main.tscn
2026-01-22 12:09:46 +01:00

173 lines
5.4 KiB
Plaintext

[gd_scene load_steps=15 format=3 uid="uid://c8k7h4fvtqxqm"]
[ext_resource type="Script" uid="uid://dfyo0h5yj3us8" path="res://scripts/main.gd" id="1_main"]
[ext_resource type="Script" uid="uid://bymoo78gun6a4" path="res://scripts/track_generator.gd" id="2_track"]
[ext_resource type="Script" uid="uid://cvn333pymsowx" path="res://scripts/train.gd" id="3_train"]
[ext_resource type="Script" uid="uid://cgy51h6a5syer" path="res://scripts/train_camera.gd" id="4_camera"]
[ext_resource type="PackedScene" uid="uid://cer3o7xlhju7v" path="res://scenes/train.tscn" id="5_tbgi4"]
[ext_resource type="PackedScene" uid="uid://qrf08uiuhyqg" path="res://scenes/musicmanager.tscn" id="6_tefeu"]
[ext_resource type="Texture2D" uid="uid://bi2atrvjj23tk" path="res://resources/audio_on.png" id="6_tipki"]
[ext_resource type="PackedScene" uid="uid://by7iywhy2d8uy" path="res://scenes/gamestate.tscn" id="7_o6xl0"]
[ext_resource type="Texture2D" uid="uid://n6bjl02ikh00" path="res://resources/audio_off.png" id="8_85g3d"]
[sub_resource type="LabelSettings" id="LabelSettings_tbgi4"]
font_color = Color(0, 0, 0, 1)
[sub_resource type="LabelSettings" id="LabelSettings_tefeu"]
font_color = Color(0, 0, 0, 1)
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_tefeu"]
sky_top_color = Color(0.6262097, 0.76737565, 0.9309246, 1)
sky_horizon_color = Color(0.82665706, 0.8808251, 0.95468724, 1)
ground_bottom_color = Color(0.5370987, 0.48452926, 0.42358288, 1)
ground_horizon_color = Color(0.7014107, 0.735357, 0.7014107, 1)
[sub_resource type="Sky" id="Sky_o6xl0"]
sky_material = SubResource("ProceduralSkyMaterial_tefeu")
[sub_resource type="Environment" id="Environment_tipki"]
background_mode = 2
sky = SubResource("Sky_o6xl0")
ambient_light_source = 3
ambient_light_energy = 0.6
tonemap_mode = 3
fog_enabled = true
fog_light_color = Color(0.85430586, 0.8808251, 0.9063318, 1)
fog_density = 0.0015
[node name="Main" type="Node3D"]
script = ExtResource("1_main")
[node name="TrackGenerator" type="Node3D" parent="."]
script = ExtResource("2_track")
track_width = 1.0
sleeper_width = 1.5
segments_behind = 7
[node name="Train" parent="." instance=ExtResource("5_tbgi4")]
script = ExtResource("3_train")
wagon_spacing = 2.65
[node name="TrainCamera" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10, 20)
current = true
fov = 60.0
script = ExtResource("4_camera")
follow_distance = 20.0
follow_height = 8.0
[node name="HUD" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="tripdistance_label" type="Label" parent="HUD"]
layout_mode = 0
offset_left = 20.0
offset_top = 44.0
offset_right = 1280.0
offset_bottom = 67.0
size_flags_vertical = 0
text = "Distanza viaggio: 0"
label_settings = SubResource("LabelSettings_tbgi4")
[node name="speed_label" type="Label" parent="HUD"]
layout_mode = 0
offset_left = 20.0
offset_top = 20.0
offset_right = 1280.0
offset_bottom = 43.0
size_flags_vertical = 0
text = "Velocità: 0"
label_settings = SubResource("LabelSettings_tefeu")
[node name="camera_label" type="Label" parent="HUD"]
layout_mode = 0
offset_left = 20.0
offset_top = 149.0
offset_right = 1280.0
offset_bottom = 172.0
size_flags_vertical = 0
text = "Camera: "
label_settings = SubResource("LabelSettings_tefeu")
[node name="controls_label" type="Label" parent="HUD"]
layout_mode = 0
offset_left = 20.0
offset_top = 170.0
offset_right = 1280.0
offset_bottom = 297.0
size_flags_vertical = 0
text = "Comandi:
\"W / S - Accelera / Rallenta\",
\"A / D - Ruota camera\",
\"SPACE - Cambia camera\",
\"TAB - Cambia treno\",
\"ESC - Esci\""
label_settings = SubResource("LabelSettings_tefeu")
[node name="totaldistance_label" type="Label" parent="HUD"]
layout_mode = 0
offset_left = 20.0
offset_top = 68.0
offset_right = 1280.0
offset_bottom = 91.0
size_flags_vertical = 0
text = "Distanza totale: 0"
label_settings = SubResource("LabelSettings_tbgi4")
[node name="audio_button" type="Button" parent="HUD"]
layout_mode = 0
offset_left = 6.0
offset_top = 678.0
offset_right = 181.0
offset_bottom = 854.0
scale = Vector2(0.2, 0.2)
icon = ExtResource("6_tipki")
flat = true
[node name="triptime_label" type="Label" parent="HUD"]
layout_mode = 0
offset_left = 19.0
offset_top = 94.0
offset_right = 1279.0
offset_bottom = 117.0
size_flags_vertical = 0
text = "Tempo viaggio: 0"
label_settings = SubResource("LabelSettings_tbgi4")
[node name="totaltime_label" type="Label" parent="HUD"]
layout_mode = 0
offset_left = 19.0
offset_top = 117.0
offset_right = 1279.0
offset_bottom = 140.0
size_flags_vertical = 0
text = "Tempo totale: 0"
label_settings = SubResource("LabelSettings_tbgi4")
[node name="MusicManager" parent="." instance=ExtResource("6_tefeu")]
icon_active = ExtResource("6_tipki")
icon_inactive = ExtResource("8_85g3d")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
light_energy = 1.3
shadow_enabled = true
shadow_bias = 0.04
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_tipki")
[node name="GameState" parent="." groups=["save_data"] instance=ExtResource("7_o6xl0")]
[node name="AutoSaveTimer" type="Timer" parent="."]
wait_time = 10.0
[node name="TripTime" type="Timer" parent="."]
autostart = true
[connection signal="pressed" from="HUD/audio_button" to="MusicManager" method="_on_audio_button_pressed"]
[connection signal="timeout" from="AutoSaveTimer" to="." method="_on_timer_timeout"]
[connection signal="timeout" from="TripTime" to="." method="_on_trip_time_timeout"]