add travel time
This commit is contained in:
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
dock_3_selected_tab_idx=0
|
dock_3_selected_tab_idx=0
|
||||||
dock_4_selected_tab_idx=0
|
dock_4_selected_tab_idx=0
|
||||||
dock_5_selected_tab_idx=0
|
dock_5_selected_tab_idx=1
|
||||||
dock_floating={}
|
dock_floating={}
|
||||||
dock_filesystem_h_split_offset=480
|
dock_filesystem_h_split_offset=480
|
||||||
dock_filesystem_v_split_offset=0
|
dock_filesystem_v_split_offset=0
|
||||||
dock_filesystem_display_mode=0
|
dock_filesystem_display_mode=0
|
||||||
dock_filesystem_file_sort=0
|
dock_filesystem_file_sort=0
|
||||||
dock_filesystem_file_list_display_mode=1
|
dock_filesystem_file_list_display_mode=1
|
||||||
dock_filesystem_selected_paths=PackedStringArray("res://resources/audio_on.png")
|
dock_filesystem_selected_paths=PackedStringArray("res://resources/audio_off.png")
|
||||||
dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scenes/", "res://resources/")
|
dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scenes/", "res://resources/")
|
||||||
dock_node_current_tab=0
|
dock_node_current_tab=0
|
||||||
dock_history_include_scene=true
|
dock_history_include_scene=true
|
||||||
@@ -28,7 +28,7 @@ dock_5="Inspector,Node,History"
|
|||||||
|
|
||||||
[EditorNode]
|
[EditorNode]
|
||||||
|
|
||||||
open_scenes=PackedStringArray("res://scenes/main.tscn")
|
open_scenes=PackedStringArray("res://scenes/main.tscn", "res://scenes/gamestate.tscn", "res://scenes/musicmanager.tscn")
|
||||||
current_scene="res://scenes/main.tscn"
|
current_scene="res://scenes/main.tscn"
|
||||||
center_split_offset=-864
|
center_split_offset=-864
|
||||||
selected_default_debugger_tab_idx=0
|
selected_default_debugger_tab_idx=0
|
||||||
@@ -53,7 +53,7 @@ zoom_factor=1.0714285
|
|||||||
|
|
||||||
[GameView]
|
[GameView]
|
||||||
|
|
||||||
floating_window_rect=Rect2i(4156, 1299, 1399, 813)
|
floating_window_rect=Rect2i(508, 56, 8600, 3424)
|
||||||
floating_window_screen=1
|
floating_window_screen=1
|
||||||
|
|
||||||
[ShaderEditor]
|
[ShaderEditor]
|
||||||
|
|||||||
Binary file not shown.
@@ -1,12 +1,12 @@
|
|||||||
63f7b34db8d8cdea90c76aacccf841ec
|
63f7b34db8d8cdea90c76aacccf841ec
|
||||||
::res://::1768994992
|
::res://::1769073897
|
||||||
export_presets.cfg::TextFile::-1::1768659892::0::1::::<><><>0<>0<><>::
|
export_presets.cfg::TextFile::-1::1768659892::0::1::::<><><>0<>0<><>::
|
||||||
::res://build/::1768659995
|
::res://build/::1769067196
|
||||||
::res://resources/::1768814043
|
::res://resources/::1769079583
|
||||||
audio_off.png::CompressedTexture2D::976528084422995703::1768814036::1768814043::1::::<><><>0<>0<>8eb956cbe7f28bcd33a4d0f3f309056a<>res://.godot/imported/audio_off.png-5de4b789ed4209650f8e97f1032a5f0f.ctex::
|
audio_off.png::CompressedTexture2D::976528084422995703::1769079374::1769079589::1::::<><><>0<>0<>8eb956cbe7f28bcd33a4d0f3f309056a<>res://.godot/imported/audio_off.png-5de4b789ed4209650f8e97f1032a5f0f.ctex::
|
||||||
audio_on.png::CompressedTexture2D::3003704488001052360::1768814021::1768814043::1::::<><><>0<>0<>973b72d02e17330456b5163139ac14ea<>res://.godot/imported/audio_on.png-657a96ae18a58fc0378492c2262197f8.ctex::
|
audio_on.png::CompressedTexture2D::3003704488001052360::1769079583::1769079589::1::::<><><>0<>0<>973b72d02e17330456b5163139ac14ea<>res://.godot/imported/audio_on.png-657a96ae18a58fc0378492c2262197f8.ctex::
|
||||||
thomastanks_new.mp3::AudioStreamMP3::2620953876642984028::1768657428::1768657898::1::::<><><>0<>0<>71420e05b9122bd8011b233595a3388e<>res://.godot/imported/thomastanks_new.mp3-faeee3575032f4283c1731a17141e11b.mp3str::
|
thomastanks_new.mp3::AudioStreamMP3::2620953876642984028::1768657428::1768657898::1::::<><><>0<>0<>71420e05b9122bd8011b233595a3388e<>res://.godot/imported/thomastanks_new.mp3-faeee3575032f4283c1731a17141e11b.mp3str::
|
||||||
::res://resources/train kit/::1768551395
|
::res://resources/train kit/::1769067197
|
||||||
railroad-corner-large-ramp.obj::Mesh::2409206090616818222::1727040297::1768551394::1::::<><><>0<>0<>a61f88305257a119568988a927ed078e<>res://.godot/imported/railroad-corner-large-ramp.obj-c7a23496c1b2b1d5a93b93632f472e09.mesh<*>res://.godot/imported/railroad-corner-large-ramp.obj-c7a23496c1b2b1d5a93b93632f472e09.mesh::uid://cdwwcby54pecs::::res://resources/train kit/Textures/colormap.png
|
railroad-corner-large-ramp.obj::Mesh::2409206090616818222::1727040297::1768551394::1::::<><><>0<>0<>a61f88305257a119568988a927ed078e<>res://.godot/imported/railroad-corner-large-ramp.obj-c7a23496c1b2b1d5a93b93632f472e09.mesh<*>res://.godot/imported/railroad-corner-large-ramp.obj-c7a23496c1b2b1d5a93b93632f472e09.mesh::uid://cdwwcby54pecs::::res://resources/train kit/Textures/colormap.png
|
||||||
railroad-corner-large.obj::Mesh::1018263567210823548::1727040297::1768551394::1::::<><><>0<>0<>ba409591917422db5258b9c49d31d67d<>res://.godot/imported/railroad-corner-large.obj-767290257b068e81bba8afabe771bb45.mesh<*>res://.godot/imported/railroad-corner-large.obj-767290257b068e81bba8afabe771bb45.mesh::uid://cdwwcby54pecs::::res://resources/train kit/Textures/colormap.png
|
railroad-corner-large.obj::Mesh::1018263567210823548::1727040297::1768551394::1::::<><><>0<>0<>ba409591917422db5258b9c49d31d67d<>res://.godot/imported/railroad-corner-large.obj-767290257b068e81bba8afabe771bb45.mesh<*>res://.godot/imported/railroad-corner-large.obj-767290257b068e81bba8afabe771bb45.mesh::uid://cdwwcby54pecs::::res://resources/train kit/Textures/colormap.png
|
||||||
railroad-corner-small-ramp.obj::Mesh::4748424812719052670::1727040297::1768551394::1::::<><><>0<>0<>47dfd4cc2518e09b75595da6e912f629<>res://.godot/imported/railroad-corner-small-ramp.obj-30da76b04fe12bfd305857de58c73650.mesh<*>res://.godot/imported/railroad-corner-small-ramp.obj-30da76b04fe12bfd305857de58c73650.mesh::uid://cdwwcby54pecs::::res://resources/train kit/Textures/colormap.png
|
railroad-corner-small-ramp.obj::Mesh::4748424812719052670::1727040297::1768551394::1::::<><><>0<>0<>47dfd4cc2518e09b75595da6e912f629<>res://.godot/imported/railroad-corner-small-ramp.obj-30da76b04fe12bfd305857de58c73650.mesh<*>res://.godot/imported/railroad-corner-small-ramp.obj-30da76b04fe12bfd305857de58c73650.mesh::uid://cdwwcby54pecs::::res://resources/train kit/Textures/colormap.png
|
||||||
@@ -110,17 +110,17 @@ train-locomotive-passenger-b.obj::Mesh::1005507222256758922::1727040295::1768551
|
|||||||
train-tram-classic.obj::Mesh::3684736170611761855::1727040295::1768551393::1::::<><><>0<>0<>d1d075ca4ec51c7c6d88bedade388eb6<>res://.godot/imported/train-tram-classic.obj-5c5f7e3ed997a3c6e1af166558bae205.mesh<*>res://.godot/imported/train-tram-classic.obj-5c5f7e3ed997a3c6e1af166558bae205.mesh::uid://cdwwcby54pecs::::res://resources/train kit/Textures/colormap.png
|
train-tram-classic.obj::Mesh::3684736170611761855::1727040295::1768551393::1::::<><><>0<>0<>d1d075ca4ec51c7c6d88bedade388eb6<>res://.godot/imported/train-tram-classic.obj-5c5f7e3ed997a3c6e1af166558bae205.mesh<*>res://.godot/imported/train-tram-classic.obj-5c5f7e3ed997a3c6e1af166558bae205.mesh::uid://cdwwcby54pecs::::res://resources/train kit/Textures/colormap.png
|
||||||
train-tram-modern.obj::Mesh::7951114505230208222::1727040295::1768551393::1::::<><><>0<>0<>e6e1242a7148f32651a5ee57a18fd513<>res://.godot/imported/train-tram-modern.obj-91e1e88eed04b0393ca1115cb1980e1b.mesh<*>res://.godot/imported/train-tram-modern.obj-91e1e88eed04b0393ca1115cb1980e1b.mesh::uid://cdwwcby54pecs::::res://resources/train kit/Textures/colormap.png
|
train-tram-modern.obj::Mesh::7951114505230208222::1727040295::1768551393::1::::<><><>0<>0<>e6e1242a7148f32651a5ee57a18fd513<>res://.godot/imported/train-tram-modern.obj-91e1e88eed04b0393ca1115cb1980e1b.mesh<*>res://.godot/imported/train-tram-modern.obj-91e1e88eed04b0393ca1115cb1980e1b.mesh::uid://cdwwcby54pecs::::res://resources/train kit/Textures/colormap.png
|
||||||
train-tram-round.obj::Mesh::115250456338501034::1727040295::1768551393::1::::<><><>0<>0<>5e3772ddb59635a364b94e1db000bd4a<>res://.godot/imported/train-tram-round.obj-1b613e087f922f3f788c8bf27b8a5616.mesh<*>res://.godot/imported/train-tram-round.obj-1b613e087f922f3f788c8bf27b8a5616.mesh::uid://cdwwcby54pecs::::res://resources/train kit/Textures/colormap.png
|
train-tram-round.obj::Mesh::115250456338501034::1727040295::1768551393::1::::<><><>0<>0<>5e3772ddb59635a364b94e1db000bd4a<>res://.godot/imported/train-tram-round.obj-1b613e087f922f3f788c8bf27b8a5616.mesh<*>res://.godot/imported/train-tram-round.obj-1b613e087f922f3f788c8bf27b8a5616.mesh::uid://cdwwcby54pecs::::res://resources/train kit/Textures/colormap.png
|
||||||
::res://resources/train kit/Textures/::1768551396
|
::res://resources/train kit/Textures/::1769067197
|
||||||
colormap.png::CompressedTexture2D::5030163645319353198::1727040840::1768551396::1::::<><><>0<>0<>49486029a612050ab47ae771aec92b8c<>res://.godot/imported/colormap.png-d3d02b00fd834f010bf45b2b9259ea63.s3tc.ctex::
|
colormap.png::CompressedTexture2D::5030163645319353198::1727040840::1768551396::1::::<><><>0<>0<>49486029a612050ab47ae771aec92b8c<>res://.godot/imported/colormap.png-d3d02b00fd834f010bf45b2b9259ea63.s3tc.ctex::
|
||||||
::res://scenes/::1768930393
|
::res://scenes/::1769079144
|
||||||
gamestate.tscn::PackedScene::4137542781585662412::1768815074::0::1::::<><><>0<>0<><>::uid://s80bt8i6u2hv::::res://scripts/gamestate.gd
|
gamestate.tscn::PackedScene::4137542781585662412::1769074093::0::1::::<><><>0<>0<><>::uid://s80bt8i6u2hv::::res://scripts/gamestate.gd
|
||||||
main.tscn::PackedScene::7111673961189096216::1768930393::0::1::::<><><>0<>0<><>::uid://dfyo0h5yj3us8::::res://scripts/main.gd<>uid://bymoo78gun6a4::::res://scripts/track_generator.gd<>uid://cvn333pymsowx::::res://scripts/train.gd<>uid://cgy51h6a5syer::::res://scripts/train_camera.gd<>uid://cer3o7xlhju7v::::res://scenes/train.tscn<>uid://qrf08uiuhyqg::::res://scenes/musicmanager.tscn<>uid://bi2atrvjj23tk::::res://resources/audio_on.png<>uid://by7iywhy2d8uy::::res://scenes/gamestate.tscn<>uid://n6bjl02ikh00::::res://resources/audio_off.png
|
main.tscn::PackedScene::7111673961189096216::1769079144::0::1::::<><><>0<>0<><>::uid://dfyo0h5yj3us8::::res://scripts/main.gd<>uid://bymoo78gun6a4::::res://scripts/track_generator.gd<>uid://cvn333pymsowx::::res://scripts/train.gd<>uid://cgy51h6a5syer::::res://scripts/train_camera.gd<>uid://cer3o7xlhju7v::::res://scenes/train.tscn<>uid://qrf08uiuhyqg::::res://scenes/musicmanager.tscn<>uid://bi2atrvjj23tk::::res://resources/audio_on.png<>uid://by7iywhy2d8uy::::res://scenes/gamestate.tscn<>uid://n6bjl02ikh00::::res://resources/audio_off.png
|
||||||
musicmanager.tscn::PackedScene::1158465914396145662::1768815835::0::1::::<><><>0<>0<><>::uid://bdluyy5uodjb5::::res://resources/thomastanks_new.mp3
|
musicmanager.tscn::PackedScene::1158465914396145662::1768815835::0::1::::<><><>0<>0<><>::uid://bdluyy5uodjb5::::res://resources/thomastanks_new.mp3
|
||||||
train.tscn::PackedScene::5090417957456705533::1768656983::0::1::::<><><>0<>0<><>::
|
train.tscn::PackedScene::5090417957456705533::1768656983::0::1::::<><><>0<>0<><>::
|
||||||
::res://scripts/::1768930355
|
::res://scripts/::1769079144
|
||||||
gamestate.gd::GDScript::1333044411309547839::1768893877::0::1::::GameState<>Node<><>0<>0<><>::
|
gamestate.gd::GDScript::1333044411309547839::1769079115::0::1::::<>Node<><>0<>0<><>::
|
||||||
main.gd::GDScript::7560646433224437573::1768930355::0::1::::<>Node3D<><>0<>0<><>::
|
main.gd::GDScript::7560646433224437573::1769079144::0::1::::<>Node3D<><>0<>0<><>::
|
||||||
objloader.gd::GDScript::2596173299165953535::1768586602::0::1::::OBJLoader<>RefCounted<><>0<>0<><>::
|
objloader.gd::GDScript::2596173299165953535::1768586602::0::1::::OBJLoader<>RefCounted<><>0<>0<><>::
|
||||||
track_generator.gd::GDScript::4096602235093631041::1768587411::0::1::::TrackGenerator<>Node3D<><>0<>0<><>::
|
track_generator.gd::GDScript::4096602235093631041::1768587411::0::1::::TrackGenerator<>Node3D<><>0<>0<><>::
|
||||||
train.gd::GDScript::6275395567547538251::1768659862::0::1::::Train<>Node3D<><>0<>0<><>::
|
train.gd::GDScript::6275395567547538251::1769077662::0::1::::Train<>Node3D<><>0<>0<><>::
|
||||||
train_camera.gd::GDScript::5245387851329565609::1768586722::0::1::::TrainCamera<>Camera3D<><>0<>0<><>::
|
train_camera.gd::GDScript::5245387851329565609::1768586722::0::1::::TrainCamera<>Camera3D<><>0<>0<><>::
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
res://scripts/main.gd
|
|
||||||
res://scenes/main.tscn
|
res://scenes/main.tscn
|
||||||
res://scripts/gamestate.gd
|
res://scripts/gamestate.gd
|
||||||
|
res://scripts/main.gd
|
||||||
|
res://scenes/gamestate.tscn
|
||||||
|
res://scripts/train.gd
|
||||||
|
res://scenes/musicmanager.tscn
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[folding]
|
||||||
|
|
||||||
|
sections_unfolded=PackedStringArray()
|
||||||
@@ -8,7 +8,7 @@ Anim={
|
|||||||
"grid_snap_active": false,
|
"grid_snap_active": false,
|
||||||
"grid_step": Vector2(8, 8),
|
"grid_step": Vector2(8, 8),
|
||||||
"grid_visibility": 1,
|
"grid_visibility": 1,
|
||||||
"ofs": Vector2(-1149.5973, 303.8107),
|
"ofs": Vector2(-929.1912, -15.849335),
|
||||||
"primary_grid_step": Vector2i(8, 8),
|
"primary_grid_step": Vector2i(8, 8),
|
||||||
"show_group_gizmos": true,
|
"show_group_gizmos": true,
|
||||||
"show_guides": true,
|
"show_guides": true,
|
||||||
@@ -34,7 +34,7 @@ Anim={
|
|||||||
"snap_rotation_step": 0.2617994,
|
"snap_rotation_step": 0.2617994,
|
||||||
"snap_scale": false,
|
"snap_scale": false,
|
||||||
"snap_scale_step": 0.1,
|
"snap_scale_step": 0.1,
|
||||||
"zoom": 1.6105102
|
"zoom": 1.3310001
|
||||||
}
|
}
|
||||||
3D={
|
3D={
|
||||||
"fov": 70.01,
|
"fov": 70.01,
|
||||||
@@ -187,4 +187,4 @@ Anim={
|
|||||||
"zfar": 4000.01,
|
"zfar": 4000.01,
|
||||||
"znear": 0.05
|
"znear": 0.05
|
||||||
}
|
}
|
||||||
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@20438/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@62/@VBoxContainer@63/@EditorMainScreen@103/MainScreen/@CanvasItemEditor@10871/@VSplitContainer@10516/@HSplitContainer@10518/@HSplitContainer@10520/@Control@10521/@SubViewportContainer@10522/@SubViewport@10523/Main/GameState")])
|
selected_nodes=Array[NodePath]([])
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[folding]
|
[folding]
|
||||||
|
|
||||||
node_unfolds=[NodePath("."), PackedStringArray("Visibility", "Transform"), NodePath("TrackGenerator"), PackedStringArray("Visibility"), NodePath("Train"), PackedStringArray("Transform", "Train"), NodePath("TrainCamera"), PackedStringArray("Transform"), NodePath("HUD/tripdistance_label"), PackedStringArray("Layout", "Layout/Transform", "label_settings"), NodePath("HUD/speed_label"), PackedStringArray("label_settings", "Layout", "Layout/Transform"), NodePath("HUD/camera_label"), PackedStringArray("Layout", "Layout/Transform", "label_settings"), NodePath("HUD/controls_label"), PackedStringArray("Layout", "Layout/Transform"), NodePath("HUD/totaldistance_label"), PackedStringArray("Layout", "Layout/Transform"), NodePath("HUD/newtrain_button"), PackedStringArray("Layout", "Layout/Transform"), NodePath("HUD/audio_button"), PackedStringArray("Layout", "Layout/Transform"), NodePath("DirectionalLight3D"), PackedStringArray("Directional Shadow", "Light", "Shadow"), NodePath("WorldEnvironment"), PackedStringArray("environment")]
|
node_unfolds=[NodePath("."), PackedStringArray("Visibility", "Transform"), NodePath("TrackGenerator"), PackedStringArray("Visibility"), NodePath("Train"), PackedStringArray("Transform", "Train"), NodePath("TrainCamera"), PackedStringArray("Transform"), NodePath("HUD/tripdistance_label"), PackedStringArray("Layout", "Layout/Transform", "label_settings"), NodePath("HUD/speed_label"), PackedStringArray("label_settings", "Layout", "Layout/Transform"), NodePath("HUD/camera_label"), PackedStringArray("Layout", "Layout/Transform", "label_settings"), NodePath("HUD/controls_label"), PackedStringArray("Layout", "Layout/Transform"), NodePath("HUD/totaldistance_label"), PackedStringArray("Layout", "Layout/Transform"), NodePath("HUD/audio_button"), PackedStringArray("Layout", "Layout/Transform"), NodePath("DirectionalLight3D"), PackedStringArray("Directional Shadow", "Light", "Shadow"), NodePath("WorldEnvironment"), PackedStringArray("environment")]
|
||||||
resource_unfolds=["res://scenes/main.tscn::LabelSettings_tbgi4", PackedStringArray("Font"), "res://scenes/main.tscn::LabelSettings_tefeu", PackedStringArray("Font"), "res://scenes/musicmanager.tscn::GDScript_ht1d5", PackedStringArray(), "res://scenes/main.tscn::Environment_tipki", PackedStringArray("Background", "Sky", "Fog", "Ambient Light", "Tonemap", "sky")]
|
resource_unfolds=["res://scenes/main.tscn::LabelSettings_tbgi4", PackedStringArray("Font"), "res://scenes/main.tscn::LabelSettings_tefeu", PackedStringArray("Font"), "res://scenes/musicmanager.tscn::GDScript_ht1d5", PackedStringArray(), "res://scenes/main.tscn::Environment_tipki", PackedStringArray("Background", "Sky", "Fog", "Ambient Light", "Tonemap", "sky")]
|
||||||
nodes_folded=[]
|
nodes_folded=[NodePath("HUD")]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[game_view]
|
[game_view]
|
||||||
|
|
||||||
select_mode=0
|
select_mode=0
|
||||||
embed_size_mode=2
|
embed_size_mode=0
|
||||||
|
|
||||||
[editor_metadata]
|
[editor_metadata]
|
||||||
|
|
||||||
@@ -10,13 +10,13 @@ use_advanced_connections=false
|
|||||||
|
|
||||||
[recent_files]
|
[recent_files]
|
||||||
|
|
||||||
scenes=["res://scenes/gamestate.tscn", "res://scenes/musicmanager.tscn", "res://scenes/main.tscn", "res://scenes/game_state.tscn", "res://scenes/train.tscn", "res://scenes/wagon.tscn"]
|
scenes=["res://scenes/musicmanager.tscn", "res://scenes/gamestate.tscn", "res://scenes/main.tscn", "res://scenes/game_state.tscn", "res://scenes/train.tscn", "res://scenes/wagon.tscn"]
|
||||||
scripts=["res://scenes/musicmanager.tscn::GDScript_ht1d5", "res://Scripts/game_state.gd", "res://scripts/gamestate.gd", "res://scripts/musicmanager.gd", "res://scripts/common.gd", "res://scripts/train_camera.gd", "res://scripts/train.gd", "res://scripts/main.gd", "res://scripts/track_generator.gd"]
|
scripts=["Texture2D", "res://scenes/musicmanager.tscn::GDScript_ht1d5", "res://scenes/gamemanager.gd", "res://Scripts/game_state.gd", "res://scripts/gamestate.gd", "res://scripts/musicmanager.gd", "res://scripts/common.gd", "res://scripts/train_camera.gd", "res://scripts/train.gd", "res://scripts/main.gd"]
|
||||||
|
|
||||||
[dialog_bounds]
|
[dialog_bounds]
|
||||||
|
|
||||||
create_new_node=Rect2(1146, 771, 1800, 1400)
|
create_new_node=Rect2(1146, 771, 1800, 1400)
|
||||||
project_settings=Rect2(889, 416, 2400, 1400)
|
project_settings=Rect2(2865, 809, 2400, 1400)
|
||||||
export=Rect2(1020, 700, 1800, 1000)
|
export=Rect2(1020, 700, 1800, 1000)
|
||||||
|
|
||||||
[script_setup]
|
[script_setup]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
res://resources
|
|
||||||
res://scenes
|
res://scenes
|
||||||
|
res://scripts
|
||||||
|
res://resources
|
||||||
C:/Users/FlavioFabbrizi/Downloads/godot_train_project/build
|
C:/Users/FlavioFabbrizi/Downloads/godot_train_project/build
|
||||||
C:/Users/FlavioFabbrizi/Downloads/godot_train_project
|
C:/Users/FlavioFabbrizi/Downloads/godot_train_project
|
||||||
res://scripts
|
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ state={
|
|||||||
state={
|
state={
|
||||||
"bookmarks": PackedInt32Array(),
|
"bookmarks": PackedInt32Array(),
|
||||||
"breakpoints": PackedInt32Array(),
|
"breakpoints": PackedInt32Array(),
|
||||||
"column": 1,
|
"column": 88,
|
||||||
"folded_lines": Array[int]([]),
|
"folded_lines": Array[int]([]),
|
||||||
"h_scroll_position": 0,
|
"h_scroll_position": 0,
|
||||||
"row": 21,
|
"row": 117,
|
||||||
"scroll_position": 0.0,
|
"scroll_position": 83.0,
|
||||||
"selection": false,
|
"selection": false,
|
||||||
"syntax_highlighter": "GDScript"
|
"syntax_highlighter": "GDScript"
|
||||||
}
|
}
|
||||||
@@ -34,8 +34,8 @@ state={
|
|||||||
"column": 0,
|
"column": 0,
|
||||||
"folded_lines": Array[int]([]),
|
"folded_lines": Array[int]([]),
|
||||||
"h_scroll_position": 0,
|
"h_scroll_position": 0,
|
||||||
"row": 49,
|
"row": 53,
|
||||||
"scroll_position": 0.0,
|
"scroll_position": 21.0,
|
||||||
"selection": false,
|
"selection": false,
|
||||||
"syntax_highlighter": "GDScript"
|
"syntax_highlighter": "GDScript"
|
||||||
}
|
}
|
||||||
@@ -49,7 +49,7 @@ state={
|
|||||||
"folded_lines": Array[int]([]),
|
"folded_lines": Array[int]([]),
|
||||||
"h_scroll_position": 0,
|
"h_scroll_position": 0,
|
||||||
"row": 100,
|
"row": 100,
|
||||||
"scroll_position": 49.0,
|
"scroll_position": 0.0,
|
||||||
"selection": false,
|
"selection": false,
|
||||||
"syntax_highlighter": "GDScript"
|
"syntax_highlighter": "GDScript"
|
||||||
}
|
}
|
||||||
@@ -77,10 +77,10 @@ state={
|
|||||||
state={
|
state={
|
||||||
"bookmarks": PackedInt32Array(),
|
"bookmarks": PackedInt32Array(),
|
||||||
"breakpoints": PackedInt32Array(),
|
"breakpoints": PackedInt32Array(),
|
||||||
"column": 26,
|
"column": 0,
|
||||||
"folded_lines": Array[int]([]),
|
"folded_lines": Array[int]([]),
|
||||||
"h_scroll_position": 0,
|
"h_scroll_position": 0,
|
||||||
"row": 24,
|
"row": 12,
|
||||||
"scroll_position": 0.0,
|
"scroll_position": 0.0,
|
||||||
"selection": false,
|
"selection": false,
|
||||||
"syntax_highlighter": "GDScript"
|
"syntax_highlighter": "GDScript"
|
||||||
|
|||||||
@@ -1,12 +1,4 @@
|
|||||||
list=[{
|
list=[{
|
||||||
"base": &"Node",
|
|
||||||
"class": &"GameState",
|
|
||||||
"icon": "",
|
|
||||||
"is_abstract": false,
|
|
||||||
"is_tool": false,
|
|
||||||
"language": &"GDScript",
|
|
||||||
"path": "res://scripts/gamestate.gd"
|
|
||||||
}, {
|
|
||||||
"base": &"RefCounted",
|
"base": &"RefCounted",
|
||||||
"class": &"OBJLoader",
|
"class": &"OBJLoader",
|
||||||
"icon": "",
|
"icon": "",
|
||||||
|
|||||||
Binary file not shown.
@@ -1,3 +1,3 @@
|
|||||||
source_md5="a14a08c48ef68a4afe2f75477955423e"
|
source_md5="f2a5a1f783dc0e6a910ee32b91a94921"
|
||||||
dest_md5="f06c7e7cf6f2019d54db26eea986ce71"
|
dest_md5="993e18380290b3898325c1c9341d99a3"
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1,3 +1,3 @@
|
|||||||
source_md5="86413e68b659658d22adbd8952e64884"
|
source_md5="fa9dcf4ce66b77000b02fafce4513ac0"
|
||||||
dest_md5="be9ec99dd489a2d6d94ae1f7813f0107"
|
dest_md5="92988f039aec241d22c7300bac6acc82"
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
[res://scenes/main.tscn]
|
[res://scenes/main.tscn]
|
||||||
|
|
||||||
groups=[&"state"]
|
groups=[&"save_data"]
|
||||||
|
|||||||
Binary file not shown.
@@ -26,7 +26,7 @@ window/stretch/mode="canvas_items"
|
|||||||
|
|
||||||
[global_group]
|
[global_group]
|
||||||
|
|
||||||
state=""
|
save_data=""
|
||||||
|
|
||||||
[input]
|
[input]
|
||||||
|
|
||||||
@@ -50,6 +50,11 @@ speed_down={
|
|||||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
change_train={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194306,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 16 KiB |
@@ -85,9 +85,9 @@ label_settings = SubResource("LabelSettings_tefeu")
|
|||||||
[node name="camera_label" type="Label" parent="HUD"]
|
[node name="camera_label" type="Label" parent="HUD"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 20.0
|
offset_left = 20.0
|
||||||
offset_top = 93.0
|
offset_top = 149.0
|
||||||
offset_right = 1280.0
|
offset_right = 1280.0
|
||||||
offset_bottom = 116.0
|
offset_bottom = 172.0
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
text = "Camera: "
|
text = "Camera: "
|
||||||
label_settings = SubResource("LabelSettings_tefeu")
|
label_settings = SubResource("LabelSettings_tefeu")
|
||||||
@@ -95,14 +95,15 @@ label_settings = SubResource("LabelSettings_tefeu")
|
|||||||
[node name="controls_label" type="Label" parent="HUD"]
|
[node name="controls_label" type="Label" parent="HUD"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 20.0
|
offset_left = 20.0
|
||||||
offset_top = 145.0
|
offset_top = 170.0
|
||||||
offset_right = 1280.0
|
offset_right = 1280.0
|
||||||
offset_bottom = 272.0
|
offset_bottom = 297.0
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
text = "Comandi:
|
text = "Comandi:
|
||||||
\"W / S - Accelera / Rallenta\",
|
\"W / S - Accelera / Rallenta\",
|
||||||
\"A / D - Ruota camera\",
|
\"A / D - Ruota camera\",
|
||||||
\"SPACE - Cambia camera\",
|
\"SPACE - Cambia camera\",
|
||||||
|
\"TAB - Cambia treno\",
|
||||||
\"ESC - Esci\""
|
\"ESC - Esci\""
|
||||||
label_settings = SubResource("LabelSettings_tefeu")
|
label_settings = SubResource("LabelSettings_tefeu")
|
||||||
|
|
||||||
@@ -116,29 +117,35 @@ size_flags_vertical = 0
|
|||||||
text = "Distanza totale: 0"
|
text = "Distanza totale: 0"
|
||||||
label_settings = SubResource("LabelSettings_tbgi4")
|
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"]
|
[node name="audio_button" type="Button" parent="HUD"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 4.0
|
offset_left = 6.0
|
||||||
offset_top = 701.0
|
offset_top = 678.0
|
||||||
offset_right = 179.0
|
offset_right = 181.0
|
||||||
offset_bottom = 877.0
|
offset_bottom = 854.0
|
||||||
scale = Vector2(0.1, 0.1)
|
scale = Vector2(0.2, 0.2)
|
||||||
icon = ExtResource("6_tipki")
|
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")]
|
[node name="MusicManager" parent="." instance=ExtResource("6_tefeu")]
|
||||||
icon_active = ExtResource("6_tipki")
|
icon_active = ExtResource("6_tipki")
|
||||||
@@ -152,11 +159,14 @@ shadow_bias = 0.04
|
|||||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||||
environment = SubResource("Environment_tipki")
|
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="."]
|
[node name="AutoSaveTimer" type="Timer" parent="."]
|
||||||
wait_time = 10.0
|
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="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="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
|
@export var icon_inactive: Texture2D
|
||||||
var isPlaying = true
|
var isPlaying = true
|
||||||
|
|
||||||
|
|
||||||
func play_track():
|
func play_track():
|
||||||
player.play()
|
player.play()
|
||||||
isPlaying = true
|
isPlaying = true
|
||||||
|
|||||||
@@ -1,30 +1,24 @@
|
|||||||
extends Node
|
extends Node
|
||||||
class_name GameState
|
|
||||||
|
|
||||||
var total_distance : float = 0.0
|
var total_distance : float = 0.0
|
||||||
var initial_total_distance: float = 0.0
|
var total_time : int = 0
|
||||||
|
var initial_distance: float = 0.0
|
||||||
|
var initial_time: int = 0
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
add_to_group("state")
|
add_to_group("save_data")
|
||||||
|
|
||||||
|
|
||||||
func getTotalDistance() -> float:
|
func SetInitialValue(distance :float, time: int):
|
||||||
return total_distance + initial_total_distance
|
initial_distance = distance
|
||||||
|
initial_time = time
|
||||||
|
|
||||||
func AddToTotalDistance(value :float):
|
|
||||||
total_distance =+ value
|
|
||||||
|
|
||||||
|
|
||||||
func SetInitialValue(value :float):
|
|
||||||
initial_total_distance = value
|
|
||||||
total_distance = value
|
|
||||||
|
|
||||||
|
|
||||||
func save() -> Dictionary:
|
func save() -> Dictionary:
|
||||||
return {
|
return {
|
||||||
"filename": get_scene_file_path(),
|
"filename": get_scene_file_path(),
|
||||||
"parent": get_parent().get_path(),
|
"parent": get_parent().get_path(),
|
||||||
"total_distance": getTotalDistance()
|
"total_distance": initial_distance + total_distance,
|
||||||
|
"total_time": initial_time + total_time
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,17 +8,23 @@ extends Node3D
|
|||||||
@onready var camera_label : Label = $HUD/camera_label
|
@onready var camera_label : Label = $HUD/camera_label
|
||||||
@onready var distance_label : Label = $HUD/tripdistance_label
|
@onready var distance_label : Label = $HUD/tripdistance_label
|
||||||
@onready var total_distance_label : Label = $HUD/totaldistance_label
|
@onready var total_distance_label : Label = $HUD/totaldistance_label
|
||||||
|
@onready var time_label : Label = $HUD/triptime_label
|
||||||
|
@onready var totaltime_label : Label = $HUD/totaltime_label
|
||||||
@onready var auto_save_timer = $AutoSaveTimer
|
@onready var auto_save_timer = $AutoSaveTimer
|
||||||
|
@onready var trip_timer = $TripTime
|
||||||
|
|
||||||
var savegame_path: String = "user://savegame.save"
|
var savegame_path: String = "user://savegame.save"
|
||||||
|
var total_time_in_secs : int = 0
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|
||||||
# caricamento stato gioco
|
# caricamento stato gioco
|
||||||
##load_game()
|
load_game()
|
||||||
|
|
||||||
# avvia autosaver
|
# avvia autosaver
|
||||||
auto_save_timer.start()
|
auto_save_timer.start()
|
||||||
|
# time
|
||||||
|
trip_timer.start()
|
||||||
|
|
||||||
train.track_generator = track_generator
|
train.track_generator = track_generator
|
||||||
camera.train = train
|
camera.train = train
|
||||||
@@ -55,11 +61,25 @@ func _update_ui() -> void:
|
|||||||
var km = train.distance_traveled / 1000.0
|
var km = train.distance_traveled / 1000.0
|
||||||
distance_label.text = "Distanza viaggio: %.2f km" % km
|
distance_label.text = "Distanza viaggio: %.2f km" % km
|
||||||
|
|
||||||
if total_distance_label and train and Gamestate:
|
if total_distance_label and train:
|
||||||
Gamestate.AddToTotalDistance(train.distance_traveled)
|
Gamestate.total_distance = train.distance_traveled
|
||||||
var km = (Gamestate.getTotalDistance() / 1000)
|
var km = (Gamestate.total_distance + Gamestate.initial_distance) / 1000
|
||||||
total_distance_label.text = "Distanza totale: %.2f km" % km
|
total_distance_label.text = "Distanza totale: %.2f km" % km
|
||||||
|
|
||||||
|
if time_label and train:
|
||||||
|
var h = int(total_time_in_secs / 3600.0)
|
||||||
|
var m = int(total_time_in_secs / 60.0)
|
||||||
|
var s = total_time_in_secs - m * 60
|
||||||
|
time_label.text = "Tempo viaggio: %02d:%02d:%02d" % [h, m, s]
|
||||||
|
|
||||||
|
if totaltime_label and train:
|
||||||
|
Gamestate.total_time = total_time_in_secs
|
||||||
|
var tot = Gamestate.total_time + Gamestate.initial_time
|
||||||
|
var h = int(tot / 3600.0)
|
||||||
|
var m = int(tot / 60.0)
|
||||||
|
var s = tot - m * 60
|
||||||
|
totaltime_label.text = "Tempo totale: %02d:%02d:%02d" % [h, m, s]
|
||||||
|
|
||||||
if camera_label and camera:
|
if camera_label and camera:
|
||||||
camera_label.text = "Camera: %s" % camera.get_mode_name()
|
camera_label.text = "Camera: %s" % camera.get_mode_name()
|
||||||
|
|
||||||
@@ -74,7 +94,7 @@ func _update_ground() -> void:
|
|||||||
|
|
||||||
func save_game():
|
func save_game():
|
||||||
var save_file = FileAccess.open(savegame_path, FileAccess.WRITE)
|
var save_file = FileAccess.open(savegame_path, FileAccess.WRITE)
|
||||||
var save_nodes = get_tree().get_nodes_in_group("state")
|
var save_nodes = get_tree().get_nodes_in_group("save_data")
|
||||||
|
|
||||||
for node in save_nodes:
|
for node in save_nodes:
|
||||||
if !node.has_method("save"):
|
if !node.has_method("save"):
|
||||||
@@ -87,10 +107,6 @@ func load_game():
|
|||||||
if not FileAccess.file_exists(savegame_path):
|
if not FileAccess.file_exists(savegame_path):
|
||||||
return # nessun salvataggio trovato
|
return # nessun salvataggio trovato
|
||||||
|
|
||||||
var existing_nodes = get_tree().get_nodes_in_group("state")
|
|
||||||
for node in existing_nodes:
|
|
||||||
node.queue_free()
|
|
||||||
|
|
||||||
var save_file = FileAccess.open(savegame_path, FileAccess.READ)
|
var save_file = FileAccess.open(savegame_path, FileAccess.READ)
|
||||||
while save_file.get_position() < save_file.get_length():
|
while save_file.get_position() < save_file.get_length():
|
||||||
var json_string = save_file.get_line()
|
var json_string = save_file.get_line()
|
||||||
@@ -99,23 +115,14 @@ func load_game():
|
|||||||
if node_data == null:
|
if node_data == null:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Ricrea il nodo dalla scena salvata
|
if node_data["filename"] == "res://scenes/gamestate.tscn" and node_data["parent"] == "/root":
|
||||||
var new_node = load(node_data["filename"]).instantiate()
|
Gamestate.SetInitialValue(node_data["total_distance"], node_data["total_time"])
|
||||||
|
|
||||||
# Aggiungi al parent originale
|
|
||||||
get_node(node_data["parent"]).add_child(new_node)
|
|
||||||
|
|
||||||
# Ripristina le proprietà
|
|
||||||
new_node.SetInitialValue(node_data["total_distance"])
|
|
||||||
##new_node.total_distance = new_node.initial_total_distance
|
|
||||||
|
|
||||||
# Ripristina proprietà custom
|
|
||||||
for key in node_data.keys():
|
|
||||||
if key in ["filename", "parent", "total_distance"]:
|
|
||||||
continue
|
|
||||||
if key in new_node:
|
|
||||||
new_node.set(key, node_data[key])
|
|
||||||
|
|
||||||
|
|
||||||
func _on_timer_timeout() -> void:
|
func _on_timer_timeout() -> void:
|
||||||
save_game()
|
save_game()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_trip_time_timeout() -> void:
|
||||||
|
total_time_in_secs += 1
|
||||||
|
|
||||||
|
|||||||
@@ -48,11 +48,6 @@ func _ready() -> void:
|
|||||||
current_speed = base_speed
|
current_speed = base_speed
|
||||||
|
|
||||||
|
|
||||||
func _on_button_pressed() -> void:
|
|
||||||
_create_train()
|
|
||||||
current_speed = base_speed
|
|
||||||
|
|
||||||
|
|
||||||
func _remove_train():
|
func _remove_train():
|
||||||
for node in get_tree().get_nodes_in_group(group_name):
|
for node in get_tree().get_nodes_in_group(group_name):
|
||||||
node.queue_free()
|
node.queue_free()
|
||||||
@@ -146,7 +141,9 @@ func _handle_input(delta: float) -> void:
|
|||||||
elif Input.is_action_pressed("speed_down"):
|
elif Input.is_action_pressed("speed_down"):
|
||||||
current_speed = max(current_speed - acceleration * delta, min_speed)
|
current_speed = max(current_speed - acceleration * delta, min_speed)
|
||||||
speed_changed.emit(current_speed)
|
speed_changed.emit(current_speed)
|
||||||
|
elif Input.is_action_pressed("change_train"):
|
||||||
|
_create_train()
|
||||||
|
current_speed = base_speed
|
||||||
|
|
||||||
func _update_movement(delta: float) -> void:
|
func _update_movement(delta: float) -> void:
|
||||||
distance_traveled += current_speed * delta
|
distance_traveled += current_speed * delta
|
||||||
|
|||||||
Reference in New Issue
Block a user