add travel time
This commit is contained in:
@@ -85,9 +85,9 @@ label_settings = SubResource("LabelSettings_tefeu")
|
||||
[node name="camera_label" type="Label" parent="HUD"]
|
||||
layout_mode = 0
|
||||
offset_left = 20.0
|
||||
offset_top = 93.0
|
||||
offset_top = 149.0
|
||||
offset_right = 1280.0
|
||||
offset_bottom = 116.0
|
||||
offset_bottom = 172.0
|
||||
size_flags_vertical = 0
|
||||
text = "Camera: "
|
||||
label_settings = SubResource("LabelSettings_tefeu")
|
||||
@@ -95,14 +95,15 @@ label_settings = SubResource("LabelSettings_tefeu")
|
||||
[node name="controls_label" type="Label" parent="HUD"]
|
||||
layout_mode = 0
|
||||
offset_left = 20.0
|
||||
offset_top = 145.0
|
||||
offset_top = 170.0
|
||||
offset_right = 1280.0
|
||||
offset_bottom = 272.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")
|
||||
|
||||
@@ -116,29 +117,35 @@ size_flags_vertical = 0
|
||||
text = "Distanza totale: 0"
|
||||
label_settings = SubResource("LabelSettings_tbgi4")
|
||||
|
||||
[node name="newtrain_button" type="Button" parent="HUD"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 594.0
|
||||
offset_top = 640.0
|
||||
offset_right = 700.0
|
||||
offset_bottom = 671.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
text = "Nuovo treno"
|
||||
|
||||
[node name="audio_button" type="Button" parent="HUD"]
|
||||
layout_mode = 0
|
||||
offset_left = 4.0
|
||||
offset_top = 701.0
|
||||
offset_right = 179.0
|
||||
offset_bottom = 877.0
|
||||
scale = Vector2(0.1, 0.1)
|
||||
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")
|
||||
@@ -152,11 +159,14 @@ shadow_bias = 0.04
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_tipki")
|
||||
|
||||
[node name="GameState" parent="." groups=["state"] instance=ExtResource("7_o6xl0")]
|
||||
[node name="GameState" parent="." groups=["save_data"] instance=ExtResource("7_o6xl0")]
|
||||
|
||||
[node name="AutoSaveTimer" type="Timer" parent="."]
|
||||
wait_time = 10.0
|
||||
|
||||
[connection signal="pressed" from="HUD/newtrain_button" to="Train" method="_on_button_pressed"]
|
||||
[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"]
|
||||
|
||||
@@ -11,6 +11,7 @@ script/source = "extends Node
|
||||
@export var icon_inactive: Texture2D
|
||||
var isPlaying = true
|
||||
|
||||
|
||||
func play_track():
|
||||
player.play()
|
||||
isPlaying = true
|
||||
|
||||
Reference in New Issue
Block a user