diff --git a/assets/green_bulb.png b/assets/green_bulb.png new file mode 100644 index 0000000..18def71 Binary files /dev/null and b/assets/green_bulb.png differ diff --git a/assets/green_bulb.png.import b/assets/green_bulb.png.import new file mode 100644 index 0000000..9cffa7a --- /dev/null +++ b/assets/green_bulb.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dscmmkun43x73" +path="res://.godot/imported/green_bulb.png-40142b1c42f713f5ea15a2bdd2f3b4da.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/green_bulb.png" +dest_files=["res://.godot/imported/green_bulb.png-40142b1c42f713f5ea15a2bdd2f3b4da.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/red_bulb.png b/assets/red_bulb.png new file mode 100644 index 0000000..33e7f2d Binary files /dev/null and b/assets/red_bulb.png differ diff --git a/assets/red_bulb.png.import b/assets/red_bulb.png.import new file mode 100644 index 0000000..abc739c --- /dev/null +++ b/assets/red_bulb.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c2bku7ypsu0q3" +path="res://.godot/imported/red_bulb.png-2510e07db82f9ed84f012733bc27ce16.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/red_bulb.png" +dest_files=["res://.godot/imported/red_bulb.png-2510e07db82f9ed84f012733bc27ce16.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prefabs/SignalButton.tscn b/prefabs/SignalButton.tscn new file mode 100644 index 0000000..ffbae38 --- /dev/null +++ b/prefabs/SignalButton.tscn @@ -0,0 +1,21 @@ +[gd_scene load_steps=5 format=3 uid="uid://iw1demrx5nvt"] + +[ext_resource type="Texture2D" uid="uid://c2bku7ypsu0q3" path="res://assets/red_bulb.png" id="1_l1i5j"] +[ext_resource type="Texture2D" uid="uid://dscmmkun43x73" path="res://assets/green_bulb.png" id="2_rqf3p"] + +[sub_resource type="Theme" id="Theme_3hp74"] +CheckButton/icons/checked = ExtResource("1_l1i5j") +CheckButton/icons/unchecked = ExtResource("2_rqf3p") + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_7ypl7"] + +[node name="SignalButton" type="CheckButton"] +offset_right = 524.0 +offset_bottom = 520.0 +rotation = -1.5708 +scale = Vector2(0.05, 0.05) +theme = SubResource("Theme_3hp74") +theme_override_styles/focus = SubResource("StyleBoxEmpty_7ypl7") +keep_pressed_outside = true +shortcut_in_tooltip = false +metadata/_edit_use_anchors_ = true diff --git a/prefabs/Track.tscn b/prefabs/Track.tscn index ebe598e..9e3566c 100644 --- a/prefabs/Track.tscn +++ b/prefabs/Track.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=8 format=3 uid="uid://d1xy67euifbh6"] +[gd_scene load_steps=9 format=3 uid="uid://d1xy67euifbh6"] [ext_resource type="Script" path="res://scripts/Track.gd" id="1_ibb4y"] [ext_resource type="Texture2D" uid="uid://dyk30b1nt2gvq" path="res://assets/crosstie.png" id="2_hrp4r"] [ext_resource type="PackedScene" uid="uid://btfdanletw1gi" path="res://prefabs/TrackJunction.tscn" id="3_el8rw"] +[ext_resource type="PackedScene" uid="uid://iw1demrx5nvt" path="res://prefabs/SignalButton.tscn" id="4_t21tl"] [ext_resource type="Texture2D" uid="uid://dlgfnj8p01ym4" path="res://assets/track.png" id="4_tum5x"] [sub_resource type="Curve2D" id="Curve2D_nxaiu"] @@ -54,13 +55,17 @@ loop = false parent = NodePath("../..") side = 2 -[node name="SignalButton" type="CheckButton" parent="HeadPoint"] +[node name="SignalButton" parent="HeadPoint" instance=ExtResource("4_t21tl")] visible = false -offset_top = 14.0 -offset_right = 44.0 -offset_bottom = 38.0 -shortcut_in_tooltip = false -metadata/_edit_use_anchors_ = true +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = -15.0 +offset_bottom = 505.0 +grow_horizontal = 2 +grow_vertical = 2 [node name="TailPoint" type="PathFollow2D" parent="."] position = Vector2(256, 2.08165e-12) @@ -71,12 +76,20 @@ loop = false parent = NodePath("../..") side = 3 -[node name="SignalButton" type="CheckButton" parent="TailPoint"] +[node name="SignalButton" parent="TailPoint" instance=ExtResource("4_t21tl")] visible = false -offset_left = -44.0 -offset_top = 14.0 -offset_bottom = 38.0 -metadata/_edit_use_anchors_ = true +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = 15.0 +offset_bottom = 535.0 +grow_horizontal = 2 +grow_vertical = 2 +rotation = 1.5708 +size_flags_horizontal = 4 +size_flags_vertical = 4 [node name="TrackLine" type="Line2D" parent="."] z_index = 2 diff --git a/prefabs/TrackSwitch.tscn b/prefabs/TrackSwitch.tscn index e8f17a7..874c2df 100644 --- a/prefabs/TrackSwitch.tscn +++ b/prefabs/TrackSwitch.tscn @@ -6,7 +6,7 @@ [ext_resource type="Texture2D" uid="uid://bk10alqlk6ie2" path="res://assets/switch_left.png" id="4_xc4rb"] [ext_resource type="Texture2D" uid="uid://cfj6l27udpvr7" path="res://assets/arrow.png" id="6_nflxo"] -[sub_resource type="Curve2D" id="Curve2D_30ar5"] +[sub_resource type="Curve2D" id="Curve2D_rvp3s"] resource_local_to_scene = true _data = { "points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, -24.017, 16.005, 24.017, -16.005, 64, -16, 0, 0, 0, 0, 128, -32) @@ -32,7 +32,7 @@ instance_count = 13 mesh = SubResource("ArrayMesh_umy7o") buffer = PackedFloat32Array(0.99808, 0.0619333, 0, 4.99647, -0.0619333, 0.99808, 0, -0.176236, 0.992584, 0.121559, 0, 14.9636, -0.121559, 0.992584, 0, -0.961502, 0.98391, 0.178663, 0, 24.872, -0.178663, 0.98391, 0, -2.30135, 0.969346, 0.2457, 0, 34.6786, -0.2457, 0.969346, 0, -4.24865, 0.94496, 0.327186, 0, 44.3185, -0.327186, 0.94496, 0, -6.89664, 0.901405, 0.432977, 0, 53.6711, -0.432977, 0.901405, 0, -10.4225, 0.847395, 0.530963, 0, 62.5187, -0.530963, 0.847395, 0, -15.0622, 0.910454, 0.413611, 0, 71.1488, -0.413611, 0.910454, 0, -20.1015, 0.949217, 0.314623, 0, 80.3623, -0.314623, 0.949217, 0, -23.9742, 0.971893, 0.235421, 0, 89.9171, -0.235421, 0.971893, 0, -26.9124, 0.985566, 0.169291, 0, 99.6749, -0.169291, 0.985566, 0, -29.0903, 0.993711, 0.111974, 0, 109.553, -0.111974, 0.993711, 0, -30.6376, 0.99852, 0.054383, 0, 119.503, -0.054383, 0.99852, 0, -31.6189) -[sub_resource type="Curve2D" id="Curve2D_xv1m5"] +[sub_resource type="Curve2D" id="Curve2D_74r7i"] resource_local_to_scene = true _data = { "points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, -23.902, -16.064, 23.902, 16.064, 64, 16, 0, 0, 0, 0, 128, 32) @@ -53,7 +53,7 @@ CheckButton/icons/unchecked = ExtResource("4_xc4rb") script = ExtResource("1_ucgph") [node name="LeftTrack" parent="." groups=["left_track"] instance=ExtResource("2_e5vto")] -curve = SubResource("Curve2D_30ar5") +curve = SubResource("Curve2D_rvp3s") [node name="MultiMeshInstance2D" parent="LeftTrack" index="1"] multimesh = SubResource("MultiMesh_m32f0") @@ -64,9 +64,6 @@ rotation = -0.244979 [node name="TrackJunction" parent="LeftTrack/HeadPoint" index="0"] parent = NodePath("../../..") -[node name="SignalButton" parent="LeftTrack/HeadPoint" index="1"] -visible = false - [node name="TailPoint" parent="LeftTrack" index="3"] position = Vector2(128, -32) rotation = -0.244979 @@ -76,9 +73,6 @@ progress = 133.506 parent = NodePath("../../..") side = 0 -[node name="SignalButton" parent="LeftTrack/TailPoint" index="1"] -visible = false - [node name="TrackLine" parent="LeftTrack" index="4"] points = PackedVector2Array(2.08165e-12, 2.08165e-12, 1.76493, -0.031045, 6.62261, -0.249297, 10.0063, -0.487274, 13.9174, -0.842432, 18.2738, -1.33823, 22.9936, -1.99813, 25.4642, -2.39694, 27.9949, -2.84558, 30.5755, -3.34697, 33.1957, -3.90405, 35.8452, -4.51975, 38.514, -5.197, 41.1916, -5.93874, 43.8678, -6.74789, 46.5325, -7.62739, 49.1753, -8.58017, 51.7861, -9.60917, 54.3545, -10.7173, 56.8703, -11.9075, 59.3234, -13.1828, 61.7033, -14.5459, 64, -16, 66.2967, -17.4541, 68.6766, -18.8172, 71.1297, -20.0925, 73.6455, -21.2827, 76.2139, -22.3908, 78.8247, -23.4198, 81.4675, -24.3726, 84.1322, -25.2521, 86.8084, -26.0613, 89.486, -26.803, 92.1548, -27.4802, 94.8044, -28.0959, 97.4245, -28.653, 100.005, -29.1544, 102.536, -29.6031, 105.006, -30.0019, 109.726, -30.6618, 114.083, -31.1576, 117.994, -31.5127, 121.377, -31.7507, 126.235, -31.969, 128, -32) metadata/_edit_lock_ = true @@ -95,7 +89,7 @@ texture = ExtResource("6_nflxo") [node name="RightTrack" parent="." groups=["right_track"] instance=ExtResource("2_e5vto")] z_index = 1 -curve = SubResource("Curve2D_xv1m5") +curve = SubResource("Curve2D_74r7i") [node name="MultiMeshInstance2D" parent="RightTrack" index="1"] multimesh = SubResource("MultiMesh_pixd6") @@ -106,9 +100,6 @@ rotation = 0.244979 [node name="TrackJunction" parent="RightTrack/HeadPoint" index="0"] parent = NodePath("../../..") -[node name="SignalButton" parent="RightTrack/HeadPoint" index="1"] -visible = false - [node name="TailPoint" parent="RightTrack" index="3"] position = Vector2(128, 32) rotation = 0.244979 @@ -118,9 +109,6 @@ progress = 133.535 parent = NodePath("../../..") side = 1 -[node name="SignalButton" parent="RightTrack/TailPoint" index="1"] -visible = false - [node name="TrackLine" parent="RightTrack" index="4"] points = PackedVector2Array(2.08165e-12, 2.08165e-12, 1.76964, 0.028625, 6.63878, 0.241, 10.0295, 0.475391, 13.9477, 0.826875, 18.311, 1.31917, 23.0368, 1.976, 25.5098, 2.37353, 28.0427, 2.82108, 30.6249, 3.32162, 33.2462, 3.87813, 35.8963, 4.49355, 38.5649, 5.17086, 41.2417, 5.91302, 43.9163, 6.723, 46.5786, 7.60376, 49.218, 8.55827, 51.8245, 9.58948, 54.3875, 10.7004, 56.8969, 11.8939, 59.3423, 13.173, 61.7135, 14.5408, 64, 16, 66.2865, 17.4592, 68.6577, 18.827, 71.1031, 20.1061, 73.6125, 21.2996, 76.1756, 22.4105, 78.782, 23.4417, 81.4214, 24.3962, 84.0837, 25.277, 86.7583, 26.087, 89.4351, 26.8291, 92.1037, 27.5065, 94.7538, 28.1219, 97.3751, 28.6784, 99.9574, 29.1789, 102.49, 29.6265, 104.963, 30.024, 109.689, 30.6808, 114.052, 31.1731, 117.97, 31.5246, 121.361, 31.759, 126.23, 31.9714, 128, 32) metadata/_edit_lock_ = true diff --git a/prefabs/TrackSwitches/TrackSwitch_Left45Curve_Right45Curve.tscn b/prefabs/TrackSwitches/TrackSwitch_Left45Curve_Right45Curve.tscn new file mode 100644 index 0000000..bac151a --- /dev/null +++ b/prefabs/TrackSwitches/TrackSwitch_Left45Curve_Right45Curve.tscn @@ -0,0 +1,90 @@ +[gd_scene load_steps=7 format=3 uid="uid://dv0rp1nuh5ves"] + +[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="1_ngsqx"] + +[sub_resource type="Curve2D" id="Curve2D_81xyj"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9099, 15.5564, 15.9099, -15.5564, 56, -16, 0, 0, 0, 0, 80, -40, 0, 0, 0, 0, 88, -48) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_55w7u"] +resource_local_to_scene = true +instance_count = 10 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999839, 0.017918, 0, 5, -0.017918, 0.999839, 0, 7.80619e-13, 0.992192, 0.124719, 0, 14.9817, -0.124719, 0.992192, 0, -0.483443, 0.977357, 0.211598, 0, 24.87, -0.211598, 0.977357, 0, -1.94847, 0.945591, 0.325357, 0, 34.5727, -0.325357, 0.945591, 0, -4.34477, 0.884774, 0.46602, 0, 43.8991, -0.46602, 0.884774, 0, -7.92321, 0.758262, 0.65195, 0, 52.485, -0.65195, 0.758262, 0, -13.0107, 0.712023, 0.702156, 0, 59.8432, -0.702156, 0.712023, 0, -19.7698, 0.707563, 0.70665, 0, 66.9529, -0.70665, 0.707563, 0, -26.802, 0.701098, 0.713065, 0, 74.0144, -0.713065, 0.701098, 0, -33.8826, 0.707107, 0.707106, 0, 81.0192, -0.707106, 0.707107, 0, -41.0192) + +[sub_resource type="Curve2D" id="Curve2D_jf8fx"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9491, -15.9704, 15.9491, 15.9704, 56, 16, 0, 0, 0, 0, 80, 40, 0, 0, 0, 0, 88, 48) +} +point_count = 5 + +[sub_resource type="MultiMesh" id="MultiMesh_n0m24"] +resource_local_to_scene = true +instance_count = 10 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999912, -0.0132958, 0, 5, 0.0132958, 0.999912, 0, 7.80619e-13, 0.993157, -0.116789, 0, 14.9862, 0.116789, 0.993157, 0, 0.410031, 0.978234, -0.207504, 0, 24.8843, 0.207504, 0.978234, 0, 1.80522, 0.945319, -0.326147, 0, 34.5931, 0.326147, 0.945319, 0, 4.1747, 0.88189, -0.471456, 0, 43.911, 0.471456, 0.88189, 0, 7.77285, 0.752086, -0.659065, 0, 52.4581, 0.659065, 0.752086, 0, 12.9232, 0.706809, -0.707405, 0, 59.7496, 0.707405, 0.706809, 0, 19.7539, 0.707076, -0.707138, 0, 66.8183, 0.707138, 0.707076, 0, 26.8274, 0.707461, -0.706752, 0, 73.8899, 0.706752, 0.707461, 0, 33.8979, 0.707107, -0.707107, 0, 80.965, 0.707107, 0.707107, 0, 40.965) + +[node name="TrackSwitch" instance=ExtResource("1_ngsqx")] + +[node name="LeftTrack" parent="." index="0"] +curve = SubResource("Curve2D_81xyj") + +[node name="MultiMeshInstance2D" parent="LeftTrack" index="1"] +multimesh = SubResource("MultiMesh_55w7u") + +[node name="HeadPoint" parent="LeftTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="LeftTrack" index="3"] +position = Vector2(88, -48) +rotation = -0.785398 +progress = 104.872 + +[node name="TrackLine" parent="LeftTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40995, -0.0494466, 13.2627, -0.312388, 15.9283, -0.577639, 18.9925, -0.960728, 22.3846, -1.48314, 26.0338, -2.16637, 29.8694, -3.0319, 33.8208, -4.10121, 37.8173, -5.39581, 41.788, -6.93716, 45.6624, -8.74677, 49.3696, -10.8461, 52.8391, -13.2567, 56, -16, 58.8914, -18.8331, 61.5991, -21.4976, 64.1228, -23.9915, 66.462, -26.3128, 68.6163, -28.4597, 70.5854, -30.43, 73.9662, -33.8336, 76.6012, -36.508, 78.4873, -38.4376, 80, -40, 81.25, -41.25, 84, -44, 86.75, -46.75, 88, -48) + +[node name="Pointer" parent="LeftTrack" index="5"] +position = Vector2(50.4061, -11.515) +progress = 52.4362 + +[node name="RightTrack" parent="." index="1"] +curve = SubResource("Curve2D_jf8fx") + +[node name="MultiMeshInstance2D" parent="RightTrack" index="1"] +multimesh = SubResource("MultiMesh_n0m24") + +[node name="HeadPoint" parent="RightTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="RightTrack" index="3"] +position = Vector2(88, 48) +rotation = 0.785398 +progress = 104.949 + +[node name="TrackLine" parent="RightTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40834, 0.0324641, 13.2572, 0.254163, 15.9204, 0.494243, 18.9822, 0.851555, 22.3719, 1.3494, 26.0191, 2.0111, 29.8532, 2.85995, 33.8036, 3.91926, 37.7999, 5.21234, 41.7715, 6.76249, 45.6478, 8.59302, 49.3584, 10.7272, 52.8326, 13.1885, 56, 16, 58.8979, 18.9014, 61.6104, 21.6165, 64.1373, 24.1453, 66.4785, 26.4875, 68.6337, 28.6431, 70.6026, 30.612, 73.9809, 33.9889, 76.6116, 36.6172, 78.4928, 38.4958, 80, 40, 81.25, 41.25, 84, 44, 86.75, 46.75, 88, 48) + +[node name="Pointer" parent="RightTrack" index="5"] +position = Vector2(50.4243, 11.4282) +rotation = 0.597223 +progress = 52.4745 + +[editable path="LeftTrack"] +[editable path="RightTrack"] diff --git a/prefabs/TrackSwitches/TrackSwitch_Left45Curve_Right90Curve.tscn b/prefabs/TrackSwitches/TrackSwitch_Left45Curve_Right90Curve.tscn new file mode 100644 index 0000000..23af7fa --- /dev/null +++ b/prefabs/TrackSwitches/TrackSwitch_Left45Curve_Right90Curve.tscn @@ -0,0 +1,90 @@ +[gd_scene load_steps=7 format=3 uid="uid://u7ha51gesbwl"] + +[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="1_jwpm4"] + +[sub_resource type="Curve2D" id="Curve2D_81xyj"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9099, 15.5564, 15.9099, -15.5564, 56, -16, 0, 0, 0, 0, 80, -40, 0, 0, 0, 0, 88, -48) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_55w7u"] +resource_local_to_scene = true +instance_count = 10 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999839, 0.0179174, 0, 5, -0.0179174, 0.999839, 0, 7.80619e-13, 0.992192, 0.124718, 0, 14.9817, -0.124718, 0.992192, 0, -0.483434, 0.977357, 0.211597, 0, 24.87, -0.211597, 0.977357, 0, -1.94846, 0.945591, 0.325357, 0, 34.5727, -0.325357, 0.945591, 0, -4.34475, 0.884774, 0.466021, 0, 43.8991, -0.466021, 0.884774, 0, -7.92319, 0.758261, 0.651951, 0, 52.485, -0.651951, 0.758261, 0, -13.0107, 0.712022, 0.702157, 0, 59.8432, -0.702157, 0.712022, 0, -19.7698, 0.707563, 0.70665, 0, 66.9529, -0.70665, 0.707563, 0, -26.802, 0.7011, 0.713063, 0, 74.0144, -0.713063, 0.7011, 0, -33.8826, 0.707107, 0.707107, 0, 81.0192, -0.707107, 0.707107, 0, -41.0192) + +[sub_resource type="Curve2D" id="Curve2D_jf8fx"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9491, -15.9704, 15.9491, 15.9704, 56, 16, 0, 0, 0, 0, 72, 64, 0, 0, 0, 0, 72, 72) +} +point_count = 5 + +[sub_resource type="MultiMesh" id="MultiMesh_n0m24"] +resource_local_to_scene = true +instance_count = 12 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999912, -0.0132958, 0, 5, 0.0132958, 0.999912, 0, 7.80619e-13, 0.993157, -0.116789, 0, 14.9862, 0.116789, 0.993157, 0, 0.410031, 0.978234, -0.207504, 0, 24.8843, 0.207504, 0.978234, 0, 1.80522, 0.945319, -0.326147, 0, 34.5931, 0.326147, 0.945319, 0, 4.1747, 0.88189, -0.471456, 0, 43.911, 0.471456, 0.88189, 0, 7.77285, 0.749671, -0.661811, 0, 52.4581, 0.661811, 0.749671, 0, 12.9232, 0.5492, -0.835691, 0, 59.426, 0.835691, 0.5492, 0, 20.0448, 0.385896, -0.922542, 0, 64.479, 0.922542, 0.385896, 0, 28.6489, 0.255447, -0.966823, 0, 68.0035, 0.966823, 0.255447, 0, 37.996, 0.158615, -0.987341, 0, 70.2963, 0.987341, 0.158615, 0, 47.7241, 0.0651445, -0.997876, 0, 71.6416, 0.997876, 0.0651445, 0, 57.629, -4.37114e-08, -1, 0, 72, 1, -4.37114e-08, 0, 67.6175) + +[node name="TrackSwitch" instance=ExtResource("1_jwpm4")] + +[node name="LeftTrack" parent="." index="0"] +curve = SubResource("Curve2D_81xyj") + +[node name="MultiMeshInstance2D" parent="LeftTrack" index="1"] +multimesh = SubResource("MultiMesh_55w7u") + +[node name="HeadPoint" parent="LeftTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="LeftTrack" index="3"] +position = Vector2(88, -48) +rotation = -0.785398 +progress = 104.872 + +[node name="TrackLine" parent="LeftTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40995, -0.0494445, 13.2627, -0.312381, 15.9283, -0.577629, 18.9925, -0.960715, 22.3846, -1.48313, 26.0338, -2.16635, 29.8694, -3.03188, 33.8208, -4.10119, 37.8173, -5.39578, 41.788, -6.93714, 45.6624, -8.74676, 49.3696, -10.8461, 52.8391, -13.2567, 56, -16, 58.8914, -18.8331, 61.5991, -21.4976, 64.1228, -23.9915, 66.462, -26.3129, 68.6163, -28.4597, 70.5854, -30.4301, 73.9662, -33.8336, 76.6012, -36.508, 78.4873, -38.4376, 80, -40, 81.25, -41.25, 84, -44, 86.75, -46.75, 88, -48) + +[node name="Pointer" parent="LeftTrack" index="5"] +position = Vector2(50.4062, -11.515) +progress = 52.4362 + +[node name="RightTrack" parent="." index="1"] +curve = SubResource("Curve2D_jf8fx") + +[node name="MultiMeshInstance2D" parent="RightTrack" index="1"] +multimesh = SubResource("MultiMesh_n0m24") + +[node name="HeadPoint" parent="RightTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="RightTrack" index="3"] +position = Vector2(72, 72) +rotation = 1.5708 +progress = 119.383 + +[node name="TrackLine" parent="RightTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40834, 0.0324641, 13.2572, 0.254163, 15.9204, 0.494243, 18.9822, 0.851555, 22.3719, 1.3494, 26.0191, 2.0111, 29.8532, 2.85995, 33.8036, 3.91926, 37.7999, 5.21234, 41.7715, 6.76249, 45.6478, 8.59302, 49.3584, 10.7272, 52.8326, 13.1885, 56, 16, 58.808, 19.1709, 61.2666, 22.6478, 63.3991, 26.3601, 65.2285, 30.2375, 66.7782, 34.2095, 68.0714, 38.2057, 69.1312, 42.1557, 69.9809, 45.9889, 70.6437, 49.635, 71.1428, 53.0234, 71.5015, 56.0839, 71.7428, 58.7458, 71.9667, 62.5925, 72, 64, 72, 68, 72, 72) + +[node name="Pointer" parent="RightTrack" index="5"] +position = Vector2(50.4243, 11.4282) +rotation = 0.597223 +progress = 52.4745 + +[editable path="LeftTrack"] +[editable path="RightTrack"] diff --git a/prefabs/TrackSwitches/TrackSwitch_Left45Curve_RightStraight.tscn b/prefabs/TrackSwitches/TrackSwitch_Left45Curve_RightStraight.tscn new file mode 100644 index 0000000..4482336 --- /dev/null +++ b/prefabs/TrackSwitches/TrackSwitch_Left45Curve_RightStraight.tscn @@ -0,0 +1,90 @@ +[gd_scene load_steps=7 format=3 uid="uid://dnq6bkqmpu7vi"] + +[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="1_k6d0o"] + +[sub_resource type="Curve2D" id="Curve2D_81xyj"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9099, 15.5564, 15.9099, -15.5564, 56, -16, 0, 0, 0, 0, 80, -40, 0, 0, 0, 0, 88, -48) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_55w7u"] +resource_local_to_scene = true +instance_count = 10 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999839, 0.017918, 0, 5, -0.017918, 0.999839, 0, 7.80619e-13, 0.992192, 0.124719, 0, 14.9817, -0.124719, 0.992192, 0, -0.483443, 0.977357, 0.211598, 0, 24.87, -0.211598, 0.977357, 0, -1.94847, 0.945591, 0.325357, 0, 34.5727, -0.325357, 0.945591, 0, -4.34477, 0.884774, 0.46602, 0, 43.8991, -0.46602, 0.884774, 0, -7.92321, 0.758262, 0.65195, 0, 52.485, -0.65195, 0.758262, 0, -13.0107, 0.712023, 0.702156, 0, 59.8432, -0.702156, 0.712023, 0, -19.7698, 0.707563, 0.70665, 0, 66.9529, -0.70665, 0.707563, 0, -26.802, 0.701098, 0.713065, 0, 74.0144, -0.713065, 0.701098, 0, -33.8826, 0.707107, 0.707106, 0, 81.0192, -0.707106, 0.707107, 0, -41.0192) + +[sub_resource type="Curve2D" id="Curve2D_jf8fx"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 96, 0) +} +point_count = 3 + +[sub_resource type="MultiMesh" id="MultiMesh_n0m24"] +resource_local_to_scene = true +instance_count = 10 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(1, 1.56124e-13, 0, 5, -1.56124e-13, 1, 0, 7.80619e-13, 1, 0, 0, 15, 0, 1, 0, 0, 1, 0, 0, 25, 0, 1, 0, 0, 1, 0, 0, 35, 0, 1, 0, 0, 1, 0, 0, 45, 0, 1, 0, 0, 1, 0, 0, 55, 0, 1, 0, 0, 1, 0, 0, 65, 0, 1, 0, 0, 1, 0, 0, 75, 0, 1, 0, 0, 1, 0, 0, 85, 0, 1, 0, 0, 1, 0, 0, 95, 0, 1, 0, 0) + +[node name="TrackSwitch" instance=ExtResource("1_k6d0o")] + +[node name="LeftTrack" parent="." index="0"] +curve = SubResource("Curve2D_81xyj") + +[node name="MultiMeshInstance2D" parent="LeftTrack" index="1"] +multimesh = SubResource("MultiMesh_55w7u") + +[node name="HeadPoint" parent="LeftTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="LeftTrack" index="3"] +position = Vector2(88, -48) +rotation = -0.785398 +progress = 104.872 + +[node name="TrackLine" parent="LeftTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40995, -0.0494466, 13.2627, -0.312388, 15.9283, -0.577639, 18.9925, -0.960728, 22.3846, -1.48314, 26.0338, -2.16637, 29.8694, -3.0319, 33.8208, -4.10121, 37.8173, -5.39581, 41.788, -6.93716, 45.6624, -8.74677, 49.3696, -10.8461, 52.8391, -13.2567, 56, -16, 58.8914, -18.8331, 61.5991, -21.4976, 64.1228, -23.9915, 66.462, -26.3128, 68.6163, -28.4597, 70.5854, -30.43, 73.9662, -33.8336, 76.6012, -36.508, 78.4873, -38.4376, 80, -40, 81.25, -41.25, 84, -44, 86.75, -46.75, 88, -48) + +[node name="Pointer" parent="LeftTrack" index="5"] +position = Vector2(50.4061, -11.515) +progress = 52.4362 + +[node name="RightTrack" parent="." index="1"] +curve = SubResource("Curve2D_jf8fx") + +[node name="MultiMeshInstance2D" parent="RightTrack" index="1"] +multimesh = SubResource("MultiMesh_n0m24") + +[node name="HeadPoint" parent="RightTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="RightTrack" index="3"] +position = Vector2(96, 0) +rotation = 0.0 +progress = 96.0 + +[node name="TrackLine" parent="RightTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 11.7812, 0, 16.1211, 0, 18.7905, 0, 21.75, 0, 24.9673, 0, 28.4102, 0, 32.0464, 0, 35.8438, 0, 39.77, 0, 43.793, 0, 47.8804, 0, 52, 0, 56.1196, 0, 60.207, 0, 64.23, 0, 68.1562, 0, 71.9536, 0, 75.5898, 0, 79.0327, 0, 82.25, 0, 85.2095, 0, 87.8789, 0, 92.2188, 0, 96, 0) + +[node name="Pointer" parent="RightTrack" index="5"] +position = Vector2(47.9996, 0) +rotation = 0.0 +progress = 48.0 + +[editable path="LeftTrack"] +[editable path="RightTrack"] diff --git a/prefabs/TrackSwitches/TrackSwitch_Left90Curve_Left45Curve.tscn b/prefabs/TrackSwitches/TrackSwitch_Left90Curve_Left45Curve.tscn new file mode 100644 index 0000000..dd25f4a --- /dev/null +++ b/prefabs/TrackSwitches/TrackSwitch_Left90Curve_Left45Curve.tscn @@ -0,0 +1,91 @@ +[gd_scene load_steps=7 format=3 uid="uid://dhhfykmc5w8mp"] + +[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="1_q7qx6"] + +[sub_resource type="Curve2D" id="Curve2D_81xyj"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9099, 15.5564, 15.9099, -15.5564, 56, -16, 0, 0, 0, 0, 72, -56, 0, 0, 0, 0, 72, -72) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_55w7u"] +resource_local_to_scene = true +instance_count = 12 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999839, 0.0179174, 0, 5, -0.0179174, 0.999839, 0, 7.80619e-13, 0.992192, 0.124718, 0, 14.9817, -0.124718, 0.992192, 0, -0.483434, 0.977357, 0.211597, 0, 24.87, -0.211597, 0.977357, 0, -1.94846, 0.945591, 0.325357, 0, 34.5727, -0.325357, 0.945591, 0, -4.34475, 0.884774, 0.466021, 0, 43.8991, -0.466021, 0.884774, 0, -7.92319, 0.755939, 0.654642, 0, 52.485, -0.654642, 0.755939, 0, -13.0107, 0.581746, 0.813371, 0, 59.5782, -0.813371, 0.581746, 0, -20.0169, 0.415341, 0.909666, 0, 64.9887, -0.909666, 0.415341, 0, -28.4043, 0.269735, 0.962935, 0, 68.7616, -0.962935, 0.269735, 0, -37.6514, 0.12907, 0.991635, 0, 71.1167, -0.991635, 0.12907, 0, -47.3608, -4.37114e-08, 1, 0, 72, -1, -4.37114e-08, 0, -57.3103, -4.37114e-08, 1, 0, 72, -1, -4.37114e-08, 0, -67.3103) + +[sub_resource type="Curve2D" id="Curve2D_jf8fx"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9491, 15.8426, 15.9491, -15.8426, 56, -16, 0, 0, 0, 0, 80, -40, 0, 0, 0, 0, 104, -64) +} +point_count = 5 + +[sub_resource type="MultiMesh" id="MultiMesh_n0m24"] +resource_local_to_scene = true +instance_count = 13 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999891, 0.0147324, 0, 5, -0.0147324, 0.999891, 0, 7.80619e-13, 0.992858, 0.119299, 0, 14.9849, -0.119299, 0.992858, 0, -0.432923, 0.977952, 0.208829, 0, 24.8799, -0.208829, 0.977952, 0, -1.85027, 0.945385, 0.325956, 0, 34.5866, -0.325956, 0.945385, 0, -4.22887, 0.882792, 0.469763, 0, 43.907, -0.469763, 0.882792, 0, -7.82133, 0.754133, 0.656721, 0, 52.4665, -0.656721, 0.754133, 0, -12.9518, 0.708592, 0.705619, 0, 59.7804, -0.705619, 0.708592, 0, -19.7587, 0.707257, 0.706956, 0, 66.8633, -0.706956, 0.707257, 0, -26.8179, 0.70532, 0.708889, 0, 73.9317, -0.708889, 0.70532, 0, -33.8917, 0.707107, 0.707106, 0, 80.9827, -0.707106, 0.707107, 0, -40.9827, 0.707107, 0.707107, 0, 88.0538, -0.707107, 0.707107, 0, -48.0538, 0.707107, 0.707106, 0, 95.1248, -0.707106, 0.707107, 0, -55.1249, 0.707108, 0.707106, 0, 102.196, -0.707106, 0.707108, 0, -62.1959) + +[node name="TrackSwitch" instance=ExtResource("1_q7qx6")] + +[node name="LeftTrack" parent="." index="0"] +curve = SubResource("Curve2D_81xyj") + +[node name="MultiMeshInstance2D" parent="LeftTrack" index="1"] +multimesh = SubResource("MultiMesh_55w7u") + +[node name="HeadPoint" parent="LeftTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="LeftTrack" index="3"] +position = Vector2(72, -72) +rotation = -1.5708 +progress = 119.69 + +[node name="TrackLine" parent="LeftTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40995, -0.0494445, 13.2627, -0.312381, 15.9283, -0.577629, 18.9925, -0.960715, 22.3846, -1.48313, 26.0338, -2.16635, 29.8694, -3.03188, 33.8208, -4.10119, 37.8173, -5.39578, 41.788, -6.93714, 45.6624, -8.74676, 49.3696, -10.8461, 52.8391, -13.2567, 56, -16, 58.8016, -19.0128, 61.2554, -22.1851, 63.3845, -25.4681, 65.212, -28.8129, 66.7609, -32.1706, 68.0542, -35.4926, 69.1149, -38.7298, 69.9662, -41.8336, 70.6311, -44.7552, 71.1325, -47.4455, 71.7373, -51.9376, 72, -56, 72, -58.5, 72, -61.0625, 72, -64, 72, -66.9375, 72, -69.5, 72, -72) + +[node name="Pointer" parent="LeftTrack" index="5"] +position = Vector2(70.069, -42.2486) +rotation = -1.33188 +progress = 89.7673 + +[node name="RightTrack" parent="." index="1"] +curve = SubResource("Curve2D_jf8fx") + +[node name="MultiMeshInstance2D" parent="RightTrack" index="1"] +multimesh = SubResource("MultiMesh_n0m24") + +[node name="HeadPoint" parent="RightTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="RightTrack" index="3"] +position = Vector2(104, -64) +rotation = -0.785398 +progress = 127.551 + +[node name="TrackLine" parent="RightTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40834, -0.0377059, 13.2572, -0.272134, 15.9204, -0.519984, 18.9822, -0.885252, 22.3719, -1.39068, 26.0191, -2.05903, 29.8532, -2.91302, 33.8036, -3.97542, 37.7999, -5.26897, 41.7715, -6.8164, 45.6478, -8.64048, 49.3584, -10.7639, 52.8326, -13.2095, 56, -16, 58.8979, -18.8803, 61.6104, -21.5798, 64.1373, -24.0978, 66.4785, -26.4336, 68.6337, -28.5865, 70.6026, -30.5558, 73.9809, -33.941, 76.6116, -36.5835, 78.4928, -38.4779, 80, -40, 81.0312, -41.0312, 83.75, -43.75, 85.5664, -45.5664, 87.5938, -47.5938, 89.7617, -49.7617, 92, -52, 94.2383, -54.2383, 96.4062, -56.4062, 98.4336, -58.4336, 100.25, -60.25, 102.969, -62.9688, 104, -64) + +[node name="Pointer" parent="RightTrack" index="5"] +position = Vector2(81.3677, -41.3677) +rotation = -0.785398 +progress = 95.6635 + +[editable path="LeftTrack"] +[editable path="RightTrack"] diff --git a/prefabs/TrackSwitches/TrackSwitch_Left90Curve_Right45Curve.tscn b/prefabs/TrackSwitches/TrackSwitch_Left90Curve_Right45Curve.tscn new file mode 100644 index 0000000..fc2b7cb --- /dev/null +++ b/prefabs/TrackSwitches/TrackSwitch_Left90Curve_Right45Curve.tscn @@ -0,0 +1,90 @@ +[gd_scene load_steps=7 format=3 uid="uid://bpg2thfikkk1x"] + +[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="1_0lwiv"] + +[sub_resource type="Curve2D" id="Curve2D_81xyj"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9099, 15.5564, 15.9099, -15.5564, 56, -16, 0, 0, 0, 0, 72, -56, 0, 0, 0, 0, 72, -72) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_55w7u"] +resource_local_to_scene = true +instance_count = 12 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999839, 0.0179174, 0, 5, -0.0179174, 0.999839, 0, 7.80619e-13, 0.992192, 0.124718, 0, 14.9817, -0.124718, 0.992192, 0, -0.483434, 0.977357, 0.211597, 0, 24.87, -0.211597, 0.977357, 0, -1.94846, 0.945591, 0.325357, 0, 34.5727, -0.325357, 0.945591, 0, -4.34475, 0.884774, 0.466021, 0, 43.8991, -0.466021, 0.884774, 0, -7.92319, 0.755939, 0.654642, 0, 52.485, -0.654642, 0.755939, 0, -13.0107, 0.581746, 0.813371, 0, 59.5782, -0.813371, 0.581746, 0, -20.0169, 0.415341, 0.909666, 0, 64.9887, -0.909666, 0.415341, 0, -28.4043, 0.269735, 0.962935, 0, 68.7616, -0.962935, 0.269735, 0, -37.6514, 0.12907, 0.991635, 0, 71.1167, -0.991635, 0.12907, 0, -47.3608, -4.37114e-08, 1, 0, 72, -1, -4.37114e-08, 0, -57.3103, -4.37114e-08, 1, 0, 72, -1, -4.37114e-08, 0, -67.3103) + +[sub_resource type="Curve2D" id="Curve2D_jf8fx"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9491, -15.9704, 15.9491, 15.9704, 56, 16, 0, 0, 0, 0, 80, 40, 0, 0, 0, 0, 88, 48) +} +point_count = 5 + +[sub_resource type="MultiMesh" id="MultiMesh_n0m24"] +resource_local_to_scene = true +instance_count = 10 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999912, -0.0132958, 0, 5, 0.0132958, 0.999912, 0, 7.80619e-13, 0.993157, -0.116789, 0, 14.9862, 0.116789, 0.993157, 0, 0.410031, 0.978234, -0.207504, 0, 24.8843, 0.207504, 0.978234, 0, 1.80522, 0.945319, -0.326147, 0, 34.5931, 0.326147, 0.945319, 0, 4.1747, 0.88189, -0.471456, 0, 43.911, 0.471456, 0.88189, 0, 7.77285, 0.752086, -0.659065, 0, 52.4581, 0.659065, 0.752086, 0, 12.9232, 0.706809, -0.707405, 0, 59.7496, 0.707405, 0.706809, 0, 19.7539, 0.707076, -0.707138, 0, 66.8183, 0.707138, 0.707076, 0, 26.8274, 0.707461, -0.706752, 0, 73.8899, 0.706752, 0.707461, 0, 33.8979, 0.707107, -0.707107, 0, 80.965, 0.707107, 0.707107, 0, 40.965) + +[node name="TrackSwitch" instance=ExtResource("1_0lwiv")] + +[node name="LeftTrack" parent="." index="0"] +curve = SubResource("Curve2D_81xyj") + +[node name="MultiMeshInstance2D" parent="LeftTrack" index="1"] +multimesh = SubResource("MultiMesh_55w7u") + +[node name="HeadPoint" parent="LeftTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="LeftTrack" index="3"] +position = Vector2(72, -72) +rotation = -1.5708 +progress = 119.69 + +[node name="TrackLine" parent="LeftTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40995, -0.0494445, 13.2627, -0.312381, 15.9283, -0.577629, 18.9925, -0.960715, 22.3846, -1.48313, 26.0338, -2.16635, 29.8694, -3.03188, 33.8208, -4.10119, 37.8173, -5.39578, 41.788, -6.93714, 45.6624, -8.74676, 49.3696, -10.8461, 52.8391, -13.2567, 56, -16, 58.8016, -19.0128, 61.2554, -22.1851, 63.3845, -25.4681, 65.212, -28.8129, 66.7609, -32.1706, 68.0542, -35.4926, 69.1149, -38.7298, 69.9662, -41.8336, 70.6311, -44.7552, 71.1325, -47.4455, 71.7373, -51.9376, 72, -56, 72, -58.5, 72, -61.0625, 72, -64, 72, -66.9375, 72, -69.5, 72, -72) + +[node name="Pointer" parent="LeftTrack" index="5"] +position = Vector2(50.4062, -11.515) +progress = 52.4362 + +[node name="RightTrack" parent="." index="1"] +curve = SubResource("Curve2D_jf8fx") + +[node name="MultiMeshInstance2D" parent="RightTrack" index="1"] +multimesh = SubResource("MultiMesh_n0m24") + +[node name="HeadPoint" parent="RightTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="RightTrack" index="3"] +position = Vector2(88, 48) +rotation = 0.785398 +progress = 104.949 + +[node name="TrackLine" parent="RightTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40834, 0.0324641, 13.2572, 0.254163, 15.9204, 0.494243, 18.9822, 0.851555, 22.3719, 1.3494, 26.0191, 2.0111, 29.8532, 2.85995, 33.8036, 3.91926, 37.7999, 5.21234, 41.7715, 6.76249, 45.6478, 8.59302, 49.3584, 10.7272, 52.8326, 13.1885, 56, 16, 58.8979, 18.9014, 61.6104, 21.6165, 64.1373, 24.1453, 66.4785, 26.4875, 68.6337, 28.6431, 70.6026, 30.612, 73.9809, 33.9889, 76.6116, 36.6172, 78.4928, 38.4958, 80, 40, 81.25, 41.25, 84, 44, 86.75, 46.75, 88, 48) + +[node name="Pointer" parent="RightTrack" index="5"] +position = Vector2(50.4243, 11.4282) +rotation = 0.597223 +progress = 52.4745 + +[editable path="LeftTrack"] +[editable path="RightTrack"] diff --git a/prefabs/TrackSwitches/TrackSwitch_Left90Curve_Right90Curve.tscn b/prefabs/TrackSwitches/TrackSwitch_Left90Curve_Right90Curve.tscn new file mode 100644 index 0000000..56a128f --- /dev/null +++ b/prefabs/TrackSwitches/TrackSwitch_Left90Curve_Right90Curve.tscn @@ -0,0 +1,91 @@ +[gd_scene load_steps=7 format=3 uid="uid://dcc3pl2umqc4b"] + +[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="1_jitsw"] + +[sub_resource type="Curve2D" id="Curve2D_81xyj"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -16.2635, 16.0867, 16.2635, -16.0867, 56, -16, 0, 0, 0, 0, 72, -64, 0, 0, 0, 0, 72, -72) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_55w7u"] +resource_local_to_scene = true +instance_count = 12 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999926, 0.0121826, 0, 5, -0.0121826, 0.999926, 0, 7.80619e-13, 0.993244, 0.116044, 0, 14.9871, -0.116044, 0.993244, 0, -0.39415, 0.978052, 0.208361, 0, 24.8858, -0.208361, 0.978052, 0, -1.78412, 0.944767, 0.327742, 0, 34.5909, -0.327742, 0.944767, 0, -4.16758, 0.881362, 0.472442, 0, 43.9026, -0.472442, 0.881362, 0, -7.78152, 0.75192, 0.659254, 0, 52.4487, -0.659254, 0.75192, 0, -12.9353, 0.554639, 0.832091, 0, 59.4548, -0.832091, 0.554639, 0, -20.0219, 0.389032, 0.921224, 0, 64.5577, -0.921224, 0.389032, 0, -28.5959, 0.255978, 0.966683, 0, 68.105, -0.966683, 0.255978, 0, -37.9336, 0.154646, 0.98797, 0, 70.3884, -0.98797, 0.154646, 0, -47.6633, 0.0580762, 0.998312, 0, 71.6876, -0.998312, 0.0580762, 0, -57.574, -4.37114e-08, 1, 0, 72, -1, -4.37114e-08, 0, -67.5649) + +[sub_resource type="Curve2D" id="Curve2D_jf8fx"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -16.1066, -16.064, 16.1066, 16.064, 56, 16, 0, 0, 0, 0, 72, 64, 0, 0, 0, 0, 72, 72) +} +point_count = 5 + +[sub_resource type="MultiMesh" id="MultiMesh_n0m24"] +resource_local_to_scene = true +instance_count = 12 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999924, -0.0123415, 0, 5, 0.0123415, 0.999924, 0, 7.80619e-13, 0.993282, -0.11572, 0, 14.987, 0.11572, 0.993282, 0, 0.395749, 0.978271, -0.207329, 0, 24.8862, 0.207329, 0.978271, 0, 1.78218, 0.945024, -0.327002, 0, 34.5937, 0.327002, 0.945024, 0, 4.15614, 0.881373, -0.472421, 0, 43.9079, 0.472421, 0.881373, 0, 7.7638, 0.750299, -0.661099, 0, 52.451, 0.661099, 0.750299, 0, 12.9213, 0.551747, -0.834012, 0, 59.4334, 0.834012, 0.551747, 0, 20.0302, 0.387606, -0.921825, 0, 64.5107, 0.921825, 0.387606, 0, 28.6199, 0.256107, -0.966648, 0, 68.0483, 0.966648, 0.256107, 0, 37.9617, 0.156817, -0.987628, 0, 70.3395, 0.987628, 0.156817, 0, 47.6898, 0.0618072, -0.998088, 0, 71.6636, 0.998088, 0.0618072, 0, 57.5973, -4.37114e-08, -1, 0, 72, 1, -4.37114e-08, 0, 67.587) + +[node name="TrackSwitch" instance=ExtResource("1_jitsw")] + +[node name="LeftTrack" parent="." index="0"] +curve = SubResource("Curve2D_81xyj") + +[node name="MultiMeshInstance2D" parent="LeftTrack" index="1"] +multimesh = SubResource("MultiMesh_55w7u") + +[node name="HeadPoint" parent="LeftTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="LeftTrack" index="3"] +position = Vector2(72, -72) +rotation = -1.5708 +progress = 119.435 + +[node name="TrackLine" parent="LeftTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.39544, -0.0276939, 13.2129, -0.237808, 15.8571, -0.470818, 18.8993, -0.82089, 22.2704, -1.31184, 25.9012, -1.96749, 29.7226, -2.81165, 33.6655, -3.86815, 37.6606, -5.1608, 41.6388, -6.71342, 45.5311, -8.54984, 49.2681, -10.6939, 52.7808, -13.1693, 56, -16, 58.8598, -19.1901, 61.3569, -22.6811, 63.5158, -26.4033, 65.3612, -30.2866, 66.9175, -34.2611, 68.2095, -38.2569, 69.2618, -42.204, 70.0988, -46.0325, 70.7453, -49.6725, 71.2257, -53.0541, 71.5648, -56.1073, 71.7871, -58.7622, 71.9796, -62.5973, 72, -64, 72, -68, 72, -72) + +[node name="Pointer" parent="LeftTrack" index="5"] +position = Vector2(56.0174, -16.0173) +rotation = -0.780606 +progress = 59.7176 + +[node name="RightTrack" parent="." index="1"] +curve = SubResource("Curve2D_jf8fx") + +[node name="MultiMeshInstance2D" parent="RightTrack" index="1"] +multimesh = SubResource("MultiMesh_n0m24") + +[node name="HeadPoint" parent="RightTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="RightTrack" index="3"] +position = Vector2(72, 72) +rotation = 1.5708 +progress = 119.413 + +[node name="TrackLine" parent="RightTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40188, 0.028625, 13.235, 0.241, 15.8887, 0.475391, 18.9406, 0.826875, 22.321, 1.31917, 25.96, 1.976, 29.7878, 2.82108, 33.7344, 3.87813, 37.7301, 5.17086, 41.705, 6.723, 45.5893, 8.55827, 49.3131, 10.7004, 52.8067, 13.173, 56, 16, 58.834, 19.1863, 61.3119, 22.6746, 63.4576, 26.3949, 65.295, 30.277, 66.848, 34.251, 68.1406, 38.2469, 69.1966, 42.1945, 70.04, 46.024, 70.6946, 49.6652, 71.1844, 53.0481, 71.5332, 56.1027, 71.765, 58.759, 71.9731, 62.5964, 72, 64, 72, 68, 72, 72) + +[node name="Pointer" parent="RightTrack" index="5"] +position = Vector2(56.0042, 16.0042) +rotation = 0.784236 +progress = 59.7065 + +[editable path="LeftTrack"] +[editable path="RightTrack"] diff --git a/prefabs/TrackSwitches/TrackSwitch_Left90Curve_RightStraight.tscn b/prefabs/TrackSwitches/TrackSwitch_Left90Curve_RightStraight.tscn new file mode 100644 index 0000000..20b6646 --- /dev/null +++ b/prefabs/TrackSwitches/TrackSwitch_Left90Curve_RightStraight.tscn @@ -0,0 +1,91 @@ +[gd_scene load_steps=7 format=3 uid="uid://bvfen4semqi3"] + +[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="1_la4of"] + +[sub_resource type="Curve2D" id="Curve2D_81xyj"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -16.1849, 16.1849, 16.1849, -16.1849, 56, -16, 0, 0, 0, 0, 72, -64, 0, 0, 0, 0, 72, -72) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_55w7u"] +resource_local_to_scene = true +instance_count = 12 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999939, 0.0110225, 0, 5, -0.0110225, 0.999939, 0, 7.80619e-13, 0.993513, 0.113721, 0, 14.9881, -0.113721, 0.993513, 0, -0.3752, 0.978403, 0.206707, 0, 24.8896, -0.206707, 0.978403, 0, -1.74434, 0.944835, 0.327548, 0, 34.5977, -0.327548, 0.944835, 0, -4.11534, 0.880588, 0.473882, 0, 43.9084, -0.473882, 0.880588, 0, -7.73111, 0.749553, 0.661944, 0, 52.4424, -0.661944, 0.749553, 0, -12.9037, 0.552622, 0.833432, 0, 59.4222, -0.833432, 0.552622, 0, -20.0164, 0.388772, 0.921334, 0, 64.5098, -0.921334, 0.388772, 0, -28.6002, 0.257317, 0.966327, 0, 68.0578, -0.966327, 0.257317, 0, -37.9378, 0.156329, 0.987705, 0, 70.3548, -0.987705, 0.156329, 0, -47.6643, 0.0602997, 0.99818, 0, 71.6729, -0.99818, 0.0602997, 0, -57.5726, -4.37114e-08, 1, 0, 72, -1, -4.37114e-08, 0, -67.5627) + +[sub_resource type="Curve2D" id="Curve2D_jf8fx"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 88, 0) +} +point_count = 2 + +[sub_resource type="MultiMesh" id="MultiMesh_n0m24"] +resource_local_to_scene = true +instance_count = 9 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(1, 2.36551e-14, 0, 5, -2.36551e-14, 1, 0, 1.96337e-12, 1, 2.36551e-14, 0, 15, -2.36551e-14, 1, 0, 1.72682e-12, 1, 2.36551e-14, 0, 25, -2.36551e-14, 1, 0, 1.49027e-12, 1, 2.36551e-14, 0, 35, -2.36551e-14, 1, 0, 1.25372e-12, 1, 2.36551e-14, 0, 45, -2.36551e-14, 1, 0, 1.01717e-12, 1, 2.36551e-14, 0, 55, -2.36551e-14, 1, 0, 7.80619e-13, 1, 2.36551e-14, 0, 65, -2.36551e-14, 1, 0, 5.44068e-13, 1, 2.36551e-14, 0, 75, -2.36551e-14, 1, 0, 3.07516e-13, 1, 2.36551e-14, 0, 85, -2.36551e-14, 1, 0, 7.09653e-14) + +[node name="TrackSwitch" instance=ExtResource("1_la4of")] + +[node name="LeftTrack" parent="." index="0"] +curve = SubResource("Curve2D_81xyj") + +[node name="MultiMeshInstance2D" parent="LeftTrack" index="1"] +multimesh = SubResource("MultiMesh_55w7u") + +[node name="HeadPoint" parent="LeftTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="LeftTrack" index="3"] +position = Vector2(72, -72) +rotation = -1.5708 +progress = 119.437 + +[node name="TrackLine" parent="LeftTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.39867, -0.0236662, 13.224, -0.223998, 15.8729, -0.451039, 18.92, -0.794997, 22.2957, -1.28012, 25.9307, -1.93066, 29.7552, -2.77087, 33.7, -3.825, 37.6954, -5.11729, 41.672, -6.672, 45.5602, -8.51337, 49.2907, -10.6657, 52.7937, -13.1531, 56, -16, 58.8469, -19.2063, 61.3343, -22.7093, 63.4866, -26.4398, 65.328, -30.328, 66.8827, -34.3046, 68.175, -38.3, 69.2291, -42.2448, 70.0693, -46.0693, 70.7199, -49.7043, 71.205, -53.08, 71.549, -56.1271, 71.776, -58.776, 71.9763, -62.6013, 72, -64, 72, -68, 72, -72) + +[node name="Pointer" parent="LeftTrack" index="5"] +position = Vector2(56, -16) +rotation = -0.785398 +progress = 59.7186 + +[node name="RightTrack" parent="." index="1"] +curve = SubResource("Curve2D_jf8fx") + +[node name="MultiMeshInstance2D" parent="RightTrack" index="1"] +multimesh = SubResource("MultiMesh_n0m24") + +[node name="HeadPoint" parent="RightTrack" index="2"] +rotation = -2.36551e-14 + +[node name="TailPoint" parent="RightTrack" index="3"] +position = Vector2(88, 0) +rotation = -2.36551e-14 +progress = 88.0 + +[node name="TrackLine" parent="RightTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 3.78125, 1.9922e-12, 8.12109, 1.88954e-12, 10.7905, 1.8264e-12, 13.75, 1.75639e-12, 16.9673, 1.68029e-12, 20.4102, 1.59885e-12, 24.0464, 1.51283e-12, 27.8438, 1.423e-12, 31.77, 1.33013e-12, 35.793, 1.23496e-12, 39.8804, 1.13828e-12, 44, 1.04082e-12, 48.1196, 9.43375e-13, 52.207, 8.46687e-13, 56.23, 7.51523e-13, 60.1562, 6.58647e-13, 63.9536, 5.6882e-13, 67.5898, 4.82805e-13, 71.0327, 4.01363e-13, 74.25, 3.25258e-13, 77.2095, 2.55251e-13, 79.8789, 1.92105e-13, 84.2188, 8.94459e-14, 88, 0) + +[node name="Pointer" parent="RightTrack" index="5"] +position = Vector2(44, 1.04082e-12) +rotation = -2.36551e-14 +progress = 44.0 + +[editable path="LeftTrack"] +[editable path="RightTrack"] diff --git a/prefabs/TrackSwitches/TrackSwitch_LeftStraight_Right45Curve.tscn b/prefabs/TrackSwitches/TrackSwitch_LeftStraight_Right45Curve.tscn new file mode 100644 index 0000000..5b6ae57 --- /dev/null +++ b/prefabs/TrackSwitches/TrackSwitch_LeftStraight_Right45Curve.tscn @@ -0,0 +1,91 @@ +[gd_scene load_steps=7 format=3 uid="uid://dd6cvx5sfi3up"] + +[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="1_6j8r3"] + +[sub_resource type="Curve2D" id="Curve2D_81xyj"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 96, 0) +} +point_count = 2 + +[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_55w7u"] +resource_local_to_scene = true +instance_count = 10 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(1, 2.16838e-14, 0, 5, -2.16838e-14, 1, 0, 1.97323e-12, 1, 2.16839e-14, 0, 15, -2.16839e-14, 1, 0, 1.75639e-12, 1, 2.16839e-14, 0, 25, -2.16839e-14, 1, 0, 1.53955e-12, 1, 2.16838e-14, 0, 35, -2.16838e-14, 1, 0, 1.32272e-12, 1, 2.16838e-14, 0, 45, -2.16838e-14, 1, 0, 1.10588e-12, 1, 2.16839e-14, 0, 55, -2.16839e-14, 1, 0, 8.89038e-13, 1, 2.16838e-14, 0, 65, -2.16838e-14, 1, 0, 6.72199e-13, 1, 2.16838e-14, 0, 75, -2.16838e-14, 1, 0, 4.55361e-13, 1, 2.16839e-14, 0, 85, -2.16839e-14, 1, 0, 2.38522e-13, 1, 2.16839e-14, 0, 95, -2.16839e-14, 1, 0, 2.16839e-14) + +[sub_resource type="Curve2D" id="Curve2D_jf8fx"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9491, -15.9704, 15.9491, 15.9704, 56, 16, 0, 0, 0, 0, 80, 40, 0, 0, 0, 0, 88, 48) +} +point_count = 5 + +[sub_resource type="MultiMesh" id="MultiMesh_n0m24"] +resource_local_to_scene = true +instance_count = 10 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999912, -0.0132958, 0, 5, 0.0132958, 0.999912, 0, 7.80619e-13, 0.993157, -0.116789, 0, 14.9862, 0.116789, 0.993157, 0, 0.410031, 0.978234, -0.207504, 0, 24.8843, 0.207504, 0.978234, 0, 1.80522, 0.945319, -0.326147, 0, 34.5931, 0.326147, 0.945319, 0, 4.1747, 0.88189, -0.471456, 0, 43.911, 0.471456, 0.88189, 0, 7.77285, 0.752086, -0.659065, 0, 52.4581, 0.659065, 0.752086, 0, 12.9232, 0.706809, -0.707405, 0, 59.7496, 0.707405, 0.706809, 0, 19.7539, 0.707076, -0.707138, 0, 66.8183, 0.707138, 0.707076, 0, 26.8274, 0.707461, -0.706752, 0, 73.8899, 0.706752, 0.707461, 0, 33.8979, 0.707107, -0.707107, 0, 80.965, 0.707107, 0.707107, 0, 40.965) + +[node name="TrackSwitch" instance=ExtResource("1_6j8r3")] + +[node name="LeftTrack" parent="." index="0"] +curve = SubResource("Curve2D_81xyj") + +[node name="MultiMeshInstance2D" parent="LeftTrack" index="1"] +multimesh = SubResource("MultiMesh_55w7u") + +[node name="HeadPoint" parent="LeftTrack" index="2"] +rotation = -2.16839e-14 + +[node name="TailPoint" parent="LeftTrack" index="3"] +position = Vector2(96, 0) +rotation = -2.16839e-14 +progress = 96.0 + +[node name="TrackLine" parent="LeftTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4.125, 1.9922e-12, 8.85938, 1.88954e-12, 11.7715, 1.8264e-12, 15, 1.75639e-12, 18.5098, 1.68029e-12, 22.2656, 1.59885e-12, 26.2324, 1.51283e-12, 30.375, 1.423e-12, 34.6582, 1.33013e-12, 39.0469, 1.23496e-12, 43.5059, 1.13828e-12, 48, 1.04082e-12, 52.4941, 9.43375e-13, 56.9531, 8.46687e-13, 61.3418, 7.51523e-13, 65.625, 6.58647e-13, 69.7676, 5.6882e-13, 73.7344, 4.82805e-13, 77.4902, 4.01363e-13, 81, 3.25258e-13, 84.2285, 2.55251e-13, 87.1406, 1.92105e-13, 91.875, 8.94459e-14, 96, 0) + +[node name="Pointer" parent="LeftTrack" index="5"] +position = Vector2(48, 1.04082e-12) +rotation = -2.16839e-14 +progress = 48.0 + +[node name="RightTrack" parent="." index="1"] +curve = SubResource("Curve2D_jf8fx") + +[node name="MultiMeshInstance2D" parent="RightTrack" index="1"] +multimesh = SubResource("MultiMesh_n0m24") + +[node name="HeadPoint" parent="RightTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="RightTrack" index="3"] +position = Vector2(88, 48) +rotation = 0.785398 +progress = 104.949 + +[node name="TrackLine" parent="RightTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40834, 0.0324641, 13.2572, 0.254163, 15.9204, 0.494243, 18.9822, 0.851555, 22.3719, 1.3494, 26.0191, 2.0111, 29.8532, 2.85995, 33.8036, 3.91926, 37.7999, 5.21234, 41.7715, 6.76249, 45.6478, 8.59302, 49.3584, 10.7272, 52.8326, 13.1885, 56, 16, 58.8979, 18.9014, 61.6104, 21.6165, 64.1373, 24.1453, 66.4785, 26.4875, 68.6337, 28.6431, 70.6026, 30.612, 73.9809, 33.9889, 76.6116, 36.6172, 78.4928, 38.4958, 80, 40, 81.25, 41.25, 84, 44, 86.75, 46.75, 88, 48) + +[node name="Pointer" parent="RightTrack" index="5"] +position = Vector2(50.4243, 11.4283) +rotation = 0.597223 +progress = 52.4745 + +[editable path="LeftTrack"] +[editable path="RightTrack"] diff --git a/prefabs/TrackSwitches/TrackSwitch_LeftStraight_Right90Curve.tscn b/prefabs/TrackSwitches/TrackSwitch_LeftStraight_Right90Curve.tscn new file mode 100644 index 0000000..9f962c7 --- /dev/null +++ b/prefabs/TrackSwitches/TrackSwitch_LeftStraight_Right90Curve.tscn @@ -0,0 +1,91 @@ +[gd_scene load_steps=7 format=3 uid="uid://bjejtrah22b5a"] + +[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="1_earjp"] + +[sub_resource type="Curve2D" id="Curve2D_81xyj"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 96, 0) +} +point_count = 2 + +[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_55w7u"] +resource_local_to_scene = true +instance_count = 10 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(1, 2.16838e-14, 0, 5, -2.16838e-14, 1, 0, 1.97323e-12, 1, 2.16839e-14, 0, 15, -2.16839e-14, 1, 0, 1.75639e-12, 1, 2.16839e-14, 0, 25, -2.16839e-14, 1, 0, 1.53955e-12, 1, 2.16838e-14, 0, 35, -2.16838e-14, 1, 0, 1.32272e-12, 1, 2.16838e-14, 0, 45, -2.16838e-14, 1, 0, 1.10588e-12, 1, 2.16839e-14, 0, 55, -2.16839e-14, 1, 0, 8.89038e-13, 1, 2.16838e-14, 0, 65, -2.16838e-14, 1, 0, 6.72199e-13, 1, 2.16838e-14, 0, 75, -2.16838e-14, 1, 0, 4.55361e-13, 1, 2.16839e-14, 0, 85, -2.16839e-14, 1, 0, 2.38522e-13, 1, 2.16839e-14, 0, 95, -2.16839e-14, 1, 0, 2.16839e-14) + +[sub_resource type="Curve2D" id="Curve2D_jf8fx"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -16.1066, -16.064, 16.1066, 16.064, 56, 16, 0, 0, 0, 0, 72, 64, 0, 0, 0, 0, 72, 72) +} +point_count = 5 + +[sub_resource type="MultiMesh" id="MultiMesh_n0m24"] +resource_local_to_scene = true +instance_count = 12 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999924, -0.0123415, 0, 5, 0.0123415, 0.999924, 0, 7.80619e-13, 0.993282, -0.11572, 0, 14.987, 0.11572, 0.993282, 0, 0.395749, 0.978271, -0.207329, 0, 24.8862, 0.207329, 0.978271, 0, 1.78218, 0.945024, -0.327002, 0, 34.5937, 0.327002, 0.945024, 0, 4.15614, 0.881373, -0.472421, 0, 43.9079, 0.472421, 0.881373, 0, 7.7638, 0.750299, -0.661099, 0, 52.451, 0.661099, 0.750299, 0, 12.9213, 0.551747, -0.834012, 0, 59.4334, 0.834012, 0.551747, 0, 20.0302, 0.387606, -0.921825, 0, 64.5107, 0.921825, 0.387606, 0, 28.6199, 0.256107, -0.966648, 0, 68.0483, 0.966648, 0.256107, 0, 37.9617, 0.156817, -0.987628, 0, 70.3395, 0.987628, 0.156817, 0, 47.6898, 0.0618072, -0.998088, 0, 71.6636, 0.998088, 0.0618072, 0, 57.5973, -4.37114e-08, -1, 0, 72, 1, -4.37114e-08, 0, 67.587) + +[node name="TrackSwitch" instance=ExtResource("1_earjp")] + +[node name="LeftTrack" parent="." index="0"] +curve = SubResource("Curve2D_81xyj") + +[node name="MultiMeshInstance2D" parent="LeftTrack" index="1"] +multimesh = SubResource("MultiMesh_55w7u") + +[node name="HeadPoint" parent="LeftTrack" index="2"] +rotation = -2.16839e-14 + +[node name="TailPoint" parent="LeftTrack" index="3"] +position = Vector2(96, 0) +rotation = -2.16839e-14 +progress = 96.0 + +[node name="TrackLine" parent="LeftTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4.125, 1.9922e-12, 8.85938, 1.88954e-12, 11.7715, 1.8264e-12, 15, 1.75639e-12, 18.5098, 1.68029e-12, 22.2656, 1.59885e-12, 26.2324, 1.51283e-12, 30.375, 1.423e-12, 34.6582, 1.33013e-12, 39.0469, 1.23496e-12, 43.5059, 1.13828e-12, 48, 1.04082e-12, 52.4941, 9.43375e-13, 56.9531, 8.46687e-13, 61.3418, 7.51523e-13, 65.625, 6.58647e-13, 69.7676, 5.6882e-13, 73.7344, 4.82805e-13, 77.4902, 4.01363e-13, 81, 3.25258e-13, 84.2285, 2.55251e-13, 87.1406, 1.92105e-13, 91.875, 8.94459e-14, 96, 0) + +[node name="Pointer" parent="LeftTrack" index="5"] +position = Vector2(48, 1.04082e-12) +rotation = -2.16839e-14 +progress = 48.0 + +[node name="RightTrack" parent="." index="1"] +curve = SubResource("Curve2D_jf8fx") + +[node name="MultiMeshInstance2D" parent="RightTrack" index="1"] +multimesh = SubResource("MultiMesh_n0m24") + +[node name="HeadPoint" parent="RightTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="RightTrack" index="3"] +position = Vector2(72, 72) +rotation = 1.5708 +progress = 119.413 + +[node name="TrackLine" parent="RightTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40188, 0.028625, 13.235, 0.241, 15.8887, 0.475391, 18.9406, 0.826875, 22.321, 1.31917, 25.96, 1.976, 29.7878, 2.82108, 33.7344, 3.87813, 37.7301, 5.17086, 41.705, 6.723, 45.5893, 8.55827, 49.3131, 10.7004, 52.8067, 13.173, 56, 16, 58.834, 19.1863, 61.3119, 22.6746, 63.4576, 26.3949, 65.295, 30.277, 66.848, 34.251, 68.1406, 38.2469, 69.1966, 42.1945, 70.04, 46.024, 70.6946, 49.6652, 71.1844, 53.0481, 71.5332, 56.1027, 71.765, 58.759, 71.9731, 62.5964, 72, 64, 72, 68, 72, 72) + +[node name="Pointer" parent="RightTrack" index="5"] +position = Vector2(56.0042, 16.0042) +rotation = 0.784236 +progress = 59.7065 + +[editable path="LeftTrack"] +[editable path="RightTrack"] diff --git a/prefabs/TrackSwitches/TrackSwitch_Right45Curve_Right90Curve.tscn b/prefabs/TrackSwitches/TrackSwitch_Right45Curve_Right90Curve.tscn new file mode 100644 index 0000000..218b2cf --- /dev/null +++ b/prefabs/TrackSwitches/TrackSwitch_Right45Curve_Right90Curve.tscn @@ -0,0 +1,91 @@ +[gd_scene load_steps=7 format=3 uid="uid://dvt4wgess2jyj"] + +[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="1_bylgj"] + +[sub_resource type="Curve2D" id="Curve2D_81xyj"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -16.0349, -15.9716, 16.0349, 15.9716, 56, 16, 0, 0, 0, 0, 80, 40, 0, 0, 0, 0, 104, 64) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_55w7u"] +resource_local_to_scene = true +instance_count = 13 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999911, -0.013338, 0, 5, 0.013338, 0.999911, 0, 7.80619e-13, 0.99311, -0.117186, 0, 14.9862, 0.117186, 0.99311, 0, 0.411204, 0.978145, -0.207924, 0, 24.8837, 0.207924, 0.978145, 0, 1.81027, 0.945185, -0.326536, 0, 34.591, 0.326536, 0.945185, 0, 4.18571, 0.88196, -0.471324, 0, 43.9078, 0.471324, 0.88196, 0, 7.78681, 0.753186, -0.657808, 0, 52.4575, 0.657808, 0.753186, 0, 12.9333, 0.707989, -0.706223, 0, 59.7627, 0.706223, 0.707989, 0, 19.7499, 0.707201, -0.707013, 0, 66.8408, 0.707013, 0.707201, 0, 26.8139, 0.706054, -0.708158, 0, 73.9103, 0.708158, 0.706054, 0, 33.8865, 0.707107, -0.707107, 0, 80.9695, 0.707107, 0.707107, 0, 40.9695, 0.707106, -0.707108, 0, 88.0405, 0.707108, 0.707106, 0, 48.0405, 0.707107, -0.707106, 0, 95.1116, 0.707106, 0.707107, 0, 55.1116, 0.707107, -0.707107, 0, 102.183, 0.707107, 0.707107, 0, 62.1827) + +[sub_resource type="Curve2D" id="Curve2D_jf8fx"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9956, -15.9894, 15.9956, 15.9894, 56, 16, 0, 0, 0, 0, 72, 56, 0, 0, 0, 0, 72, 64) +} +point_count = 5 + +[sub_resource type="MultiMesh" id="MultiMesh_n0m24"] +resource_local_to_scene = true +instance_count = 11 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999914, -0.0131121, 0, 5, 0.0131121, 0.999914, 0, 7.80619e-13, 0.993174, -0.116643, 0, 14.9864, 0.116643, 0.993174, 0, 0.407375, 0.978226, -0.207541, 0, 24.8846, 0.207541, 0.978226, 0, 1.80148, 0.945237, -0.326386, 0, 34.5928, 0.326386, 0.945237, 0, 4.17289, 0.881798, -0.471627, 0, 43.9098, 0.471627, 0.881798, 0, 7.77345, 0.750554, -0.660809, 0, 52.4566, 0.660809, 0.750554, 0, 12.9246, 0.580281, -0.814416, 0, 59.5014, 0.814416, 0.580281, 0, 19.9817, 0.420537, -0.907275, 0, 64.909, 0.907275, 0.420537, 0, 28.3721, 0.274261, -0.961655, 0, 68.7216, 0.961655, 0.274261, 0, 37.6024, 0.131685, -0.991292, 0, 71.1074, 0.991292, 0.131685, 0, 47.3038, -4.37114e-08, -1, 0, 72, 1, -4.37114e-08, 0, 57.2519) + +[node name="TrackSwitch" instance=ExtResource("1_bylgj")] + +[node name="LeftTrack" parent="." index="0"] +curve = SubResource("Curve2D_81xyj") + +[node name="MultiMeshInstance2D" parent="LeftTrack" index="1"] +multimesh = SubResource("MultiMesh_55w7u") + +[node name="HeadPoint" parent="LeftTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="LeftTrack" index="3"] +position = Vector2(104, 64) +rotation = 0.785398 +progress = 127.57 + +[node name="TrackLine" parent="LeftTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40482, 0.0324149, 13.2451, 0.253994, 15.9031, 0.494002, 18.9595, 0.851238, 22.3442, 1.34902, 25.9869, 2.01065, 29.8175, 2.85945, 33.7659, 3.91873, 37.7619, 5.2118, 41.7353, 6.76198, 45.6159, 8.59258, 49.3337, 10.7269, 52.8185, 13.1883, 56, 16, 58.912, 18.9016, 61.635, 21.6168, 64.1692, 24.1457, 66.5147, 26.488, 68.6717, 28.6437, 70.6403, 30.6125, 74.0131, 33.9893, 76.6342, 36.6175, 78.5049, 38.496, 80, 40, 81.0312, 41.0312, 83.75, 43.75, 85.5664, 45.5664, 87.5938, 47.5938, 89.7617, 49.7617, 92, 52, 94.2383, 54.2383, 96.4062, 56.4062, 98.4336, 58.4336, 100.25, 60.25, 102.969, 62.9688, 104, 64) + +[node name="Pointer" parent="LeftTrack" index="5"] +position = Vector2(81.3648, 41.3648) +rotation = 0.785398 +progress = 95.6776 + +[node name="RightTrack" parent="." index="1"] +curve = SubResource("Curve2D_jf8fx") + +[node name="MultiMeshInstance2D" parent="RightTrack" index="1"] +multimesh = SubResource("MultiMesh_n0m24") + +[node name="HeadPoint" parent="RightTrack" index="2"] +rotation = -2.60206e-13 + +[node name="TailPoint" parent="RightTrack" index="3"] +position = Vector2(72, 64) +rotation = 1.5708 +progress = 111.748 + +[node name="TrackLine" parent="RightTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40643, 0.0316848, 13.2506, 0.251491, 15.911, 0.490416, 18.9699, 0.846545, 22.3569, 1.34327, 26.0017, 2.00397, 29.8339, 2.85206, 33.7832, 3.91091, 37.7793, 5.20392, 41.7519, 6.75447, 45.6305, 8.58597, 49.345, 10.7218, 52.8249, 13.1853, 56, 16, 58.8157, 19.0842, 61.28, 22.3095, 63.4163, 25.6289, 65.2481, 28.9955, 66.7988, 32.3625, 68.0918, 35.6828, 69.1505, 38.9097, 69.9984, 41.996, 70.6587, 44.895, 71.1551, 47.5597, 71.7494, 51.9985, 72, 56, 72, 60, 72, 64) + +[node name="Pointer" parent="RightTrack" index="5"] +position = Vector2(68.3721, 36.4824) +rotation = 1.24039 +progress = 83.8111 + +[editable path="LeftTrack"] +[editable path="RightTrack"] diff --git a/prefabs/Tracks/Track_45_Curve.tscn b/prefabs/Tracks/Track_45_Curve.tscn new file mode 100644 index 0000000..bf40952 --- /dev/null +++ b/prefabs/Tracks/Track_45_Curve.tscn @@ -0,0 +1,106 @@ +[gd_scene load_steps=9 format=3 uid="uid://bnivg4uv1nogr"] + +[ext_resource type="Script" path="res://scripts/Track.gd" id="1_q7qad"] +[ext_resource type="Texture2D" uid="uid://dyk30b1nt2gvq" path="res://assets/crosstie.png" id="2_wn6b0"] +[ext_resource type="PackedScene" uid="uid://btfdanletw1gi" path="res://prefabs/TrackJunction.tscn" id="3_imsw5"] +[ext_resource type="PackedScene" uid="uid://iw1demrx5nvt" path="res://prefabs/SignalButton.tscn" id="4_8oox5"] +[ext_resource type="Texture2D" uid="uid://dlgfnj8p01ym4" path="res://assets/track.png" id="5_rlsk6"] + +[sub_resource type="Curve2D" id="Curve2D_asyaa"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -136, 0, 0, 0, 0, 0, -128, 0, -16.8086, -8.04456, 16.8086, 8.04456, -80, 8, 0, 0, 0, 0, -48, 32, 0, 0, 0, 0, -40, 40) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_hmeh0"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_nb77j"] +resource_local_to_scene = true +instance_count = 11 +mesh = SubResource("ArrayMesh_hmeh0") +buffer = PackedFloat32Array(0.99998, -0.00625427, 0, -131, 0.00625427, 0.99998, 0, 0, 0.99821, -0.0597991, 0, -121.003, 0.0597991, 0.99821, 0, 0.201691, 0.993981, -0.109557, 0, -111.03, 0.109557, 0.993981, 0, 0.917158, 0.984565, -0.175017, 0, -101.111, 0.175017, 0.984565, 0, 2.17038, 0.962464, -0.27141, 0, -91.3075, 0.27141, 0.962464, 0, 4.12544, 0.902641, -0.430394, 0, -81.8129, 0.430394, 0.902641, 0, 7.22449, 0.840226, -0.542236, 0, -72.9645, 0.542236, 0.840226, 0, 11.8598, 0.791097, -0.611691, 0, -64.688, 0.611691, 0.791097, 0, 17.4654, 0.74764, -0.664105, 0, -56.8854, 0.664105, 0.74764, 0, 23.7164, 0.708123, -0.706089, 0, -49.5264, 0.706089, 0.708123, 0, 30.4837, 0.707107, -0.707107, 0, -42.4503, 0.707107, 0.707107, 0, 37.5497) + +[node name="Track" type="Path2D"] +position = Vector2(144, 0) +curve = SubResource("Curve2D_asyaa") +script = ExtResource("1_q7qad") +metadata/_edit_group_ = true + +[node name="Crosstie" type="MeshInstance2D" parent="."] +visible = false +position = Vector2(-50, -50) +mesh = SubResource("ArrayMesh_hmeh0") +texture = ExtResource("2_wn6b0") + +[node name="MultiMeshInstance2D" type="MultiMeshInstance2D" parent="."] +z_index = 1 +multimesh = SubResource("MultiMesh_nb77j") +texture = ExtResource("2_wn6b0") + +[node name="HeadPoint" type="PathFollow2D" parent="."] +position = Vector2(-136, 0) +loop = false + +[node name="TrackJunction" parent="HeadPoint" instance=ExtResource("3_imsw5")] +parent = NodePath("../..") +side = 2 + +[node name="SignalButton" parent="HeadPoint" instance=ExtResource("4_8oox5")] +visible = false +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = -15.0 +offset_bottom = 505.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="TailPoint" type="PathFollow2D" parent="."] +position = Vector2(-40, 40) +rotation = 0.785398 +progress = 108.465 +loop = false + +[node name="TrackJunction" parent="TailPoint" instance=ExtResource("3_imsw5")] +parent = NodePath("../..") +side = 3 + +[node name="SignalButton" parent="TailPoint" instance=ExtResource("4_8oox5")] +visible = false +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = 15.0 +offset_bottom = 535.0 +grow_horizontal = 2 +grow_vertical = 2 +rotation = 1.5708 +size_flags_horizontal = 4 +size_flags_vertical = 4 + +[node name="TrackLine" type="Line2D" parent="."] +z_index = 2 +points = PackedVector2Array(-136, 0, -132, 0, -128, 0, -126.627, 0.0137973, -122.864, 0.118734, -120.253, 0.235165, -117.244, 0.410126, -113.906, 0.655529, -110.303, 0.98329, -106.504, 1.40532, -102.574, 1.93354, -98.581, 2.57986, -94.5911, 3.3562, -90.6714, 4.27447, -86.8884, 5.34658, -83.309, 6.58445, -80, 8, -76.8707, 9.59523, -73.7991, 11.3409, -70.8052, 13.2021, -67.9089, 15.1438, -65.13, 17.1311, -62.4884, 19.129, -60.004, 21.1025, -57.6968, 23.0167, -55.5865, 24.8367, -53.693, 26.5274, -50.6363, 29.3813, -48, 32, -46.75, 33.25, -44, 36, -41.25, 38.75, -40, 40) +width = 20.0 +texture = ExtResource("5_rlsk6") +texture_mode = 1 +metadata/_edit_lock_ = true + +[connection signal="pressed" from="HeadPoint/SignalButton" to="." method="_on_head_signal_button_pressed" flags=18] +[connection signal="pressed" from="TailPoint/SignalButton" to="." method="_on_tail_signal_button_pressed" flags=18] diff --git a/prefabs/Tracks/Track_45_Curve_Mirrored.tscn b/prefabs/Tracks/Track_45_Curve_Mirrored.tscn new file mode 100644 index 0000000..21c961d --- /dev/null +++ b/prefabs/Tracks/Track_45_Curve_Mirrored.tscn @@ -0,0 +1,106 @@ +[gd_scene load_steps=9 format=3 uid="uid://cr8fyeohy7xyg"] + +[ext_resource type="Script" path="res://scripts/Track.gd" id="1_b74i5"] +[ext_resource type="Texture2D" uid="uid://dyk30b1nt2gvq" path="res://assets/crosstie.png" id="2_gfu3x"] +[ext_resource type="PackedScene" uid="uid://btfdanletw1gi" path="res://prefabs/TrackJunction.tscn" id="3_56qa2"] +[ext_resource type="PackedScene" uid="uid://iw1demrx5nvt" path="res://prefabs/SignalButton.tscn" id="4_e8wbh"] +[ext_resource type="Texture2D" uid="uid://dlgfnj8p01ym4" path="res://assets/track.png" id="5_hnvhd"] + +[sub_resource type="Curve2D" id="Curve2D_asyaa"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -136, 0, 0, 0, 0, 0, -128, 0, -15.9668, 7.95053, 15.9668, -7.95053, -80, -8, 0, 0, 0, 0, -48, -32, 0, 0, 0, 0, -40, -40) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_hmeh0"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_nb77j"] +resource_local_to_scene = true +instance_count = 11 +mesh = SubResource("ArrayMesh_hmeh0") +buffer = PackedFloat32Array(0.999975, 0.00704915, 0, -131, -0.00704915, 0.999975, 0, 0, 0.998224, 0.0595698, 0, -121.004, -0.0595698, 0.998224, 0, -0.211871, 0.994286, 0.106751, 0, -111.03, -0.106751, 0.994286, 0, -0.923444, 0.984957, 0.172802, 0, -101.108, -0.172802, 0.984957, 0, -2.1523, 0.963237, 0.268653, 0, -91.3005, -0.268653, 0.963237, 0, -4.08749, 0.896852, 0.442331, 0, -81.8124, -0.442331, 0.896852, 0, -7.19964, 0.835271, 0.549839, 0, -73.0285, -0.549839, 0.835271, 0, -11.9557, 0.79135, 0.611364, 0, -64.7946, -0.611364, 0.79135, 0, -17.6247, 0.753857, 0.657039, 0, -56.9775, -0.657039, 0.753857, 0, -23.8583, 0.71391, 0.700238, 0, -49.5344, -0.700238, 0.71391, 0, -30.534, 0.707107, 0.707107, 0, -42.4295, -0.707107, 0.707107, 0, -37.5705) + +[node name="Track" type="Path2D"] +position = Vector2(144, 0) +curve = SubResource("Curve2D_asyaa") +script = ExtResource("1_b74i5") +metadata/_edit_group_ = true + +[node name="Crosstie" type="MeshInstance2D" parent="."] +visible = false +position = Vector2(-50, -50) +mesh = SubResource("ArrayMesh_hmeh0") +texture = ExtResource("2_gfu3x") + +[node name="MultiMeshInstance2D" type="MultiMeshInstance2D" parent="."] +z_index = 1 +multimesh = SubResource("MultiMesh_nb77j") +texture = ExtResource("2_gfu3x") + +[node name="HeadPoint" type="PathFollow2D" parent="."] +position = Vector2(-136, 0) +loop = false + +[node name="TrackJunction" parent="HeadPoint" instance=ExtResource("3_56qa2")] +parent = NodePath("../..") +side = 2 + +[node name="SignalButton" parent="HeadPoint" instance=ExtResource("4_e8wbh")] +visible = false +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = -15.0 +offset_bottom = 505.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="TailPoint" type="PathFollow2D" parent="."] +position = Vector2(-40, -40) +rotation = -0.785398 +progress = 108.436 +loop = false + +[node name="TrackJunction" parent="TailPoint" instance=ExtResource("3_56qa2")] +parent = NodePath("../..") +side = 3 + +[node name="SignalButton" parent="TailPoint" instance=ExtResource("4_e8wbh")] +visible = false +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = 15.0 +offset_bottom = 535.0 +grow_horizontal = 2 +grow_vertical = 2 +rotation = 1.5708 +size_flags_horizontal = 4 +size_flags_vertical = 4 + +[node name="TrackLine" type="Line2D" parent="."] +z_index = 2 +points = PackedVector2Array(-136, 0, -132, 0, -128, 0, -126.592, -0.0176542, -122.745, -0.131957, -120.083, -0.254106, -117.022, -0.43492, -113.634, -0.685902, -109.988, -1.01855, -106.154, -1.44437, -102.204, -1.97487, -98.2079, -2.62153, -94.236, -3.39587, -90.3587, -4.30939, -86.6467, -5.37358, -83.1703, -6.59995, -80, -8, -77.0094, -9.57974, -74.0408, -11.3139, -71.1178, -13.1672, -68.264, -15.1041, -65.503, -17.0894, -62.8584, -19.0876, -60.3537, -21.0634, -58.0125, -22.9814, -55.8584, -24.8063, -53.915, -26.5026, -50.7547, -29.368, -48, -32, -46.75, -33.25, -44, -36, -41.25, -38.75, -40, -40) +width = 20.0 +texture = ExtResource("5_hnvhd") +texture_mode = 1 +metadata/_edit_lock_ = true + +[connection signal="pressed" from="HeadPoint/SignalButton" to="." method="_on_head_signal_button_pressed" flags=18] +[connection signal="pressed" from="TailPoint/SignalButton" to="." method="_on_tail_signal_button_pressed" flags=18] diff --git a/prefabs/Tracks/Track_90_Curve_Large.tscn b/prefabs/Tracks/Track_90_Curve_Large.tscn new file mode 100644 index 0000000..5586fc3 --- /dev/null +++ b/prefabs/Tracks/Track_90_Curve_Large.tscn @@ -0,0 +1,104 @@ +[gd_scene load_steps=9 format=3 uid="uid://bknekykd6qsdk"] + +[ext_resource type="Script" path="res://scripts/Track.gd" id="1_mlf3p"] +[ext_resource type="Texture2D" uid="uid://dyk30b1nt2gvq" path="res://assets/crosstie.png" id="2_u1ttr"] +[ext_resource type="PackedScene" uid="uid://btfdanletw1gi" path="res://prefabs/TrackJunction.tscn" id="3_dbgdd"] +[ext_resource type="PackedScene" uid="uid://iw1demrx5nvt" path="res://prefabs/SignalButton.tscn" id="4_ijhon"] +[ext_resource type="Texture2D" uid="uid://dlgfnj8p01ym4" path="res://assets/track.png" id="5_8gp8p"] + +[sub_resource type="Curve2D" id="Curve2D_asyaa"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -136, 0, 0, 0, 0, 0, -128, 0, -63.7489, -64.5039, 63.7489, 64.5039, 64, 64, 0, 0, 0, 0, 128, 256, 0, 0, 0, 0, 128, 264) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_hmeh0"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_nb77j"] +resource_local_to_scene = true +instance_count = 43 +mesh = SubResource("ArrayMesh_hmeh0") +buffer = PackedFloat32Array(0.99999, -0.00447102, 0, -131, 0.00447102, 0.99999, 0, 0, 0.99909, -0.0426574, 0, -121.002, 0.0426574, 0.99909, 0, 0.153322, 0.997582, -0.0695048, 0, -111.015, 0.0695048, 0.997582, 0, 0.653656, 0.995641, -0.0932723, 0, -101.044, 0.0932723, 0.995641, 0, 1.41022, 0.993185, -0.116547, 0, -91.0934, 0.116547, 0.993185, 0, 2.40264, 0.990199, -0.139662, 0, -81.1684, 0.139662, 0.990199, 0, 3.623, 0.986696, -0.162577, 0, -71.2746, 0.162577, 0.986696, 0, 5.07507, 0.982471, -0.186415, 0, -61.4184, 0.186415, 0.982471, 0, 6.76295, 0.977158, -0.212514, 0, -51.6064, 0.212514, 0.977158, 0, 8.69108, 0.971289, -0.237902, 0, -41.8489, 0.237902, 0.971289, 0, 10.8787, 0.963668, -0.267104, 0, -32.1547, 0.267104, 0.963668, 0, 13.3308, 0.955169, -0.296062, 0, -22.5385, 0.296062, 0.955169, 0, 16.073, 0.944509, -0.328487, 0, -13.0112, 0.328487, 0.944509, 0, 19.1096, 0.931989, -0.362486, 0, -3.59682, 0.362486, 0.931989, 0, 22.4797, 0.917311, -0.398172, 0, 5.68769, 0.398172, 0.917311, 0, 26.1921, 0.898758, -0.438446, 0, 14.8187, 0.438446, 0.898758, 0, 30.2676, 0.877306, -0.479932, 0, 23.7542, 0.479932, 0.877306, 0, 34.7549, 0.851942, -0.523637, 0, 32.4661, 0.523637, 0.851942, 0, 39.6616, 0.820015, -0.572342, 0, 40.9129, 0.572342, 0.820015, 0, 45.0117, 0.783383, -0.621539, 0, 49.0239, 0.621539, 0.783383, 0, 50.8579, 0.740775, -0.671754, 0, 56.7546, 0.671754, 0.740775, 0, 57.1975, 0.688514, -0.725223, 0, 64.0412, 0.725223, 0.688514, 0, 64.0429, 0.638634, -0.769511, 0, 70.8005, 0.769511, 0.638634, 0, 71.4096, 0.59006, -0.807359, 0, 77.0638, 0.807359, 0.59006, 0, 79.2024, 0.540678, -0.84123, 0, 82.8418, 0.84123, 0.540678, 0, 87.3622, 0.496784, -0.867874, 0, 88.137, 0.867874, 0.496784, 0, 95.8435, 0.455424, -0.890274, 0, 92.9996, 0.890274, 0.455424, 0, 104.58, 0.414387, -0.910101, 0, 97.4523, 0.910101, 0.414387, 0, 113.533, 0.378385, -0.925648, 0, 101.505, 0.925648, 0.378385, 0, 122.674, 0.344737, -0.938699, 0, 105.203, 0.938699, 0.344737, 0, 131.965, 0.311297, -0.950313, 0, 108.566, 0.950313, 0.311297, 0, 141.381, 0.28205, -0.9594, 0, 111.605, 0.9594, 0.28205, 0, 150.908, 0.253762, -0.967267, 0, 114.356, 0.967267, 0.253762, 0, 160.522, 0.226935, -0.97391, 0, 116.822, 0.97391, 0.226935, 0, 170.212, 0.201515, -0.979485, 0, 119.03, 0.979485, 0.201515, 0, 179.965, 0.177902, -0.984048, 0, 120.984, 0.984048, 0.177902, 0, 189.772, 0.154092, -0.988056, 0, 122.701, 0.988056, 0.154092, 0, 199.624, 0.131261, -0.991348, 0, 124.186, 0.991348, 0.131261, 0, 209.512, 0.109307, -0.994008, 0, 125.444, 0.994008, 0.109307, 0, 219.433, 0.0860082, -0.996294, 0, 126.477, 0.996294, 0.0860082, 0, 229.379, 0.061393, -0.998114, 0, 127.277, 0.998114, 0.061393, 0, 239.347, 0.0309284, -0.999522, 0, 127.821, 0.999522, 0.0309284, 0, 249.332, -4.37114e-08, -1, 0, 128, 1, -4.37114e-08, 0, 259.329) + +[node name="Track" type="Path2D"] +curve = SubResource("Curve2D_asyaa") +script = ExtResource("1_mlf3p") + +[node name="Crosstie" type="MeshInstance2D" parent="."] +visible = false +position = Vector2(-50, -50) +mesh = SubResource("ArrayMesh_hmeh0") +texture = ExtResource("2_u1ttr") + +[node name="MultiMeshInstance2D" type="MultiMeshInstance2D" parent="."] +z_index = 1 +multimesh = SubResource("MultiMesh_nb77j") +texture = ExtResource("2_u1ttr") + +[node name="HeadPoint" type="PathFollow2D" parent="."] +position = Vector2(-136, 0) +loop = false + +[node name="TrackJunction" parent="HeadPoint" instance=ExtResource("3_dbgdd")] +parent = NodePath("../..") +side = 2 + +[node name="SignalButton" parent="HeadPoint" instance=ExtResource("4_ijhon")] +visible = false +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = -15.0 +offset_bottom = 505.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="TailPoint" type="PathFollow2D" parent="."] +position = Vector2(128, 264) +rotation = 1.5708 +progress = 429.671 +loop = false + +[node name="TrackJunction" parent="TailPoint" instance=ExtResource("3_dbgdd")] +parent = NodePath("../..") +side = 3 + +[node name="SignalButton" parent="TailPoint" instance=ExtResource("4_ijhon")] +visible = false +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = 15.0 +offset_bottom = 535.0 +grow_horizontal = 2 +grow_vertical = 2 +rotation = 1.5708 +size_flags_horizontal = 4 +size_flags_vertical = 4 + +[node name="TrackLine" type="Line2D" parent="."] +z_index = 2 +points = PackedVector2Array(-136, 0, -132, 0, -128, 0, -126.544, 0.010089, -122.365, 0.104332, -119.342, 0.213001, -115.744, 0.378694, -111.607, 0.613409, -106.965, 0.929139, -104.466, 1.12113, -101.854, 1.33788, -99.1332, 1.58088, -96.3088, 1.85163, -93.3847, 2.15163, -90.3654, 2.48238, -87.2553, 2.84539, -84.0588, 3.24214, -80.7803, 3.67413, -77.4242, 4.14288, -73.995, 4.64988, -70.497, 5.19662, -66.9347, 5.7846, -63.3125, 6.41534, -59.6347, 7.09032, -55.9058, 7.81104, -52.1303, 8.57901, -48.3125, 9.39572, -44.4568, 10.2627, -40.5676, 11.1814, -36.6494, 12.1533, -32.7066, 13.18, -28.7435, 14.2629, -24.7647, 15.4036, -20.7744, 16.6035, -16.7772, 17.8641, -12.7773, 19.187, -8.77936, 20.5736, -4.78763, 22.0254, -0.806566, 23.544, 3.15943, 25.1309, 7.10593, 26.7874, 11.0285, 28.5152, 14.9228, 30.3157, 18.7844, 32.1905, 22.6089, 34.141, 26.3918, 36.1687, 30.1287, 38.2752, 33.8153, 40.4619, 37.4471, 42.7303, 41.0197, 45.082, 44.5287, 47.5184, 47.9697, 50.041, 51.3383, 52.6513, 54.63, 55.3509, 57.8405, 58.1412, 60.9653, 61.0237, 64, 64, 66.942, 67.069, 69.7924, 70.226, 72.5526, 73.4665, 75.2242, 76.7862, 77.8086, 80.1807, 80.3072, 83.6457, 82.7215, 87.1768, 85.0529, 90.7697, 87.3029, 94.4199, 89.4728, 98.1232, 91.5643, 101.875, 93.5786, 105.671, 95.5173, 109.508, 97.3818, 113.38, 99.1736, 117.283, 100.894, 121.213, 102.545, 125.165, 104.127, 129.136, 105.642, 133.12, 107.092, 137.114, 108.478, 141.113, 109.801, 145.112, 111.062, 149.108, 112.265, 153.096, 113.409, 157.072, 114.496, 161.031, 115.527, 164.969, 116.505, 168.881, 117.43, 172.764, 118.305, 176.612, 119.129, 180.422, 119.906, 184.189, 120.636, 187.909, 121.32, 191.577, 121.961, 195.189, 122.56, 198.741, 123.117, 202.228, 123.635, 205.646, 124.115, 208.991, 124.559, 212.258, 124.967, 215.443, 125.342, 218.541, 125.685, 221.549, 125.996, 224.461, 126.279, 227.274, 126.533, 229.982, 126.762, 232.583, 126.965, 235.071, 127.302, 239.691, 127.557, 243.809, 127.74, 247.389, 127.865, 250.396, 127.982, 254.552, 128, 256, 128, 260, 128, 264) +width = 20.0 +texture = ExtResource("5_8gp8p") +texture_mode = 1 +metadata/_edit_lock_ = true + +[connection signal="pressed" from="HeadPoint/SignalButton" to="." method="_on_head_signal_button_pressed" flags=18] +[connection signal="pressed" from="TailPoint/SignalButton" to="." method="_on_tail_signal_button_pressed" flags=18] diff --git a/prefabs/Tracks/Track_90_Curve_Medium.tscn b/prefabs/Tracks/Track_90_Curve_Medium.tscn new file mode 100644 index 0000000..1bfdc77 --- /dev/null +++ b/prefabs/Tracks/Track_90_Curve_Medium.tscn @@ -0,0 +1,104 @@ +[gd_scene load_steps=9 format=3 uid="uid://cgg0iicpep7b2"] + +[ext_resource type="Script" path="res://scripts/Track.gd" id="1_avuhy"] +[ext_resource type="Texture2D" uid="uid://dyk30b1nt2gvq" path="res://assets/crosstie.png" id="2_58l1w"] +[ext_resource type="PackedScene" uid="uid://btfdanletw1gi" path="res://prefabs/TrackJunction.tscn" id="3_2qf6x"] +[ext_resource type="PackedScene" uid="uid://iw1demrx5nvt" path="res://prefabs/SignalButton.tscn" id="4_nn4g1"] +[ext_resource type="Texture2D" uid="uid://dlgfnj8p01ym4" path="res://assets/track.png" id="5_dv415"] + +[sub_resource type="Curve2D" id="Curve2D_asyaa"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, -40.059, -39.9231, 40.059, 39.9231, 88, 40, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 128, 136) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_hmeh0"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_nb77j"] +resource_local_to_scene = true +instance_count = 21 +mesh = SubResource("ArrayMesh_hmeh0") +buffer = PackedFloat32Array(0.999885, -0.0151967, 0, -3, 0.0151967, 0.999885, 0, 0, 0.991147, -0.132768, 0, 6.97848, 0.132768, 0.991147, 0, 0.514451, 0.97704, -0.213057, 0, 16.8568, 0.213057, 0.97704, 0, 2.04871, 0.9591, -0.283066, 0, 26.585, 0.283066, 0.9591, 0, 4.35361, 0.936153, -0.351594, 0, 36.1225, 0.351594, 0.936153, 0, 7.35176, 0.909868, -0.414897, 0, 45.4217, 0.414897, 0.909868, 0, 11.0232, 0.876674, -0.481086, 0, 54.4353, 0.481086, 0.876674, 0, 15.3479, 0.840182, -0.542304, 0, 63.113, 0.542304, 0.840182, 0, 20.312, 0.79881, -0.601584, 0, 71.4131, 0.601584, 0.79881, 0, 25.8841, 0.755106, -0.655603, 0, 79.2886, 0.655603, 0.755106, 0, 32.0419, 0.704947, -0.70926, 0, 86.711, 0.70926, 0.704947, 0, 38.739, 0.649121, -0.760685, 0, 93.6308, 0.760685, 0.649121, 0, 45.9549, 0.595399, -0.80343, 0, 99.9968, 0.80343, 0.595399, 0, 53.6636, 0.535589, -0.844479, 0, 105.802, 0.844479, 0.535589, 0, 61.8023, 0.471631, -0.881796, 0, 111.004, 0.881796, 0.471631, 0, 70.3398, 0.406769, -0.913531, 0, 115.554, 0.913531, 0.406769, 0, 79.242, 0.340047, -0.940408, 0, 119.464, 0.940408, 0.340047, 0, 88.4434, 0.272679, -0.962105, 0, 122.695, 0.962105, 0.272679, 0, 97.9044, 0.19998, -0.9798, 0, 125.244, 0.9798, 0.19998, 0, 107.572, 0.12099, -0.992654, 0, 127.039, 0.992654, 0.12099, 0, 117.406, 0.00455207, -0.99999, 0, 127.977, 0.99999, 0.00455207, 0, 127.356) + +[node name="Track" type="Path2D"] +curve = SubResource("Curve2D_asyaa") +script = ExtResource("1_avuhy") + +[node name="Crosstie" type="MeshInstance2D" parent="."] +visible = false +position = Vector2(-50, -50) +mesh = SubResource("ArrayMesh_hmeh0") +texture = ExtResource("2_58l1w") + +[node name="MultiMeshInstance2D" type="MultiMeshInstance2D" parent="."] +z_index = 1 +multimesh = SubResource("MultiMesh_nb77j") +texture = ExtResource("2_58l1w") + +[node name="HeadPoint" type="PathFollow2D" parent="."] +position = Vector2(-8, 0) +loop = false + +[node name="TrackJunction" parent="HeadPoint" instance=ExtResource("3_2qf6x")] +parent = NodePath("../..") +side = 2 + +[node name="SignalButton" parent="HeadPoint" instance=ExtResource("4_nn4g1")] +visible = false +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = -15.0 +offset_bottom = 505.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="TailPoint" type="PathFollow2D" parent="."] +position = Vector2(128, 136) +rotation = 1.5708 +progress = 213.645 +loop = false + +[node name="TrackJunction" parent="TailPoint" instance=ExtResource("3_2qf6x")] +parent = NodePath("../..") +side = 3 + +[node name="SignalButton" parent="TailPoint" instance=ExtResource("4_nn4g1")] +visible = false +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = 15.0 +offset_bottom = 535.0 +grow_horizontal = 2 +grow_vertical = 2 +rotation = 1.5708 +size_flags_horizontal = 4 +size_flags_vertical = 4 + +[node name="TrackLine" type="Line2D" parent="."] +z_index = 2 +points = PackedVector2Array(-8, 0, -4, 0, 0, 0, 2.1382, 0.0812788, 4.6883, 0.270261, 8.1167, 0.635813, 12.3416, 1.23619, 14.7272, 1.64264, 17.2813, 2.12965, 19.9936, 2.70449, 22.854, 3.37445, 25.8521, 4.1468, 28.9779, 5.02883, 32.221, 6.02783, 35.5712, 7.15107, 39.0183, 8.40584, 42.5522, 9.79942, 46.1625, 11.3391, 49.8391, 13.0321, 53.5717, 14.8858, 57.3501, 16.9074, 61.1641, 19.1043, 65.0035, 21.4836, 68.858, 24.0528, 72.7174, 26.819, 76.5716, 29.7895, 80.4102, 32.9717, 82.3205, 34.6444, 84.2231, 36.3727, 86.1167, 38.1576, 88, 40, 89.8485, 41.8772, 91.6392, 43.765, 93.373, 45.6621, 95.0507, 47.5674, 98.2419, 51.397, 101.22, 55.2435, 103.993, 59.0967, 106.567, 62.9461, 108.95, 66.7815, 111.15, 70.5926, 113.173, 74.3691, 115.028, 78.1007, 116.721, 81.7771, 118.26, 85.3881, 119.653, 88.9233, 120.905, 92.3724, 122.026, 95.7251, 123.022, 98.9712, 123.901, 102.1, 124.669, 105.102, 125.335, 107.966, 125.906, 110.683, 126.389, 113.241, 126.791, 115.631, 127.383, 119.864, 127.741, 123.3, 127.924, 125.856, 128, 128, 128, 132, 128, 136) +width = 20.0 +texture = ExtResource("5_dv415") +texture_mode = 1 +metadata/_edit_lock_ = true + +[connection signal="pressed" from="HeadPoint/SignalButton" to="." method="_on_head_signal_button_pressed" flags=18] +[connection signal="pressed" from="TailPoint/SignalButton" to="." method="_on_tail_signal_button_pressed" flags=18] diff --git a/prefabs/Tracks/Track_90_Curve_Small.tscn b/prefabs/Tracks/Track_90_Curve_Small.tscn new file mode 100644 index 0000000..84f0cea --- /dev/null +++ b/prefabs/Tracks/Track_90_Curve_Small.tscn @@ -0,0 +1,103 @@ +[gd_scene load_steps=9 format=3 uid="uid://eky3mqmnjgl3"] + +[ext_resource type="Script" path="res://scripts/Track.gd" id="1_m1acl"] +[ext_resource type="Texture2D" uid="uid://dyk30b1nt2gvq" path="res://assets/crosstie.png" id="2_qbgkx"] +[ext_resource type="PackedScene" uid="uid://btfdanletw1gi" path="res://prefabs/TrackJunction.tscn" id="3_5bh4n"] +[ext_resource type="PackedScene" uid="uid://iw1demrx5nvt" path="res://prefabs/SignalButton.tscn" id="4_0a5rv"] +[ext_resource type="Texture2D" uid="uid://dlgfnj8p01ym4" path="res://assets/track.png" id="5_ftl6c"] + +[sub_resource type="Curve2D" id="Curve2D_asyaa"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 64, 0, -19.5338, -20.3622, 19.5338, 20.3622, 108, 20, 0, 0, 0, 0, 128, 64, 0, 0, 0, 0, 128, 72) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_hmeh0"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_nb77j"] +resource_local_to_scene = true +instance_count = 11 +mesh = SubResource("ArrayMesh_hmeh0") +buffer = PackedFloat32Array(0.99968, -0.0253068, 0, 61, 0.0253068, 0.99968, 0, 0, 0.981998, -0.188892, 0, 70.9599, 0.188892, 0.981998, 0, 0.687036, 0.941347, -0.337441, 0, 80.6761, 0.337441, 0.941347, 0, 2.99474, 0.876872, -0.480724, 0, 89.9316, 0.480724, 0.876872, 0, 6.7503, 0.793739, -0.608259, 0, 98.5016, 0.608259, 0.793739, 0, 11.8787, 0.69312, -0.720822, 0, 106.221, 0.720822, 0.69312, 0, 18.2175, 0.588908, -0.8082, 0, 112.866, 0.8082, 0.588908, 0, 25.6776, 0.474599, -0.880202, 0, 118.47, 0.880202, 0.474599, 0, 33.9464, 0.346064, -0.938211, 0, 122.921, 0.938211, 0.346064, 0, 42.8918, 0.210665, -0.977558, 0, 126.088, 0.977558, 0.210665, 0, 52.3694, 0.0339044, -0.999425, 0, 127.831, 0.999425, 0.0339044, 0, 62.2031) + +[node name="Track" type="Path2D"] +curve = SubResource("Curve2D_asyaa") +script = ExtResource("1_m1acl") + +[node name="Crosstie" type="MeshInstance2D" parent="."] +visible = false +position = Vector2(-50, -50) +mesh = SubResource("ArrayMesh_hmeh0") +texture = ExtResource("2_qbgkx") + +[node name="MultiMeshInstance2D" type="MultiMeshInstance2D" parent="."] +z_index = 1 +multimesh = SubResource("MultiMesh_nb77j") +texture = ExtResource("2_qbgkx") + +[node name="HeadPoint" type="PathFollow2D" parent="."] +position = Vector2(56, 0) +loop = false + +[node name="TrackJunction" parent="HeadPoint" instance=ExtResource("3_5bh4n")] +parent = NodePath("../..") +side = 2 + +[node name="SignalButton" parent="HeadPoint" instance=ExtResource("4_0a5rv")] +visible = false +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = -15.0 +offset_bottom = 505.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="TailPoint" type="PathFollow2D" parent="."] +position = Vector2(128, 72) +rotation = 1.5708 +progress = 114.805 +loop = false + +[node name="TrackJunction" parent="TailPoint" instance=ExtResource("3_5bh4n")] +parent = NodePath("../..") +side = 3 + +[node name="SignalButton" parent="TailPoint" instance=ExtResource("4_0a5rv")] +visible = false +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_top = 15.0 +offset_bottom = 535.0 +grow_horizontal = 2 +grow_vertical = 2 +rotation = 1.5708 +size_flags_horizontal = 4 +size_flags_vertical = 4 + +[node name="TrackLine" type="Line2D" parent="."] +z_index = 2 +points = PackedVector2Array(56, 0, 60, 0, 64, 0, 68.1281, 0.261568, 72.7714, 0.95919, 75.5871, 1.55782, 78.6748, 2.36418, 81.9915, 3.40916, 85.4939, 4.72365, 89.1392, 6.33853, 92.8842, 8.2847, 96.6858, 10.593, 100.501, 13.2945, 104.287, 16.4198, 106.155, 18.1511, 108, 20, 109.776, 21.9177, 111.444, 23.8497, 114.468, 27.7368, 117.099, 31.6218, 119.366, 35.4653, 121.294, 39.2279, 122.912, 42.8701, 124.247, 46.3526, 125.325, 49.6358, 126.175, 52.6805, 126.822, 55.4471, 127.622, 59.9884, 128, 64, 128, 68, 128, 72) +width = 20.0 +texture = ExtResource("5_ftl6c") +texture_mode = 1 + +[connection signal="pressed" from="HeadPoint/SignalButton" to="." method="_on_head_signal_button_pressed" flags=18] +[connection signal="pressed" from="TailPoint/SignalButton" to="." method="_on_tail_signal_button_pressed" flags=18] diff --git a/scenes/Level1.tscn b/scenes/Level1.tscn index eae965d..2aeb7b8 100644 --- a/scenes/Level1.tscn +++ b/scenes/Level1.tscn @@ -1,307 +1,252 @@ -[gd_scene load_steps=24 format=3 uid="uid://bhjkcskfwdbug"] - -[ext_resource type="PackedScene" uid="uid://d1xy67euifbh6" path="res://prefabs/Track.tscn" id="1_odec6"] -[ext_resource type="PackedScene" uid="uid://ctghq2lknpslx" path="res://prefabs/TrainStation.tscn" id="2_5wuhy"] -[ext_resource type="PackedScene" uid="uid://cq6ckyed0ps4t" path="res://prefabs/Level.tscn" id="2_gptj6"] -[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="2_h3h4n"] -[ext_resource type="Script" path="res://scripts/TracksController.gd" id="2_skwkk"] -[ext_resource type="PackedScene" uid="uid://c7r1kx700h11u" path="res://prefabs/TrainRoute.tscn" id="7_nktel"] -[ext_resource type="PackedScene" uid="uid://c4ncuqtx6xes" path="res://prefabs/TrainRouteStop.tscn" id="8_l78k2"] - -[sub_resource type="Curve2D" id="Curve2D_pcn80"] +[gd_scene load_steps=28 format=3 uid="uid://f00y8rjii1h1"] + +[ext_resource type="Script" path="res://scripts/TracksController.gd" id="2_ai76e"] +[ext_resource type="PackedScene" uid="uid://cq6ckyed0ps4t" path="res://prefabs/Level.tscn" id="2_l6rrh"] +[ext_resource type="PackedScene" uid="uid://cgg0iicpep7b2" path="res://prefabs/Tracks/Track_90_Curve_Medium.tscn" id="3_1radm"] +[ext_resource type="PackedScene" uid="uid://d1xy67euifbh6" path="res://prefabs/Track.tscn" id="3_ud27o"] +[ext_resource type="PackedScene" uid="uid://bnivg4uv1nogr" path="res://prefabs/Tracks/Track_45_Curve.tscn" id="5_2sq2s"] +[ext_resource type="PackedScene" uid="uid://ctghq2lknpslx" path="res://prefabs/TrainStation.tscn" id="5_jlsfp"] +[ext_resource type="PackedScene" uid="uid://cr8fyeohy7xyg" path="res://prefabs/Tracks/Track_45_Curve_Mirrored.tscn" id="6_e3k5x"] +[ext_resource type="PackedScene" uid="uid://c7r1kx700h11u" path="res://prefabs/TrainRoute.tscn" id="7_p34jf"] +[ext_resource type="PackedScene" uid="uid://dhhfykmc5w8mp" path="res://prefabs/TrackSwitches/TrackSwitch_Left90Curve_Left45Curve.tscn" id="7_rhne7"] +[ext_resource type="PackedScene" uid="uid://dvt4wgess2jyj" path="res://prefabs/TrackSwitches/TrackSwitch_Right45Curve_Right90Curve.tscn" id="8_j2k0u"] +[ext_resource type="PackedScene" uid="uid://c4ncuqtx6xes" path="res://prefabs/TrainRouteStop.tscn" id="8_xs6w7"] + +[sub_resource type="Curve2D" id="Curve2D_d88jc"] resource_local_to_scene = true _data = { -"points": PackedVector2Array(0, 0, 0, 0, 208, 112, -23.833, 36.0765, 23.833, -36.0765, 176, 32, 0, 0, 0, 0, 264, 0) +"points": PackedVector2Array(0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, -40.059, -39.9231, 40.059, 39.9231, 88, 40, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 128, 152) } -point_count = 3 +point_count = 5 -[sub_resource type="Curve2D" id="Curve2D_wvr62"] +[sub_resource type="Curve2D" id="Curve2D_frut4"] resource_local_to_scene = true _data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 96.1665, 5.65692) +"points": PackedVector2Array(0, 0, 0, 0, -64, -27, 0, 0, 0, 0, 103, 140) } point_count = 2 -[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] -_surfaces = [{ -"2d": true, -"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), -"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), -"format": 33558545, -"index_count": 6, -"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), -"primitive": 3, -"vertex_count": 4, -"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) -}] - -[sub_resource type="MultiMesh" id="MultiMesh_2dy52"] -resource_local_to_scene = true -instance_count = 10 -mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(0.998274, -0.0587227, 0, 4.99137, 0.0587227, 0.998274, 0, 0.293614, 0.998274, -0.0587227, 0, 14.9741, 0.0587227, 0.998274, 0, 0.880841, 0.998274, -0.0587227, 0, 24.9569, 0.0587227, 0.998274, 0, 1.46807, 0.998274, -0.0587227, 0, 34.9396, 0.0587227, 0.998274, 0, 2.05529, 0.998274, -0.0587227, 0, 44.9223, 0.0587227, 0.998274, 0, 2.64252, 0.998274, -0.0587228, 0, 54.9051, 0.0587228, 0.998274, 0, 3.22975, 0.998274, -0.0587226, 0, 64.8878, 0.0587226, 0.998274, 0, 3.81698, 0.998274, -0.0587228, 0, 74.8706, 0.0587228, 0.998274, 0, 4.4042, 0.998274, -0.0587228, 0, 84.8533, 0.0587228, 0.998274, 0, 4.99143, 0.998274, -0.0587227, 0, 94.8361, 0.0587227, 0.998274, 0, 5.57866) - -[sub_resource type="Curve2D" id="Curve2D_q6d23"] +[sub_resource type="Curve2D" id="Curve2D_1djnw"] resource_local_to_scene = true _data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, -18.0684, -18.0085, 18.0684, 18.0085, 62.2254, 16.9706, 0, 0, 0, 0, 96.1665, 50.9117) +"points": PackedVector2Array(0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, -40.059, -39.9231, 40.059, 39.9231, 88, 40, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 128, 136) } -point_count = 3 +point_count = 5 -[sub_resource type="MultiMesh" id="MultiMesh_yocj8"] +[sub_resource type="Curve2D" id="Curve2D_41wbj"] resource_local_to_scene = true -instance_count = 11 -mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(0.999049, -0.0436099, 0, 4.99933, 0.0436099, 0.999049, 0, 0.0488746, 0.994522, -0.104527, 0, 14.9811, 0.104527, 0.994522, 0, 0.627066, 0.985411, -0.170193, 0, 24.9078, 0.170193, 0.985411, 0, 1.82289, 0.967065, -0.254529, 0, 34.7237, 0.254529, 0.967065, 0, 3.71877, 0.92969, -0.368342, 0, 44.3161, 0.368342, 0.92969, 0, 6.52693, 0.849052, -0.528308, 0, 53.448, 0.528308, 0.849052, 0, 10.5731, 0.717449, -0.696611, 0, 61.547, 0.696611, 0.717449, 0, 16.3878, 0.707669, -0.706544, 0, 68.6724, 0.706544, 0.707669, 0, 23.4009, 0.707199, -0.707014, 0, 75.7479, 0.707014, 0.707199, 0, 30.4676, 0.706773, -0.70744, 0, 82.8188, 0.70744, 0.706773, 0, 37.5388, 0.706311, -0.707902, 0, 89.8854, 0.707902, 0.706311, 0, 44.6143) +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -136, 0, 0, 0, 0, 0, -128, 0, -16.8086, -8.04456, 16.8086, 8.04456, -80, 8, 0, 0, 0, 0, -48, 32, 0, 0, 0, 0, -40, 40) +} +point_count = 5 -[sub_resource type="Curve2D" id="Curve2D_mayfe"] +[sub_resource type="Curve2D" id="Curve2D_1ukf6"] resource_local_to_scene = true _data = { -"points": PackedVector2Array(0, 0, 0, 0, -4, 0, -9.2703, 24.8974, 9.2703, -24.8974, 56, -24, -1.38898, -2.48031, 1.38898, 2.48031, 40, -80) +"points": PackedVector2Array(0, 0, 0, 0, -28, -159, 0, 0, 0, 0, 272, 142) } -point_count = 3 +point_count = 2 -[sub_resource type="Curve2D" id="Curve2D_tytqk"] +[sub_resource type="Curve2D" id="Curve2D_sn01j"] resource_local_to_scene = true _data = { -"points": PackedVector2Array(0, 0, 0, 0, 200, 104, -6.62164, 38.4055, 6.62164, -38.4055, 152, 64, 1.11362, 0.890899, -1.11362, -0.890899, 168, 24) +"points": PackedVector2Array(0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, -40.059, -39.9231, 40.059, 39.9231, 88, 40, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 128, 136) } -point_count = 3 +point_count = 5 -[sub_resource type="Curve2D" id="Curve2D_mgg06"] +[sub_resource type="Curve2D" id="Curve2D_uq6se"] resource_local_to_scene = true _data = { -"points": PackedVector2Array(0, 0, 0, 0, -48, -16, 0, 0, 0, 0, 128, -16) +"points": PackedVector2Array(0, 0, 0, 0, -136, 0, 0, 0, 0, 0, -128, 0, -15.9668, 7.95053, 15.9668, -7.95053, -80, -8, 0, 0, 0, 0, -48, -32, 0, 0, 0, 0, -40, -40) } -point_count = 2 +point_count = 5 -[sub_resource type="Curve2D" id="Curve2D_rn445"] +[sub_resource type="Curve2D" id="Curve2D_tybvb"] resource_local_to_scene = true _data = { -"points": PackedVector2Array(4.49492, -5.61865, -4.49492, 5.61865, -64, -48, 8.30851, -5.48008, -8.30851, 5.48008, 280, 104) +"points": PackedVector2Array(0, 0, 0, 0, 0, 157, 0, 0, 0, 0, 253, -97) } point_count = 2 -[sub_resource type="Curve2D" id="Curve2D_00p67"] +[sub_resource type="Curve2D" id="Curve2D_kvg06"] resource_local_to_scene = true _data = { -"points": PackedVector2Array(0.350769, -0.420923, -0.350769, 0.420923, -108, -72, -2.51984, -37.1677, 2.51984, 37.1677, -32, -40, 0, 0, 0, 0, -72, 24) +"points": PackedVector2Array(0, 0, 0, 0, -24, 0, 0, 0, 0, 0, 0, 0, -40.059, -39.9231, 40.059, 39.9231, 88, 40, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 128, 136) } -point_count = 3 +point_count = 5 -[sub_resource type="Curve2D" id="Curve2D_2q1sk"] +[sub_resource type="Curve2D" id="Curve2D_k5b3m"] resource_local_to_scene = true _data = { -"points": PackedVector2Array(0.445953, 6.39199, -0.445953, -6.39199, -48, 48, 1.31102, 2.24746, -1.31102, -2.24746, 248, -112) +"points": PackedVector2Array(0, 0, 0, 0, -8, 55, 0, 0, 0, 0, 206, -159) } point_count = 2 -[sub_resource type="Curve2D" id="Curve2D_r25qh"] +[sub_resource type="Curve2D" id="Curve2D_b5u6y"] resource_local_to_scene = true _data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, -16.5134, 16.5816, 16.5134, -16.5816, 73.5391, -28.2843, 0, 0, 0, 0, 90.5097, -45.2549) +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -16.0349, -15.9716, 16.0349, 15.9716, 56, 16, 0, 0, 0, 0, 80, 40, 0, 0, 0, 0, 104, 64) } -point_count = 3 +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] -[sub_resource type="MultiMesh" id="MultiMesh_bq364"] +[sub_resource type="MultiMesh" id="MultiMesh_1tu7u"] resource_local_to_scene = true -instance_count = 10 +instance_count = 13 mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(0.973052, 0.230584, 0, 4.88223, -0.230584, 0.973052, 0, -1.07852, 0.966958, 0.254934, 0, 14.5981, -0.254934, 0.966958, 0, -3.44424, 0.959557, 0.281516, 0, 24.2506, -0.281516, 0.959557, 0, -6.05645, 0.949848, 0.312712, 0, 33.8255, -0.312712, 0.949848, 0, -8.93951, 0.935812, 0.352498, 0, 43.2949, -0.352498, 0.935812, 0, -12.1518, 0.913086, 0.407766, 0, 52.606, -0.407766, 0.913086, 0, -15.7957, 0.869407, 0.494097, 0, 61.6456, -0.494097, 0.869407, 0, -20.0638, 0.753243, 0.657743, 0, 70.1223, -0.657743, 0.753243, 0, -25.3463, 0.706087, 0.708125, 0, 77.4166, -0.708125, 0.706087, 0, -32.1762, 0.707437, 0.706777, 0, 84.4802, -0.706777, 0.707437, 0, -39.2547) +buffer = PackedFloat32Array(0.999911, -0.013338, 0, 5, 0.013338, 0.999911, 0, 7.80619e-13, 0.99311, -0.117186, 0, 14.9862, 0.117186, 0.99311, 0, 0.411204, 0.978145, -0.207924, 0, 24.8837, 0.207924, 0.978145, 0, 1.81027, 0.945185, -0.326536, 0, 34.591, 0.326536, 0.945185, 0, 4.18571, 0.88196, -0.471324, 0, 43.9078, 0.471324, 0.88196, 0, 7.78681, 0.753186, -0.657808, 0, 52.4575, 0.657808, 0.753186, 0, 12.9333, 0.707989, -0.706223, 0, 59.7627, 0.706223, 0.707989, 0, 19.7499, 0.707201, -0.707013, 0, 66.8408, 0.707013, 0.707201, 0, 26.8139, 0.706054, -0.708158, 0, 73.9103, 0.708158, 0.706054, 0, 33.8865, 0.707107, -0.707107, 0, 80.9695, 0.707107, 0.707107, 0, 40.9695, 0.707106, -0.707108, 0, 88.0405, 0.707108, 0.707106, 0, 48.0405, 0.707107, -0.707106, 0, 95.1116, 0.707106, 0.707107, 0, 55.1116, 0.707107, -0.707107, 0, 102.183, 0.707107, 0.707107, 0, 62.1827) -[sub_resource type="Curve2D" id="Curve2D_ys6kh"] +[sub_resource type="Curve2D" id="Curve2D_qar2q"] resource_local_to_scene = true _data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 79.196, -3.05176e-05) +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9956, -15.9894, 15.9956, 15.9894, 56, 16, 0, 0, 0, 0, 72, 56, 0, 0, 0, 0, 72, 64) } -point_count = 2 +point_count = 5 -[sub_resource type="MultiMesh" id="MultiMesh_nrtpx"] +[sub_resource type="MultiMesh" id="MultiMesh_1gawn"] resource_local_to_scene = true -instance_count = 8 +instance_count = 11 mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(1, 3.85343e-07, 0, 5, -3.85343e-07, 1, 0, -1.92671e-06, 1, 3.85343e-07, 0, 15, -3.85343e-07, 1, 0, -5.78014e-06, 1, 3.85343e-07, 0, 25, -3.85343e-07, 1, 0, -9.63357e-06, 1, 3.85343e-07, 0, 35, -3.85343e-07, 1, 0, -1.3487e-05, 1, 3.85343e-07, 0, 45, -3.85343e-07, 1, 0, -1.73404e-05, 1, 3.85343e-07, 0, 55, -3.85343e-07, 1, 0, -2.11938e-05, 1, 3.85343e-07, 0, 65, -3.85343e-07, 1, 0, -2.50473e-05, 1, 3.85342e-07, 0, 75, -3.85342e-07, 1, 0, -2.89007e-05) +buffer = PackedFloat32Array(0.999914, -0.0131121, 0, 5, 0.0131121, 0.999914, 0, 7.80619e-13, 0.993174, -0.116643, 0, 14.9864, 0.116643, 0.993174, 0, 0.407375, 0.978226, -0.207541, 0, 24.8846, 0.207541, 0.978226, 0, 1.80148, 0.945237, -0.326386, 0, 34.5928, 0.326386, 0.945237, 0, 4.17289, 0.881798, -0.471627, 0, 43.9098, 0.471627, 0.881798, 0, 7.77345, 0.750554, -0.660809, 0, 52.4566, 0.660809, 0.750554, 0, 12.9246, 0.580281, -0.814416, 0, 59.5014, 0.814416, 0.580281, 0, 19.9817, 0.420537, -0.907275, 0, 64.909, 0.907275, 0.420537, 0, 28.3721, 0.274261, -0.961655, 0, 68.7216, 0.961655, 0.274261, 0, 37.6024, 0.131685, -0.991292, 0, 71.1074, 0.991292, 0.131685, 0, 47.3038, -4.37114e-08, -1, 0, 72, 1, -4.37114e-08, 0, 57.2519) + +[sub_resource type="Curve2D" id="Curve2D_a7pxc"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 67, -219, 0, 0, 0, 0, 67, 217) +} +point_count = 2 [node name="Level1" type="Node2D"] +position = Vector2(-7, 24) [node name="CanvasLayer" type="CanvasLayer" parent="."] -[node name="Level" parent="CanvasLayer" instance=ExtResource("2_gptj6")] +[node name="Level" parent="CanvasLayer" instance=ExtResource("2_l6rrh")] grow_horizontal = 1 grow_vertical = 1 size_flags_horizontal = 3 size_flags_vertical = 3 [node name="Tracks" type="Node2D" parent="."] -script = ExtResource("2_skwkk") +script = ExtResource("2_ai76e") -[node name="Track" parent="Tracks" instance=ExtResource("1_odec6")] -position = Vector2(160, 96) -curve = SubResource("Curve2D_pcn80") +[node name="Track" parent="Tracks" instance=ExtResource("3_1radm")] +position = Vector2(105, 143) +rotation = -1.5708 +curve = SubResource("Curve2D_d88jc") + +[node name="Track3" parent="Tracks" instance=ExtResource("3_ud27o")] +position = Vector2(425, 106) +curve = SubResource("Curve2D_frut4") + +[node name="Track4" parent="Tracks" instance=ExtResource("3_1radm")] +position = Vector2(1060, 459) +rotation = 1.5708 +curve = SubResource("Curve2D_1djnw") + +[node name="Track5" parent="Tracks" instance=ExtResource("5_2sq2s")] +position = Vector2(788, 587) +rotation = -3.14159 +curve = SubResource("Curve2D_41wbj") + +[node name="Track6" parent="Tracks" instance=ExtResource("3_ud27o")] +position = Vector2(556, 405) +curve = SubResource("Curve2D_1ukf6") + +[node name="Track7" parent="Tracks" instance=ExtResource("3_1radm")] +position = Vector2(932, 15) +curve = SubResource("Curve2D_sn01j") + +[node name="Track8" parent="Tracks" instance=ExtResource("6_e3k5x")] +position = Vector2(788, 15) +rotation = -3.14159 +curve = SubResource("Curve2D_uq6se") + +[node name="Track9" parent="Tracks" instance=ExtResource("3_ud27o")] +position = Vector2(575, 152) +curve = SubResource("Curve2D_tybvb") + +[node name="Track11" parent="Tracks" instance=ExtResource("3_1radm")] +position = Vector2(233, 587) +rotation = 3.14159 +curve = SubResource("Curve2D_kvg06") + +[node name="Track12" parent="Tracks" instance=ExtResource("3_ud27o")] +position = Vector2(369, 468) +curve = SubResource("Curve2D_k5b3m") + +[node name="TrackSwitch" parent="Tracks" instance=ExtResource("7_rhne7")] +position = Vector2(257, 587) +direction = 0 -[node name="TrackSwitch2" parent="Tracks" instance=ExtResource("2_h3h4n")] -position = Vector2(392, 416) -rotation = -0.785398 +[node name="TrackSwitch2" parent="Tracks" instance=ExtResource("8_j2k0u")] +position = Vector2(257, 15) [node name="LeftTrack" parent="Tracks/TrackSwitch2" index="0"] -curve = SubResource("Curve2D_wvr62") +curve = SubResource("Curve2D_b5u6y") [node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch2/LeftTrack" index="1"] -multimesh = SubResource("MultiMesh_2dy52") - -[node name="HeadPoint" parent="Tracks/TrackSwitch2/LeftTrack" index="2"] -rotation = 0.0587565 - -[node name="TrackJunction" parent="Tracks/TrackSwitch2/LeftTrack/HeadPoint" index="0"] -parent = NodePath("../../../../TrackSwitch2") - -[node name="TailPoint" parent="Tracks/TrackSwitch2/LeftTrack" index="3"] -position = Vector2(96.1665, 5.65692) -rotation = 0.0587565 -progress = 96.3327 - -[node name="TrackJunction" parent="Tracks/TrackSwitch2/LeftTrack/TailPoint" index="0"] -parent = NodePath("../../../../TrackSwitch2") +multimesh = SubResource("MultiMesh_1tu7u") [node name="TrackLine" parent="Tracks/TrackSwitch2/LeftTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4.13215, 0.243071, 8.87474, 0.52205, 11.7919, 0.693649, 15.026, 0.883894, 18.5419, 1.09071, 22.3042, 1.31203, 26.2779, 1.54578, 30.4277, 1.78988, 34.7183, 2.04228, 39.1146, 2.30089, 43.5813, 2.56364, 48.0832, 2.82846, 52.5852, 3.09328, 57.0519, 3.35603, 61.4482, 3.61464, 65.7388, 3.86704, 69.8886, 4.11114, 73.8623, 4.34489, 77.6246, 4.56621, 81.1405, 4.77303, 84.3746, 4.96327, 87.2918, 5.13487, 92.0343, 5.41385, 96.1665, 5.65692) +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40482, 0.0324149, 13.2451, 0.253994, 15.9031, 0.494002, 18.9595, 0.851238, 22.3442, 1.34902, 25.9869, 2.01065, 29.8175, 2.85945, 33.7659, 3.91873, 37.7619, 5.2118, 41.7353, 6.76198, 45.6159, 8.59258, 49.3337, 10.7269, 52.8185, 13.1883, 56, 16, 58.912, 18.9016, 61.635, 21.6168, 64.1692, 24.1457, 66.5147, 26.488, 68.6717, 28.6437, 70.6403, 30.6125, 74.0131, 33.9893, 76.6342, 36.6175, 78.5049, 38.496, 80, 40, 81.0312, 41.0312, 83.75, 43.75, 85.5664, 45.5664, 87.5938, 47.5938, 89.7617, 49.7617, 92, 52, 94.2383, 54.2383, 96.4062, 56.4062, 98.4336, 58.4336, 100.25, 60.25, 102.969, 62.9688, 104, 64) [node name="Pointer" parent="Tracks/TrackSwitch2/LeftTrack" index="5"] -position = Vector2(66.6506, 3.92067) -rotation = 0.0587565 +position = Vector2(81.3648, 41.3648) [node name="RightTrack" parent="Tracks/TrackSwitch2" index="1"] -curve = SubResource("Curve2D_q6d23") +curve = SubResource("Curve2D_qar2q") [node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch2/RightTrack" index="1"] -multimesh = SubResource("MultiMesh_yocj8") - -[node name="HeadPoint" parent="Tracks/TrackSwitch2/RightTrack" index="2"] -rotation = 0.266253 - -[node name="TrackJunction" parent="Tracks/TrackSwitch2/RightTrack/HeadPoint" index="0"] -parent = NodePath("../../../../TrackSwitch2") - -[node name="TailPoint" parent="Tracks/TrackSwitch2/RightTrack" index="3"] -position = Vector2(96.1665, 50.9117) -rotation = 0.785398 -progress = 113.894 - -[node name="TrackJunction" parent="Tracks/TrackSwitch2/RightTrack/TailPoint" index="0"] -parent = NodePath("../../../../TrackSwitch2") +multimesh = SubResource("MultiMesh_1gawn") [node name="TrackLine" parent="Tracks/TrackSwitch2/RightTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 1.93266, -0.00942437, 4.19414, 0.0229257, 7.18185, 0.119211, 10.7929, 0.308852, 14.9244, 0.621269, 19.4734, 1.08588, 24.337, 1.73211, 26.8547, 2.13253, 29.4124, 2.58938, 31.9974, 3.10635, 34.5967, 3.6871, 37.1975, 4.33533, 39.7869, 5.05471, 42.352, 5.84891, 44.8801, 6.72161, 47.3582, 7.67649, 49.7734, 8.71723, 52.113, 9.8475, 54.364, 11.071, 56.5137, 12.3914, 58.549, 13.8123, 62.2254, 16.9706, 65.5842, 20.3195, 68.8714, 23.5994, 72.0671, 26.7901, 75.1513, 29.8712, 78.1039, 32.8225, 80.9048, 35.6237, 83.534, 38.2544, 85.9716, 40.6943, 88.1974, 42.9233, 90.1915, 44.9209, 93.4041, 48.1409, 96.1665, 50.9117) +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40643, 0.0316848, 13.2506, 0.251491, 15.911, 0.490416, 18.9699, 0.846545, 22.3569, 1.34327, 26.0017, 2.00397, 29.8339, 2.85206, 33.7832, 3.91091, 37.7793, 5.20392, 41.7519, 6.75447, 45.6305, 8.58597, 49.345, 10.7218, 52.8249, 13.1853, 56, 16, 58.8157, 19.0842, 61.28, 22.3095, 63.4163, 25.6289, 65.2481, 28.9955, 66.7988, 32.3625, 68.0918, 35.6828, 69.1505, 38.9097, 69.9984, 41.996, 70.6587, 44.895, 71.1551, 47.5597, 71.7494, 51.9985, 72, 56, 72, 60, 72, 64) [node name="Pointer" parent="Tracks/TrackSwitch2/RightTrack" index="5"] -position = Vector2(62.8641, 17.5763) -rotation = 0.783806 - -[node name="Track2" parent="Tracks" instance=ExtResource("1_odec6")] -position = Vector2(728, 496) -curve = SubResource("Curve2D_mayfe") +position = Vector2(68.3721, 36.4824) -[node name="Track3" parent="Tracks" instance=ExtResource("1_odec6")] -position = Vector2(224, 392) -curve = SubResource("Curve2D_tytqk") +[node name="Button" parent="Tracks/TrackSwitch2" index="2"] +offset_top = 25.0 +offset_bottom = 73.0 -[node name="Track4" parent="Tracks" instance=ExtResource("1_odec6")] -position = Vector2(544, 400) -curve = SubResource("Curve2D_mgg06") +[node name="Track2" parent="Tracks" instance=ExtResource("3_ud27o")] +position = Vector2(262, 298) +curve = SubResource("Curve2D_a7pxc") -[node name="Track5" parent="Tracks" instance=ExtResource("1_odec6")] -position = Vector2(432, 256) -curve = SubResource("Curve2D_rn445") +[node name="TrainStation" parent="." instance=ExtResource("5_jlsfp")] +position = Vector2(1060, 151) +rotation = 1.5708 -[node name="Track6" parent="Tracks" instance=ExtResource("1_odec6")] -position = Vector2(832, 168) -curve = SubResource("Curve2D_00p67") - -[node name="Track7" parent="Tracks" instance=ExtResource("1_odec6")] -position = Vector2(512, 304) -curve = SubResource("Curve2D_2q1sk") - -[node name="TrackSwitch" parent="Tracks" instance=ExtResource("2_h3h4n")] -position = Vector2(768, 416) -rotation = -2.35619 -direction = 0 - -[node name="LeftTrack" parent="Tracks/TrackSwitch" index="0"] -z_index = 1 -curve = SubResource("Curve2D_r25qh") - -[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch/LeftTrack" index="1"] -multimesh = SubResource("MultiMesh_bq364") - -[node name="HeadPoint" parent="Tracks/TrackSwitch/LeftTrack" index="2"] -rotation = -0.367174 - -[node name="TailPoint" parent="Tracks/TrackSwitch/LeftTrack" index="3"] -position = Vector2(90.5097, -45.2549) -rotation = -0.785398 -progress = 103.506 - -[node name="TrackLine" parent="Tracks/TrackSwitch/LeftTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 2.48258, -0.535236, 5.37148, -1.18929, 9.16829, -2.08763, 13.7301, -3.22028, 16.2533, -3.87134, 18.9141, -4.57723, 21.6948, -5.33669, 24.5774, -6.14848, 27.5441, -7.01135, 30.577, -7.92405, 33.6584, -8.88533, 36.7702, -9.89393, 39.8947, -10.9486, 43.014, -12.0481, 46.1103, -13.1912, 49.1656, -14.3767, 52.1621, -15.6032, 55.082, -16.8695, 57.9074, -18.1744, 60.6205, -19.5167, 63.2033, -20.895, 65.6381, -22.3082, 67.9069, -23.755, 69.9919, -25.2341, 73.5391, -28.2843, 76.451, -31.2075, 79.0095, -33.7742, 81.2373, -36.0078, 83.1573, -37.9313, 86.1656, -40.9407, 88.2169, -42.9877, 90.5097, -45.2549) - -[node name="Pointer" parent="Tracks/TrackSwitch/LeftTrack" index="5"] -visible = true -position = Vector2(63.1927, -20.8891) -rotation = -0.507124 - -[node name="RightTrack" parent="Tracks/TrackSwitch" index="1"] -z_index = 0 -curve = SubResource("Curve2D_ys6kh") - -[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch/RightTrack" index="1"] -multimesh = SubResource("MultiMesh_nrtpx") - -[node name="HeadPoint" parent="Tracks/TrackSwitch/RightTrack" index="2"] -rotation = -3.85343e-07 - -[node name="TailPoint" parent="Tracks/TrackSwitch/RightTrack" index="3"] -position = Vector2(79.196, -3.05176e-05) -rotation = -3.85343e-07 -progress = 79.196 - -[node name="TrackLine" parent="Tracks/TrackSwitch/RightTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 3.40295, -1.3113e-06, 7.30861, -2.81632e-06, 9.71098, -3.74205e-06, 12.3744, -4.76837e-06, 15.2698, -5.8841e-06, 18.3682, -7.07805e-06, 21.6407, -8.33907e-06, 25.0581, -9.65596e-06, 28.5916, -1.10176e-05, 32.212, -1.24127e-05, 35.8905, -1.38301e-05, 39.598, -1.52588e-05, 43.3055, -1.66874e-05, 46.984, -1.81049e-05, 50.6044, -1.95e-05, 54.1379, -2.08616e-05, 57.5553, -2.21785e-05, 60.8278, -2.34395e-05, 63.9262, -2.46335e-05, 66.8216, -2.57492e-05, 69.485, -2.67755e-05, 71.8874, -2.77013e-05, 75.793, -2.92063e-05, 79.196, -3.05176e-05) - -[node name="Pointer" parent="Tracks/TrackSwitch/RightTrack" index="5"] -visible = false -position = Vector2(66.7695, -2.57292e-05) -rotation = -3.85343e-07 - -[node name="Button" parent="Tracks/TrackSwitch" index="2"] -offset_left = -39.5979 -offset_top = 28.2843 -offset_right = 36.4021 -offset_bottom = 76.2843 +[node name="TrainStation2" parent="." instance=ExtResource("5_jlsfp")] +position = Vector2(105, 451) rotation = -1.5708 -button_pressed = false - -[node name="TrainStation" parent="." instance=ExtResource("2_5wuhy")] -position = Vector2(424, 96) - -[node name="TrainStation2" parent="." instance=ExtResource("2_5wuhy")] -position = Vector2(424, 496) -[node name="TrainRoute" parent="." node_paths=PackedStringArray("tracks_controller") instance=ExtResource("7_nktel")] +[node name="TrainRoute" parent="." node_paths=PackedStringArray("tracks_controller") instance=ExtResource("7_p34jf")] position = Vector2(354.396, 151.157) tracks_controller = NodePath("../Tracks") car_count = 2 color = Color(1, 0.627451, 0.572549, 1) route_name = "Beziani" -[node name="TrainRouteStop" parent="TrainRoute" node_paths=PackedStringArray("station") instance=ExtResource("8_l78k2")] +[node name="TrainRouteStop" parent="TrainRoute" node_paths=PackedStringArray("station") instance=ExtResource("8_xs6w7")] station = NodePath("../../TrainStation") -[node name="TrainRouteStop2" parent="TrainRoute" node_paths=PackedStringArray("station") instance=ExtResource("8_l78k2")] +[node name="TrainRouteStop2" parent="TrainRoute" node_paths=PackedStringArray("station") instance=ExtResource("8_xs6w7")] station = NodePath("../../TrainStation2") [editable path="Tracks/TrackSwitch2"] [editable path="Tracks/TrackSwitch2/LeftTrack"] [editable path="Tracks/TrackSwitch2/RightTrack"] -[editable path="Tracks/TrackSwitch"] -[editable path="Tracks/TrackSwitch/LeftTrack"] -[editable path="Tracks/TrackSwitch/RightTrack"] diff --git a/scenes/Level2.tscn b/scenes/Level2.tscn new file mode 100644 index 0000000..208661d --- /dev/null +++ b/scenes/Level2.tscn @@ -0,0 +1,336 @@ +[gd_scene load_steps=32 format=3 uid="uid://bhjkcskfwdbug"] + +[ext_resource type="Script" path="res://scripts/TracksController.gd" id="2_ai76e"] +[ext_resource type="PackedScene" uid="uid://cq6ckyed0ps4t" path="res://prefabs/Level.tscn" id="2_l6rrh"] +[ext_resource type="PackedScene" uid="uid://cgg0iicpep7b2" path="res://prefabs/Tracks/Track_90_Curve_Medium.tscn" id="3_1radm"] +[ext_resource type="PackedScene" uid="uid://d1xy67euifbh6" path="res://prefabs/Track.tscn" id="3_ud27o"] +[ext_resource type="PackedScene" uid="uid://bnivg4uv1nogr" path="res://prefabs/Tracks/Track_45_Curve.tscn" id="5_2sq2s"] +[ext_resource type="PackedScene" uid="uid://ctghq2lknpslx" path="res://prefabs/TrainStation.tscn" id="5_jlsfp"] +[ext_resource type="PackedScene" uid="uid://cr8fyeohy7xyg" path="res://prefabs/Tracks/Track_45_Curve_Mirrored.tscn" id="6_e3k5x"] +[ext_resource type="PackedScene" uid="uid://c7r1kx700h11u" path="res://prefabs/TrainRoute.tscn" id="7_p34jf"] +[ext_resource type="PackedScene" uid="uid://dhhfykmc5w8mp" path="res://prefabs/TrackSwitches/TrackSwitch_Left90Curve_Left45Curve.tscn" id="7_rhne7"] +[ext_resource type="PackedScene" uid="uid://dvt4wgess2jyj" path="res://prefabs/TrackSwitches/TrackSwitch_Right45Curve_Right90Curve.tscn" id="8_j2k0u"] +[ext_resource type="PackedScene" uid="uid://c4ncuqtx6xes" path="res://prefabs/TrainRouteStop.tscn" id="8_xs6w7"] + +[sub_resource type="Curve2D" id="Curve2D_ljegh"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, -40.059, -39.9231, 40.059, 39.9231, 88, 40, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 128, 152) +} +point_count = 5 + +[sub_resource type="Curve2D" id="Curve2D_komhc"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -64, -27, 0, 0, 0, 0, 103, 140) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_av25h"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, -40.059, -39.9231, 40.059, 39.9231, 88, 40, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 128, 136) +} +point_count = 5 + +[sub_resource type="Curve2D" id="Curve2D_jdjub"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -136, 0, 0, 0, 0, 0, -128, 0, -16.8086, -8.04456, 16.8086, 8.04456, -80, 8, 0, 0, 0, 0, -48, 32, 0, 0, 0, 0, -40, 40) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_hmeh0"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_8iosm"] +resource_local_to_scene = true +instance_count = 11 +mesh = SubResource("ArrayMesh_hmeh0") +buffer = PackedFloat32Array(0.99998, -0.00625427, 0, -131, 0.00625427, 0.99998, 0, 0, 0.99821, -0.0597991, 0, -121.003, 0.0597991, 0.99821, 0, 0.201691, 0.993981, -0.109557, 0, -111.03, 0.109557, 0.993981, 0, 0.917158, 0.984565, -0.175017, 0, -101.111, 0.175017, 0.984565, 0, 2.17038, 0.962464, -0.27141, 0, -91.3075, 0.27141, 0.962464, 0, 4.12544, 0.902641, -0.430394, 0, -81.8129, 0.430394, 0.902641, 0, 7.22449, 0.840226, -0.542236, 0, -72.9645, 0.542236, 0.840226, 0, 11.8598, 0.791097, -0.611691, 0, -64.688, 0.611691, 0.791097, 0, 17.4654, 0.74764, -0.664105, 0, -56.8854, 0.664105, 0.74764, 0, 23.7164, 0.708123, -0.706089, 0, -49.5264, 0.706089, 0.708123, 0, 30.4837, 0.707107, -0.707107, 0, -42.4503, 0.707107, 0.707107, 0, 37.5497) + +[sub_resource type="Curve2D" id="Curve2D_kwp65"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -28, -159, 0, 0, 0, 0, 272, 142) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_rp5i0"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, -40.059, -39.9231, 40.059, 39.9231, 88, 40, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 128, 136) +} +point_count = 5 + +[sub_resource type="Curve2D" id="Curve2D_75ew0"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -136, 0, 0, 0, 0, 0, -128, 0, -15.9668, 7.95053, 15.9668, -7.95053, -80, -8, 0, 0, 0, 0, -48, -32, 0, 0, 0, 0, -40, -40) +} +point_count = 5 + +[sub_resource type="Curve2D" id="Curve2D_kliyo"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 0, 157, 0, 0, 0, 0, 253, -97) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_qyjxh"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -24, 0, 0, 0, 0, 0, 0, 0, -40.059, -39.9231, 40.059, 39.9231, 88, 40, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 128, 136) +} +point_count = 5 + +[sub_resource type="Curve2D" id="Curve2D_7nvmt"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -8, 55, 0, 0, 0, 0, 206, -159) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_b5u6y"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -16.0349, -15.9716, 16.0349, 15.9716, 56, 16, 0, 0, 0, 0, 80, 40, 0, 0, 0, 0, 104, 64) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_1tu7u"] +resource_local_to_scene = true +instance_count = 13 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999911, -0.013338, 0, 5, 0.013338, 0.999911, 0, 7.80619e-13, 0.99311, -0.117186, 0, 14.9862, 0.117186, 0.99311, 0, 0.411204, 0.978145, -0.207924, 0, 24.8837, 0.207924, 0.978145, 0, 1.81027, 0.945185, -0.326536, 0, 34.591, 0.326536, 0.945185, 0, 4.18571, 0.88196, -0.471324, 0, 43.9078, 0.471324, 0.88196, 0, 7.78681, 0.753186, -0.657808, 0, 52.4575, 0.657808, 0.753186, 0, 12.9333, 0.707989, -0.706223, 0, 59.7627, 0.706223, 0.707989, 0, 19.7499, 0.707201, -0.707013, 0, 66.8408, 0.707013, 0.707201, 0, 26.8139, 0.706054, -0.708158, 0, 73.9103, 0.708158, 0.706054, 0, 33.8865, 0.707107, -0.707107, 0, 80.9695, 0.707107, 0.707107, 0, 40.9695, 0.707106, -0.707108, 0, 88.0405, 0.707108, 0.707106, 0, 48.0405, 0.707107, -0.707106, 0, 95.1116, 0.707106, 0.707107, 0, 55.1116, 0.707107, -0.707107, 0, 102.183, 0.707107, 0.707107, 0, 62.1827) + +[sub_resource type="Curve2D" id="Curve2D_qar2q"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 8, 0, -15.9956, -15.9894, 15.9956, 15.9894, 56, 16, 0, 0, 0, 0, 72, 56, 0, 0, 0, 0, 72, 64) +} +point_count = 5 + +[sub_resource type="MultiMesh" id="MultiMesh_1gawn"] +resource_local_to_scene = true +instance_count = 11 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(0.999914, -0.0131121, 0, 5, 0.0131121, 0.999914, 0, 7.80619e-13, 0.993174, -0.116643, 0, 14.9864, 0.116643, 0.993174, 0, 0.407375, 0.978226, -0.207541, 0, 24.8846, 0.207541, 0.978226, 0, 1.80148, 0.945237, -0.326386, 0, 34.5928, 0.326386, 0.945237, 0, 4.17289, 0.881798, -0.471627, 0, 43.9098, 0.471627, 0.881798, 0, 7.77345, 0.750554, -0.660809, 0, 52.4566, 0.660809, 0.750554, 0, 12.9246, 0.580281, -0.814416, 0, 59.5014, 0.814416, 0.580281, 0, 19.9817, 0.420537, -0.907275, 0, 64.909, 0.907275, 0.420537, 0, 28.3721, 0.274261, -0.961655, 0, 68.7216, 0.961655, 0.274261, 0, 37.6024, 0.131685, -0.991292, 0, 71.1074, 0.991292, 0.131685, 0, 47.3038, -4.37114e-08, -1, 0, 72, 1, -4.37114e-08, 0, 57.2519) + +[sub_resource type="Curve2D" id="Curve2D_3byt4"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 67, -191, 0, 0, 0, 0, 67, 217) +} +point_count = 2 + +[sub_resource type="MultiMesh" id="MultiMesh_loj4l"] +resource_local_to_scene = true +instance_count = 41 +mesh = SubResource("ArrayMesh_umy7o") +buffer = PackedFloat32Array(-4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -186, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -176, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -166, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -156, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -146, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -136, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -126, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -116, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -106, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -96, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -86, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -76, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -66, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -56, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -46, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -36, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -26, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -16, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, -5.99998, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 4.00001, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 14, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 24, -1.47422e-06, -1, 0, 67, 1, -1.47422e-06, 0, 34, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 44, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 54, -1.47422e-06, -1, 0, 67, 1, -1.47422e-06, 0, 64, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 74, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 84, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 94, -1.47422e-06, -1, 0, 67, 1, -1.47422e-06, 0, 104, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 114, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 124, -1.47422e-06, -1, 0, 67, 1, -1.47422e-06, 0, 134, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 144, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 154, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 164, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 174, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 184, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 194, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 204, -4.37114e-08, -1, 0, 67, 1, -4.37114e-08, 0, 214) + +[sub_resource type="Curve2D" id="Curve2D_7rple"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 103, -40, 0, 0, 0, 0, 103, -12) +} +point_count = 2 + +[node name="Level2" type="Node2D"] +position = Vector2(-7, 24) + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="Level" parent="CanvasLayer" instance=ExtResource("2_l6rrh")] +grow_horizontal = 1 +grow_vertical = 1 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Tracks" type="Node2D" parent="."] +script = ExtResource("2_ai76e") + +[node name="Track" parent="Tracks" instance=ExtResource("3_1radm")] +position = Vector2(105, 143) +rotation = -1.5708 +curve = SubResource("Curve2D_ljegh") + +[node name="Track3" parent="Tracks" instance=ExtResource("3_ud27o")] +position = Vector2(425, 106) +curve = SubResource("Curve2D_komhc") + +[node name="Track4" parent="Tracks" instance=ExtResource("3_1radm")] +position = Vector2(1060, 459) +rotation = 1.5708 +curve = SubResource("Curve2D_av25h") + +[node name="Track5" parent="Tracks" instance=ExtResource("5_2sq2s")] +position = Vector2(788, 587) +rotation = -3.14159 +curve = SubResource("Curve2D_jdjub") +tail_signal_enabled = true + +[node name="MultiMeshInstance2D" parent="Tracks/Track5" index="1"] +multimesh = SubResource("MultiMesh_8iosm") + +[node name="SignalButton" parent="Tracks/Track5/TailPoint" index="1"] +visible = true + +[node name="TrackLine" parent="Tracks/Track5" index="4"] +points = PackedVector2Array(-136, 0, -132, 0, -128, 0, -126.627, 0.0137973, -122.864, 0.118734, -120.253, 0.235165, -117.244, 0.410126, -113.906, 0.655529, -110.303, 0.98329, -106.504, 1.40532, -102.574, 1.93354, -98.581, 2.57986, -94.5911, 3.3562, -90.6714, 4.27447, -86.8884, 5.34658, -83.309, 6.58445, -80, 8, -76.8707, 9.59523, -73.7991, 11.3409, -70.8052, 13.2021, -67.9089, 15.1438, -65.13, 17.1311, -62.4884, 19.129, -60.004, 21.1025, -57.6968, 23.0167, -55.5865, 24.8367, -53.693, 26.5274, -50.6363, 29.3813, -48, 32, -46.75, 33.25, -44, 36, -41.25, 38.75, -40, 40) + +[node name="Track6" parent="Tracks" instance=ExtResource("3_ud27o")] +position = Vector2(556, 405) +curve = SubResource("Curve2D_kwp65") + +[node name="Track7" parent="Tracks" instance=ExtResource("3_1radm")] +position = Vector2(932, 15) +curve = SubResource("Curve2D_rp5i0") + +[node name="Track8" parent="Tracks" instance=ExtResource("6_e3k5x")] +position = Vector2(788, 15) +rotation = -3.14159 +curve = SubResource("Curve2D_75ew0") + +[node name="Track9" parent="Tracks" instance=ExtResource("3_ud27o")] +position = Vector2(575, 152) +curve = SubResource("Curve2D_kliyo") + +[node name="Track11" parent="Tracks" instance=ExtResource("3_1radm")] +position = Vector2(233, 587) +rotation = 3.14159 +curve = SubResource("Curve2D_qyjxh") + +[node name="Track12" parent="Tracks" instance=ExtResource("3_ud27o")] +position = Vector2(369, 468) +curve = SubResource("Curve2D_7nvmt") + +[node name="TrackSwitch" parent="Tracks" instance=ExtResource("7_rhne7")] +position = Vector2(257, 587) +direction = 0 + +[node name="TrackSwitch2" parent="Tracks" instance=ExtResource("8_j2k0u")] +position = Vector2(257, 15) + +[node name="LeftTrack" parent="Tracks/TrackSwitch2" index="0"] +curve = SubResource("Curve2D_b5u6y") + +[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch2/LeftTrack" index="1"] +multimesh = SubResource("MultiMesh_1tu7u") + +[node name="TrackLine" parent="Tracks/TrackSwitch2/LeftTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40482, 0.0324149, 13.2451, 0.253994, 15.9031, 0.494002, 18.9595, 0.851238, 22.3442, 1.34902, 25.9869, 2.01065, 29.8175, 2.85945, 33.7659, 3.91873, 37.7619, 5.2118, 41.7353, 6.76198, 45.6159, 8.59258, 49.3337, 10.7269, 52.8185, 13.1883, 56, 16, 58.912, 18.9016, 61.635, 21.6168, 64.1692, 24.1457, 66.5147, 26.488, 68.6717, 28.6437, 70.6403, 30.6125, 74.0131, 33.9893, 76.6342, 36.6175, 78.5049, 38.496, 80, 40, 81.0312, 41.0312, 83.75, 43.75, 85.5664, 45.5664, 87.5938, 47.5938, 89.7617, 49.7617, 92, 52, 94.2383, 54.2383, 96.4062, 56.4062, 98.4336, 58.4336, 100.25, 60.25, 102.969, 62.9688, 104, 64) + +[node name="Pointer" parent="Tracks/TrackSwitch2/LeftTrack" index="5"] +position = Vector2(81.3648, 41.3648) + +[node name="RightTrack" parent="Tracks/TrackSwitch2" index="1"] +curve = SubResource("Curve2D_qar2q") + +[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch2/RightTrack" index="1"] +multimesh = SubResource("MultiMesh_1gawn") + +[node name="TrackLine" parent="Tracks/TrackSwitch2/RightTrack" index="4"] +points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4, 1.04082e-12, 8, 0, 9.40643, 0.0316848, 13.2506, 0.251491, 15.911, 0.490416, 18.9699, 0.846545, 22.3569, 1.34327, 26.0017, 2.00397, 29.8339, 2.85206, 33.7832, 3.91091, 37.7793, 5.20392, 41.7519, 6.75447, 45.6305, 8.58597, 49.345, 10.7218, 52.8249, 13.1853, 56, 16, 58.8157, 19.0842, 61.28, 22.3095, 63.4163, 25.6289, 65.2481, 28.9955, 66.7988, 32.3625, 68.0918, 35.6828, 69.1505, 38.9097, 69.9984, 41.996, 70.6587, 44.895, 71.1551, 47.5597, 71.7494, 51.9985, 72, 56, 72, 60, 72, 64) + +[node name="Pointer" parent="Tracks/TrackSwitch2/RightTrack" index="5"] +position = Vector2(68.3721, 36.4824) + +[node name="Button" parent="Tracks/TrackSwitch2" index="2"] +offset_top = 25.0 +offset_bottom = 73.0 + +[node name="Track2" parent="Tracks" instance=ExtResource("3_ud27o")] +position = Vector2(262, 298) +curve = SubResource("Curve2D_3byt4") +head_signal_enabled = true + +[node name="MultiMeshInstance2D" parent="Tracks/Track2" index="1"] +multimesh = SubResource("MultiMesh_loj4l") + +[node name="HeadPoint" parent="Tracks/Track2" index="2"] +position = Vector2(67, -191) +rotation = 1.5708 + +[node name="SignalButton" parent="Tracks/Track2/HeadPoint" index="1"] +visible = true +offset_left = -13.0 +offset_top = 41.0 +offset_right = 511.0 +offset_bottom = 561.0 + +[node name="TailPoint" parent="Tracks/Track2" index="3"] +position = Vector2(67, 217) +rotation = 1.5708 +progress = 408.0 + +[node name="TrackLine" parent="Tracks/Track2" index="4"] +points = PackedVector2Array(67, -191, 67, -186.418, 67, -183.918, 67, -180.915, 67, -177.425, 67, -173.469, 67, -169.064, 67, -164.23, 67, -161.658, 67, -158.985, 67, -156.214, 67, -153.348, 67, -150.388, 67, -147.337, 67, -144.197, 67, -140.971, 67, -137.661, 67, -134.269, 67, -130.798, 67, -127.25, 67, -123.627, 67, -119.932, 67, -116.167, 67, -112.333, 67, -108.435, 67, -104.474, 67, -100.452, 67, -96.3711, 67, -92.2346, 67, -88.0444, 67, -83.8028, 67, -79.5122, 67, -75.1749, 67, -70.7933, 67, -66.3696, 67, -61.9062, 67, -57.4055, 67, -52.8698, 67, -48.3014, 67, -43.7026, 67, -39.0759, 67, -34.4234, 67, -29.7476, 67, -25.0508, 67, -20.3353, 67, -15.6034, 67, -10.8576, 67, -6.1001, 67, -1.33324, 67, 3.44061, 67, 8.21914, 67, 13, 67, 17.7809, 67, 22.5594, 67, 27.3332, 67, 32.1001, 67, 36.8576, 67, 41.6034, 67, 46.3353, 67, 51.0508, 67, 55.7476, 67, 60.4234, 67, 65.0759, 67, 69.7026, 67, 74.3014, 67, 78.8698, 67, 83.4055, 67, 87.9062, 67, 92.3696, 67, 96.7933, 67, 101.175, 67, 105.512, 67, 109.803, 67, 114.044, 67, 118.235, 67, 122.371, 67, 126.452, 67, 130.474, 67, 134.435, 67, 138.333, 67, 142.167, 67, 145.932, 67, 149.627, 67, 153.25, 67, 156.798, 67, 160.269, 67, 163.661, 67, 166.971, 67, 170.197, 67, 173.337, 67, 176.388, 67, 179.348, 67, 182.214, 67, 184.985, 67, 187.658, 67, 190.23, 67, 195.064, 67, 199.469, 67, 203.425, 67, 206.915, 67, 209.918, 67, 212.418, 67, 217) + +[node name="TrainStation" parent="." instance=ExtResource("5_jlsfp")] +position = Vector2(1060, 151) +rotation = 1.5708 + +[node name="TrainStation2" parent="." instance=ExtResource("5_jlsfp")] +position = Vector2(105, 151) +rotation = 1.5708 + +[node name="TrainRoute" parent="." node_paths=PackedStringArray("tracks_controller") instance=ExtResource("7_p34jf")] +position = Vector2(354.396, 151.157) +tracks_controller = NodePath("../Tracks") +car_count = 2 +color = Color(1, 0.627451, 0.572549, 1) +route_name = "Beziani" + +[node name="TrainRouteStop" parent="TrainRoute" node_paths=PackedStringArray("station") instance=ExtResource("8_xs6w7")] +station = NodePath("../../TrainStation") + +[node name="TrainRouteStop2" parent="TrainRoute" node_paths=PackedStringArray("station") instance=ExtResource("8_xs6w7")] +station = NodePath("../../TrainStation2") + +[node name="TrainRoute2" parent="." node_paths=PackedStringArray("tracks_controller") instance=ExtResource("7_p34jf")] +position = Vector2(947.649, 558.514) +tracks_controller = NodePath("../Tracks") +car_count = 2 +color = Color(0.509804, 0.470588, 0.211765, 1) +route_name = "Maple Leaf" + +[node name="TrainRouteStop" parent="TrainRoute2" node_paths=PackedStringArray("station") instance=ExtResource("8_xs6w7")] +station = NodePath("../../TrainStation2") + +[node name="TrainRouteStop2" parent="TrainRoute2" node_paths=PackedStringArray("station") instance=ExtResource("8_xs6w7")] +station = NodePath("../../TrainStation") + +[node name="Track" parent="." instance=ExtResource("3_ud27o")] +position = Vector2(226, 119) +curve = SubResource("Curve2D_7rple") + +[editable path="Tracks/Track5"] +[editable path="Tracks/TrackSwitch2"] +[editable path="Tracks/TrackSwitch2/LeftTrack"] +[editable path="Tracks/TrackSwitch2/RightTrack"] +[editable path="Tracks/Track2"] diff --git a/scenes/Level3.tscn b/scenes/Level3.tscn new file mode 100644 index 0000000..d58250b --- /dev/null +++ b/scenes/Level3.tscn @@ -0,0 +1,368 @@ +[gd_scene load_steps=37 format=3 uid="uid://bdxckbbvt81uj"] + +[ext_resource type="Script" path="res://scripts/TracksController.gd" id="1_biqvw"] +[ext_resource type="PackedScene" uid="uid://ctghq2lknpslx" path="res://prefabs/TrainStation.tscn" id="1_dtmcd"] +[ext_resource type="PackedScene" uid="uid://cq6ckyed0ps4t" path="res://prefabs/Level.tscn" id="1_wh5on"] +[ext_resource type="PackedScene" uid="uid://d1xy67euifbh6" path="res://prefabs/Track.tscn" id="2_xqhrk"] +[ext_resource type="PackedScene" uid="uid://eky3mqmnjgl3" path="res://prefabs/Tracks/Track_90_Curve_Small.tscn" id="3_0tpkn"] +[ext_resource type="PackedScene" uid="uid://bjejtrah22b5a" path="res://prefabs/TrackSwitches/TrackSwitch_LeftStraight_Right90Curve.tscn" id="4_6tlvt"] +[ext_resource type="PackedScene" uid="uid://bnivg4uv1nogr" path="res://prefabs/Tracks/Track_45_Curve.tscn" id="5_ehsh7"] +[ext_resource type="PackedScene" uid="uid://dd6cvx5sfi3up" path="res://prefabs/TrackSwitches/TrackSwitch_LeftStraight_Right45Curve.tscn" id="6_so35w"] +[ext_resource type="PackedScene" uid="uid://cgg0iicpep7b2" path="res://prefabs/Tracks/Track_90_Curve_Medium.tscn" id="7_4d6sr"] +[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="8_vug4q"] +[ext_resource type="PackedScene" uid="uid://dnq6bkqmpu7vi" path="res://prefabs/TrackSwitches/TrackSwitch_Left45Curve_RightStraight.tscn" id="9_u1i1j"] +[ext_resource type="PackedScene" uid="uid://c7r1kx700h11u" path="res://prefabs/TrainRoute.tscn" id="11_j0e0o"] +[ext_resource type="PackedScene" uid="uid://c4ncuqtx6xes" path="res://prefabs/TrainRouteStop.tscn" id="12_6ai6h"] + +[sub_resource type="Curve2D" id="Curve2D_3vmuy"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -354, 0, 0, 0, 0, 0, -78, 0) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_lwx1y"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 101, 0) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_yji06"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 64, 0, -15.9835, -15.9593, 15.9835, 15.9593, 112, 16, 0, 0, 0, 0, 128, 64, 0, 0, 0, 0, 128, 212) +} +point_count = 5 + +[sub_resource type="Curve2D" id="Curve2D_55ex6"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 61, 140, 0, 0, 0, 0, 262, -62) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_3jiyh"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -78, 279, 0, 0, 0, 0, -7, 208) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_eae8n"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 22, -23, 0, 0, 0, 0, 22, 18) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_i6eg1"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 64, 0, -19.5338, -20.3622, 19.5338, 20.3622, 108, 20, 0, 0, 0, 0, 128, 64, 0, 0, 0, 0, 128, 72) +} +point_count = 5 + +[sub_resource type="Curve2D" id="Curve2D_1uajm"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -29, 0, 0, 0, 0, 0, 0, 0, -40.059, -39.9231, 40.059, 39.9231, 88, 40, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 128, 162) +} +point_count = 5 + +[sub_resource type="Curve2D" id="Curve2D_oahqr"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -136, 0, 0, 0, 0, 0, -128, 0, -16.8086, -8.04456, 16.8086, 8.04456, -80, 8, 0, 0, 0, 0, -48, 32, 0, 0, 0, 0, -40, 40) +} +point_count = 5 + +[sub_resource type="Curve2D" id="Curve2D_qbifc"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -33, -42, 0, 0, 0, 0, 12, -42) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_yxnfk"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 21, -45, 0, 0, 0, 0, 63, -45) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_im6ce"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 17, -19, 0, 0, 0, 0, 57, -19) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_lacy8"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 64, 0, -19.5338, -20.3622, 19.5338, 20.3622, 108, 20, 0, 0, 0, 0, 128, 64, 0, 0, 0, 0, 128, 72) +} +point_count = 5 + +[sub_resource type="Curve2D" id="Curve2D_nj8hp"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, -40.059, -39.9231, 40.059, 39.9231, 88, 40, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 128, 136) +} +point_count = 5 + +[sub_resource type="ArrayMesh" id="ArrayMesh_hmeh0"] +_surfaces = [{ +"2d": true, +"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), +"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), +"format": 33558545, +"index_count": 6, +"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), +"primitive": 3, +"vertex_count": 4, +"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) +}] + +[sub_resource type="MultiMesh" id="MultiMesh_no5fn"] +resource_local_to_scene = true +instance_count = 21 +mesh = SubResource("ArrayMesh_hmeh0") +buffer = PackedFloat32Array(0.999885, -0.0151968, 0, -3, 0.0151968, 0.999885, 0, 0, 0.991147, -0.132768, 0, 6.97848, 0.132768, 0.991147, 0, 0.514451, 0.97704, -0.213057, 0, 16.8568, 0.213057, 0.97704, 0, 2.04871, 0.9591, -0.283066, 0, 26.585, 0.283066, 0.9591, 0, 4.35361, 0.936153, -0.351594, 0, 36.1225, 0.351594, 0.936153, 0, 7.35176, 0.909868, -0.414897, 0, 45.4217, 0.414897, 0.909868, 0, 11.0232, 0.876674, -0.481086, 0, 54.4353, 0.481086, 0.876674, 0, 15.3479, 0.840183, -0.542304, 0, 63.113, 0.542304, 0.840183, 0, 20.312, 0.798809, -0.601584, 0, 71.4131, 0.601584, 0.798809, 0, 25.8841, 0.755105, -0.655604, 0, 79.2886, 0.655604, 0.755105, 0, 32.0419, 0.704947, -0.70926, 0, 86.7109, 0.70926, 0.704947, 0, 38.739, 0.649122, -0.760684, 0, 93.6308, 0.760684, 0.649122, 0, 45.9549, 0.595398, -0.803431, 0, 99.9968, 0.803431, 0.595398, 0, 53.6636, 0.53559, -0.844478, 0, 105.802, 0.844478, 0.53559, 0, 61.8023, 0.471631, -0.881796, 0, 111.004, 0.881796, 0.471631, 0, 70.3398, 0.406769, -0.913531, 0, 115.554, 0.913531, 0.406769, 0, 79.242, 0.340047, -0.940409, 0, 119.464, 0.940409, 0.340047, 0, 88.4434, 0.27268, -0.962105, 0, 122.695, 0.962105, 0.27268, 0, 97.9044, 0.199982, -0.9798, 0, 125.244, 0.9798, 0.199982, 0, 107.572, 0.120989, -0.992654, 0, 127.039, 0.992654, 0.120989, 0, 117.406, 0.00455207, -0.99999, 0, 127.977, 0.99999, 0.00455207, 0, 127.356) + +[sub_resource type="Curve2D" id="Curve2D_nywvt"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -222, 0, 0, 0, 0, 0, 256, 2.08165e-12) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_8lb8a"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, 0, -40.059, -39.9231, 40.059, 39.9231, 88, 40, 0, 0, 0, 0, 128, 128, 0, 0, 0, 0, 128, 136) +} +point_count = 5 + +[sub_resource type="Curve2D" id="Curve2D_fi5ru"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -5, -1, 0, 0, 0, 0, 133, -1) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_etloc"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -10, -31, 0, 0, 0, 0, -10, 18) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_enmx7"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -12, -41, 0, 0, 0, 0, -12, 27) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_qc53d"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 489, 0) +} +point_count = 2 + +[sub_resource type="Curve2D" id="Curve2D_p3ei3"] +resource_local_to_scene = true +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 64, 0, -19.5338, -20.3622, 19.5338, 20.3622, 108, 20, 0, 0, 0, 0, 128, 64, 0, 0, 0, 0, 128, 106) +} +point_count = 5 + +[node name="Level3" type="Node2D"] + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="Level" parent="CanvasLayer" instance=ExtResource("1_wh5on")] +grow_horizontal = 1 +grow_vertical = 1 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Tracks" type="Node2D" parent="."] +script = ExtResource("1_biqvw") + +[node name="Track" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(864, 89) +curve = SubResource("Curve2D_3vmuy") + +[node name="Track2" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(864, 89) +curve = SubResource("Curve2D_lwx1y") + +[node name="Track3" parent="Tracks" instance=ExtResource("3_0tpkn")] +position = Vector2(908, 89) +curve = SubResource("Curve2D_yji06") + +[node name="TrackSwitch" parent="Tracks" instance=ExtResource("4_6tlvt")] +position = Vector2(786, 89) + +[node name="Track4" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(548, 311) +curve = SubResource("Curve2D_55ex6") + +[node name="Track17" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(548, 311) +curve = SubResource("Curve2D_3jiyh") + +[node name="TrackSwitch2" parent="Tracks" instance=ExtResource("6_so35w")] +position = Vector2(858, 161) +rotation = 1.5708 + +[node name="Track5" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(836, 280) +curve = SubResource("Curve2D_eae8n") + +[node name="Track6" parent="Tracks" instance=ExtResource("3_0tpkn")] +position = Vector2(858, 542) +rotation = 1.5708 +curve = SubResource("Curve2D_i6eg1") + +[node name="Track7" parent="Tracks" instance=ExtResource("7_4d6sr")] +position = Vector2(1036, 630) +rotation = 1.5708 +curve = SubResource("Curve2D_1uajm") + +[node name="TrackSwitch3" parent="Tracks" instance=ExtResource("6_so35w")] +position = Vector2(690, 670) + +[node name="Track8" parent="Tracks" instance=ExtResource("5_ehsh7")] +position = Vector2(738, 758) +rotation = 3.14159 +curve = SubResource("Curve2D_oahqr") + +[node name="TrackSwitch4" parent="Tracks" instance=ExtResource("8_vug4q")] +position = Vector2(646, 670) +rotation = 3.14159 + +[node name="Track9" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(678, 712) +curve = SubResource("Curve2D_qbifc") + +[node name="Track10" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(319, 683) +curve = SubResource("Curve2D_yxnfk") + +[node name="TrackSwitch5" parent="Tracks" instance=ExtResource("9_u1i1j")] +position = Vector2(382, 638) + +[node name="Track11" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(461, 657) +curve = SubResource("Curve2D_im6ce") + +[node name="Track12" parent="Tracks" instance=ExtResource("3_0tpkn")] +position = Vector2(96, 638) +rotation = 3.14159 +curve = SubResource("Curve2D_lacy8") + +[node name="Track13" parent="Tracks" instance=ExtResource("7_4d6sr")] +position = Vector2(32, 702) +rotation = 3.14159 +curve = SubResource("Curve2D_nj8hp") +tail_signal_enabled = true + +[node name="MultiMeshInstance2D" parent="Tracks/Track13" index="1"] +multimesh = SubResource("MultiMesh_no5fn") + +[node name="SignalButton" parent="Tracks/Track13/TailPoint" index="1"] +visible = true +offset_left = 12.0004 +offset_top = -40.999 +offset_right = 536.0 +offset_bottom = 479.001 + +[node name="TrackLine" parent="Tracks/Track13" index="4"] +points = PackedVector2Array(-8, 0, -4, 0, 0, 0, 2.13821, 0.0812791, 4.6883, 0.270262, 8.1167, 0.635814, 12.3416, 1.23619, 14.7272, 1.64265, 17.2813, 2.12965, 19.9936, 2.70449, 22.854, 3.37445, 25.8521, 4.1468, 28.9779, 5.02884, 32.221, 6.02783, 35.5712, 7.15108, 39.0184, 8.40584, 42.5522, 9.79942, 46.1625, 11.3391, 49.8391, 13.0321, 53.5717, 14.8858, 57.3501, 16.9074, 61.1641, 19.1043, 65.0035, 21.4836, 68.858, 24.0528, 72.7174, 26.819, 76.5716, 29.7895, 80.4102, 32.9717, 82.3205, 34.6444, 84.2231, 36.3727, 86.1167, 38.1576, 88, 40, 89.8485, 41.8772, 91.6392, 43.765, 93.373, 45.6621, 95.0507, 47.5674, 98.2419, 51.397, 101.22, 55.2435, 103.993, 59.0966, 106.567, 62.9461, 108.95, 66.7814, 111.15, 70.5926, 113.173, 74.3691, 115.028, 78.1007, 116.721, 81.7771, 118.26, 85.3881, 119.653, 88.9233, 120.905, 92.3724, 122.026, 95.7251, 123.022, 98.9712, 123.901, 102.1, 124.669, 105.102, 125.335, 107.966, 125.906, 110.683, 126.389, 113.241, 126.791, 115.631, 127.383, 119.864, 127.741, 123.3, 127.924, 125.856, 128, 128, 128, 132, 128, 136) + +[node name="Track14" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(262, 702) +curve = SubResource("Curve2D_nywvt") + +[node name="TrackSwitch6" parent="Tracks" instance=ExtResource("8_vug4q")] +position = Vector2(-64, 438) +rotation = 1.5708 + +[node name="Track15" parent="Tracks" instance=ExtResource("7_4d6sr")] +position = Vector2(-64, 217) +rotation = -1.5708 +curve = SubResource("Curve2D_8lb8a") + +[node name="Track16" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(77, 90) +curve = SubResource("Curve2D_fi5ru") + +[node name="TrackSwitch7" parent="Tracks" instance=ExtResource("4_6tlvt")] +position = Vector2(-64, 389) +rotation = -1.5708 + +[node name="Track18" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(-54, 420) +curve = SubResource("Curve2D_etloc") + +[node name="Track19" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(-52, 266) +curve = SubResource("Curve2D_enmx7") + +[node name="Track20" parent="Tracks" instance=ExtResource("2_xqhrk")] +position = Vector2(8, 317) +curve = SubResource("Curve2D_qc53d") + +[node name="TrackSwitch8" parent="Tracks" instance=ExtResource("9_u1i1j")] +position = Vector2(541, 519) +rotation = -0.785398 + +[node name="Track21" parent="Tracks" instance=ExtResource("3_0tpkn")] +position = Vector2(441, 317) +curve = SubResource("Curve2D_p3ei3") + +[node name="TrainStation" parent="." instance=ExtResource("1_dtmcd")] +position = Vector2(210, 89) + +[node name="TrainStation2" parent="." instance=ExtResource("1_dtmcd")] +position = Vector2(1036, 301) +rotation = 1.5708 + +[node name="TrainStation3" parent="." instance=ExtResource("1_dtmcd")] +position = Vector2(40, 638) + +[node name="TrainStation4" parent="." instance=ExtResource("1_dtmcd")] +position = Vector2(858, 598) +rotation = -1.5708 + +[node name="TrainRoute" parent="." node_paths=PackedStringArray("tracks_controller") instance=ExtResource("11_j0e0o")] +tracks_controller = NodePath("../Tracks") +route_name = "RailJet" + +[node name="TrainRouteStop" parent="TrainRoute" node_paths=PackedStringArray("station") instance=ExtResource("12_6ai6h")] +station = NodePath("../../TrainStation") + +[node name="TrainRouteStop2" parent="TrainRoute" node_paths=PackedStringArray("station") instance=ExtResource("12_6ai6h")] +station = NodePath("../../TrainStation2") + +[node name="TrainRoute2" parent="." node_paths=PackedStringArray("tracks_controller") instance=ExtResource("11_j0e0o")] +tracks_controller = NodePath("../Tracks") +color = Color(0.592157, 0, 0, 1) +route_name = "Uno" + +[node name="TrainRouteStop" parent="TrainRoute2" node_paths=PackedStringArray("station") instance=ExtResource("12_6ai6h")] +station = NodePath("../../TrainStation3") + +[node name="TrainRouteStop2" parent="TrainRoute2" node_paths=PackedStringArray("station") instance=ExtResource("12_6ai6h")] +station = NodePath("../../TrainStation4") + +[node name="Camera2D" type="Camera2D" parent="."] +offset = Vector2(500, 400) +zoom = Vector2(0.8, 0.8) + +[editable path="Tracks/Track13"] diff --git a/scenes/MainMenu.tscn b/scenes/MainMenu.tscn index 6ce97fa..2f52708 100644 --- a/scenes/MainMenu.tscn +++ b/scenes/MainMenu.tscn @@ -3,7 +3,7 @@ [ext_resource type="Theme" uid="uid://dsugnc7jkb7q5" path="res://themes/main.tres" id="1_05twq"] [ext_resource type="Script" path="res://scripts/MainMenu.gd" id="2_6abnn"] [ext_resource type="Texture2D" uid="uid://c2udkkfuwbis0" path="res://assets/warn.png" id="2_ca7mh"] -[ext_resource type="PackedScene" uid="uid://bhjkcskfwdbug" path="res://scenes/Level1.tscn" id="3_nclby"] +[ext_resource type="PackedScene" uid="uid://f00y8rjii1h1" path="res://scenes/Level1.tscn" id="3_nclby"] [node name="MainMenu" type="CenterContainer"] anchors_preset = 15 diff --git a/scenes/start.tscn b/scenes/start.tscn deleted file mode 100644 index 7b961c2..0000000 --- a/scenes/start.tscn +++ /dev/null @@ -1,215 +0,0 @@ -[gd_scene load_steps=21 format=3 uid="uid://bt0pdthcms3sl"] - -[ext_resource type="Script" path="res://scripts/track1.gd" id="1_31lvk"] -[ext_resource type="PackedScene" uid="uid://d1xy67euifbh6" path="res://prefabs/Track.tscn" id="2_aska1"] -[ext_resource type="PackedScene" uid="uid://c5rp2hi42rfrv" path="res://prefabs/TrainEngine.tscn" id="2_ee1j8"] -[ext_resource type="PackedScene" uid="uid://ctghq2lknpslx" path="res://prefabs/TrainStation.tscn" id="4_kq6cn"] -[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="4_wifjq"] -[ext_resource type="PackedScene" uid="uid://c7r1kx700h11u" path="res://prefabs/TrainRoute.tscn" id="6_sec3k"] -[ext_resource type="PackedScene" uid="uid://c4ncuqtx6xes" path="res://prefabs/TrainRouteStop.tscn" id="7_hql3n"] - -[sub_resource type="Curve2D" id="Curve2D_rf02u"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(137.622, -3.25118, -137.622, 3.25118, -323.749, -330.001, 28.7998, -67, -28.7998, 67, -438.09, -133.876, -80.756, -7.07106, 80.756, 7.07106, -383.47, -13.876, -74.7544, -18.1696, 74.7544, 18.1696, -186.836, -20.876, -93.1992, -6.32794, 93.1992, 6.32794, 314.813, -361.999) -} -point_count = 5 - -[sub_resource type="Curve2D" id="Curve2D_6pi6j"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, -24.017, 16.005, 24.017, -16.005, 64, -16, -8.2255, 0.90609, 8.2255, -0.90609, 211, -4) -} -point_count = 3 - -[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] -_surfaces = [{ -"2d": true, -"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), -"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), -"format": 33558545, -"index_count": 6, -"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), -"primitive": 3, -"vertex_count": 4, -"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) -}] - -[sub_resource type="MultiMesh" id="MultiMesh_cd0fe"] -resource_local_to_scene = true -instance_count = 22 -mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(0.99808, 0.0619333, 0, 4.99647, -0.0619333, 0.99808, 0, -0.176236, 0.992584, 0.121559, 0, 14.9636, -0.121559, 0.992584, 0, -0.961502, 0.98391, 0.178663, 0, 24.872, -0.178663, 0.98391, 0, -2.30135, 0.969346, 0.2457, 0, 34.6786, -0.2457, 0.969346, 0, -4.24865, 0.94496, 0.327186, 0, 44.3185, -0.327186, 0.94496, 0, -6.89664, 0.901405, 0.432977, 0, 53.6711, -0.432977, 0.901405, 0, -10.4225, 0.872033, 0.489447, 0, 62.5187, -0.489447, 0.872033, 0, -15.0622, 0.98167, 0.190586, 0, 71.6268, -0.190586, 0.98167, 0, -19.0316, 0.998726, 0.0504612, 0, 81.5022, -0.0504612, 0.998726, 0, -20.5174, 0.999794, -0.0203211, 0, 91.4947, 0.0203211, 0.999794, 0, -20.8305, 0.997779, -0.0666037, 0, 101.488, 0.0666037, 0.997779, 0, -20.5031, 0.995204, -0.0978241, 0, 111.46, 0.0978241, 0.995204, 0, -19.7521, 0.992528, -0.122021, 0, 121.405, 0.122021, 0.992528, 0, -18.7091, 0.99009, -0.140433, 0, 131.324, 0.140433, 0.99009, 0, -17.4429, 0.987979, -0.15459, 0, 141.219, 0.15459, 0.987979, 0, -16.0016, 0.986092, -0.166203, 0, 151.094, 0.166203, 0.986092, 0, -14.4235, 0.984476, -0.175519, 0, 160.951, 0.175519, 0.984476, 0, -12.7366, 0.983271, -0.182148, 0, 170.792, 0.182148, 0.983271, 0, -10.9635, 0.982529, -0.186112, 0, 180.623, 0.186112, 0.982529, 0, -9.12998, 0.982767, -0.18485, 0, 190.448, 0.18485, 0.982767, 0, -7.26821, 0.985876, -0.167476, 0, 200.28, 0.167476, 0.985876, 0, -5.44161, 0.998275, -0.0587069, 0, 210.173, 0.0587069, 0.998275, 0, -4.04861) - -[sub_resource type="Curve2D" id="Curve2D_t0o6m"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, -23.902, -16.064, 23.902, 16.064, 64, 16, 40.9502, -53.9767, -40.9502, 53.9767, 81, 115) -} -point_count = 3 - -[sub_resource type="MultiMesh" id="MultiMesh_adgnh"] -resource_local_to_scene = true -instance_count = 18 -mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(0.998161, -0.0606213, 0, 4.9967, 0.0606213, 0.998161, 0, 0.169378, 0.992717, -0.120468, 0, 14.9649, 0.120468, 0.992717, 0, 0.941638, 0.984055, -0.177863, 0, 24.8746, 0.177863, 0.984055, 0, 2.27142, 0.969439, -0.245334, 0, 34.6825, 0.245334, 0.969439, 0, 4.21167, 0.944761, -0.32776, 0, 44.323, 0.32776, 0.944761, 0, 6.85753, 0.90068, -0.434483, 0, 53.6727, 0.434483, 0.90068, 0, 10.3906, 0.831705, -0.555218, 0, 62.5102, 0.555218, 0.831705, 0, 15.0492, 0.792282, -0.610156, 0, 70.7349, 0.610156, 0.792282, 0, 20.7335, 0.735251, -0.677795, 0, 78.5318, 0.677795, 0.735251, 0, 26.9903, 0.647282, -0.762251, 0, 85.6731, 0.762251, 0.647282, 0, 33.9812, 0.514369, -0.857569, 0, 91.8239, 0.857569, 0.514369, 0, 41.8516, 0.333145, -0.942875, 0, 96.5422, 0.942875, 0.333145, 0, 50.6492, 0.12076, -0.992682, 0, 99.3671, 0.992682, 0.12076, 0, 60.2197, -0.080349, -0.996767, 0, 100.045, 0.996767, -0.080349, 0, 70.1748, -0.262192, -0.965016, 0, 98.7245, 0.965016, -0.262192, 0, 80.0688, -0.393564, -0.919297, 0, 95.7542, 0.919297, -0.393564, 0, 89.6051, -0.491523, -0.870865, 0, 91.5784, 0.870865, -0.491523, 0, 98.6837, -0.565395, -0.82482, 0, 86.4657, 0.82482, -0.565395, 0, 107.274) - -[sub_resource type="Curve2D" id="Curve2D_k7kih"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(-79.4597, 5.29732, 79.4597, -5.29732, -142, -352, 7.99999, -67.75, -7.99999, 67.75, -143, -110, 44, 3.75, -44, -3.75, -245, 48) -} -point_count = 3 - -[sub_resource type="Curve2D" id="Curve2D_ifa0p"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, -24.017, 16.005, 24.017, -16.005, 64, -16, 0, 0, 0, 0, 128, -32) -} -point_count = 3 - -[sub_resource type="MultiMesh" id="MultiMesh_yjbhi"] -resource_local_to_scene = true -instance_count = 13 -mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(0.99808, 0.0619333, 0, 4.99647, -0.0619333, 0.99808, 0, -0.176236, 0.992584, 0.121559, 0, 14.9636, -0.121559, 0.992584, 0, -0.961502, 0.98391, 0.178663, 0, 24.872, -0.178663, 0.98391, 0, -2.30135, 0.969346, 0.2457, 0, 34.6786, -0.2457, 0.969346, 0, -4.24865, 0.94496, 0.327186, 0, 44.3185, -0.327186, 0.94496, 0, -6.89664, 0.901405, 0.432977, 0, 53.6711, -0.432977, 0.901405, 0, -10.4225, 0.847395, 0.530963, 0, 62.5187, -0.530963, 0.847395, 0, -15.0622, 0.910454, 0.413611, 0, 71.1488, -0.413611, 0.910454, 0, -20.1015, 0.949217, 0.314623, 0, 80.3623, -0.314623, 0.949217, 0, -23.9742, 0.971893, 0.235421, 0, 89.9171, -0.235421, 0.971893, 0, -26.9124, 0.985566, 0.169291, 0, 99.6749, -0.169291, 0.985566, 0, -29.0903, 0.993711, 0.111974, 0, 109.553, -0.111974, 0.993711, 0, -30.6376, 0.99852, 0.054383, 0, 119.503, -0.054383, 0.99852, 0, -31.6189) - -[sub_resource type="Curve2D" id="Curve2D_s6mpb"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, -23.902, -16.064, 23.902, 16.064, 64, 16, 0, 0, 0, 0, 53, 80) -} -point_count = 3 - -[sub_resource type="MultiMesh" id="MultiMesh_fdcvs"] -resource_local_to_scene = true -instance_count = 14 -mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(0.998161, -0.0606213, 0, 4.9967, 0.0606213, 0.998161, 0, 0.169378, 0.992717, -0.120468, 0, 14.9649, 0.120468, 0.992717, 0, 0.941638, 0.984055, -0.177863, 0, 24.8746, 0.177863, 0.984055, 0, 2.27142, 0.969439, -0.245334, 0, 34.6825, 0.245334, 0.969439, 0, 4.21167, 0.944761, -0.32776, 0, 44.323, 0.32776, 0.944761, 0, 6.85753, 0.90068, -0.434483, 0, 53.6727, 0.434483, 0.90068, 0, 10.3906, 0.800831, -0.59889, 0, 62.5102, 0.59889, 0.800831, 0, 15.0492, 0.387919, -0.921694, 0, 69.5121, 0.921694, 0.387919, 0, 21.9997, -0.00928453, -0.999957, 0, 72.2325, 0.999957, -0.00928453, 0, 31.4886, -0.243766, -0.969834, 0, 71.4367, 0.969834, -0.243766, 0, 41.4151, -0.372475, -0.928042, 0, 68.6345, 0.928042, -0.372475, 0, 51.0042, -0.453013, -0.891504, 0, 64.6923, 0.891504, -0.453013, 0, 60.1896, -0.514499, -0.857491, 0, 59.9968, 0.857491, -0.514499, 0, 69.0157, -0.567529, -0.823353, 0, 54.7185, 0.823353, -0.567529, 0, 77.5069) - -[sub_resource type="Curve2D" id="Curve2D_38uo1"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 8, 111, 0.595275, -2.57953, -0.595275, 2.57953, 117, -62) -} -point_count = 2 - -[sub_resource type="Curve2D" id="Curve2D_56v8v"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, -892, 42, 24.75, -76.75, -24.75, 76.75, -826, 123, -75.7984, -44.4472, 75.7984, 44.4472, -906, 340, 0, 0, 0, 0, -733, 381) -} -point_count = 4 - -[node name="Node2D" type="Node2D"] -script = ExtResource("1_31lvk") -car_count = 4 - -[node name="TrainEngine" parent="." instance=ExtResource("2_ee1j8")] -color = Color(0, 0.698039, 1, 1) - -[node name="Tracks" type="Node2D" parent="."] - -[node name="Track" parent="Tracks" instance=ExtResource("2_aska1")] -position = Vector2(615, 159) -rotation = 3.14159 -scale = Vector2(1.00695, 1) -curve = SubResource("Curve2D_rf02u") - -[node name="TrackSwitch" parent="Tracks" instance=ExtResource("4_wifjq")] -position = Vector2(273, 153) - -[node name="LeftTrack" parent="Tracks/TrackSwitch" index="0"] -curve = SubResource("Curve2D_6pi6j") - -[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch/LeftTrack" index="1"] -multimesh = SubResource("MultiMesh_cd0fe") - -[node name="TailPoint" parent="Tracks/TrackSwitch/LeftTrack" index="3"] -position = Vector2(211, -4) -rotation = -0.109714 -progress = 215.828 - -[node name="TrackLine" parent="Tracks/TrackSwitch/LeftTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 1.76493, -0.031045, 6.62261, -0.249297, 10.0063, -0.487274, 13.9174, -0.842432, 18.2738, -1.33823, 22.9936, -1.99813, 25.4642, -2.39694, 27.9949, -2.84558, 30.5755, -3.34697, 33.1957, -3.90405, 35.8452, -4.51975, 38.514, -5.197, 41.1916, -5.93874, 43.8678, -6.74789, 46.5325, -7.62739, 49.1753, -8.58017, 51.7861, -9.60917, 54.3545, -10.7173, 56.8703, -11.9075, 59.3234, -13.1828, 61.7033, -14.5459, 64, -16, 66.5114, -17.3712, 69.5184, -18.4928, 72.9848, -19.3787, 76.8745, -20.0424, 81.1515, -20.4977, 85.7795, -20.7582, 90.7224, -20.8376, 93.3007, -20.8137, 95.9442, -20.7497, 98.6484, -20.6472, 101.409, -20.508, 104.221, -20.3338, 107.08, -20.1264, 109.982, -19.8873, 112.921, -19.6183, 115.895, -19.3212, 118.897, -18.9977, 121.924, -18.6494, 124.971, -18.278, 128.034, -17.8854, 131.108, -17.4731, 134.188, -17.0429, 137.27, -16.5965, 140.349, -16.1357, 143.422, -15.6621, 146.483, -15.1774, 149.528, -14.6834, 152.552, -14.1817, 155.551, -13.6742, 158.521, -13.1624, 161.456, -12.648, 164.353, -12.1329, 167.206, -11.6188, 170.012, -11.1072, 172.766, -10.6, 175.463, -10.0988, 178.098, -9.60536, 180.668, -9.12141, 183.168, -8.64863, 187.939, -7.74345, 192.374, -6.9035, 196.438, -6.14248, 200.094, -5.47406, 203.307, -4.91193, 206.04, -4.46978, 208.257, -4.16128, 211, -4) - -[node name="Pointer" parent="Tracks/TrackSwitch/LeftTrack" index="5"] -position = Vector2(64, -16) - -[node name="RightTrack" parent="Tracks/TrackSwitch" index="1"] -curve = SubResource("Curve2D_t0o6m") - -[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch/RightTrack" index="1"] -multimesh = SubResource("MultiMesh_adgnh") - -[node name="TailPoint" parent="Tracks/TrackSwitch/RightTrack" index="3"] -position = Vector2(81, 115) -rotation = 2.21982 -progress = 184.466 - -[node name="TrackLine" parent="Tracks/TrackSwitch/RightTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 1.76964, 0.028625, 6.63878, 0.241, 10.0295, 0.475391, 13.9477, 0.826875, 18.311, 1.31917, 23.0368, 1.976, 25.5098, 2.37353, 28.0427, 2.82108, 30.6249, 3.32162, 33.2462, 3.87813, 35.8963, 4.49355, 38.5649, 5.17086, 41.2417, 5.91302, 43.9163, 6.723, 46.5786, 7.60376, 49.218, 8.55827, 51.8245, 9.58948, 54.3875, 10.7004, 56.8969, 11.8939, 59.3423, 13.173, 61.7135, 14.5408, 64, 16, 66.2679, 17.5441, 68.5797, 19.1661, 70.9198, 20.868, 73.2726, 22.6521, 75.6224, 24.5207, 77.9537, 26.476, 80.251, 28.5201, 82.4985, 30.6553, 84.6808, 32.8838, 86.7822, 35.2079, 88.7872, 37.6297, 90.6801, 40.1515, 92.4454, 42.7754, 94.0675, 45.5038, 95.5307, 48.3389, 96.8196, 51.2827, 97.9184, 54.3377, 98.8117, 57.5059, 99.4838, 60.7897, 99.9191, 64.1912, 100.102, 67.7126, 100.017, 71.3562, 99.6485, 75.1242, 98.9808, 79.0188, 97.9985, 83.0423, 96.6858, 87.1968, 95.0272, 91.4845, 93.0071, 95.9078, 91.8566, 98.1709, 90.6099, 100.469, 89.265, 102.802, 87.8201, 105.17, 86.273, 107.573, 84.622, 110.013, 82.8649, 112.488, 81, 115) - -[node name="Track2" parent="Tracks" instance=ExtResource("2_aska1")] -position = Vector2(28, 201) -rotation = -3.14159 -curve = SubResource("Curve2D_k7kih") - -[node name="TrackSwitch2" parent="Tracks" instance=ExtResource("4_wifjq")] -position = Vector2(298, 521) -rotation = -3.14159 - -[node name="LeftTrack" parent="Tracks/TrackSwitch2" index="0"] -curve = SubResource("Curve2D_ifa0p") - -[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch2/LeftTrack" index="1"] -multimesh = SubResource("MultiMesh_yjbhi") - -[node name="RightTrack" parent="Tracks/TrackSwitch2" index="1"] -curve = SubResource("Curve2D_s6mpb") - -[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch2/RightTrack" index="1"] -multimesh = SubResource("MultiMesh_fdcvs") - -[node name="TailPoint" parent="Tracks/TrackSwitch2/RightTrack" index="3"] -position = Vector2(53, 80) -rotation = 1.74101 -progress = 138.028 - -[node name="TrackLine" parent="Tracks/TrackSwitch2/RightTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 1.76964, 0.028625, 6.63878, 0.241, 10.0295, 0.475391, 13.9477, 0.826875, 18.311, 1.31917, 23.0368, 1.976, 25.5098, 2.37353, 28.0427, 2.82108, 30.6249, 3.32162, 33.2462, 3.87813, 35.8963, 4.49355, 38.5649, 5.17086, 41.2417, 5.91302, 43.9163, 6.723, 46.5786, 7.60376, 49.218, 8.55827, 51.8245, 9.58948, 54.3875, 10.7004, 56.8969, 11.8939, 59.3423, 13.173, 61.7135, 14.5408, 64, 16, 66.0714, 17.5969, 67.8154, 19.366, 70.3898, 23.3621, 71.8606, 27.8714, 72.3649, 32.777, 72.2976, 35.3419, 72.0401, 37.962, 71.6096, 40.6227, 71.0233, 43.3094, 70.2984, 46.0075, 69.452, 48.7024, 68.5012, 51.3794, 67.4632, 54.024, 66.3553, 56.6215, 65.1944, 59.1574, 63.9979, 61.617, 62.7828, 63.9856, 61.5662, 66.2488, 60.3655, 68.3918, 58.08, 72.259, 56.0634, 75.4703, 54.453, 77.9089, 53, 80) - -[node name="Pointer" parent="Tracks/TrackSwitch2/RightTrack" index="5"] -position = Vector2(64, 16) - -[node name="Track3" parent="Tracks" instance=ExtResource("2_aska1")] -position = Vector2(237, 330) -curve = SubResource("Curve2D_38uo1") - -[node name="Timer" type="Timer" parent="."] -wait_time = 0.1 -one_shot = true -autostart = true - -[node name="TrainStation" parent="." instance=ExtResource("4_kq6cn")] -position = Vector2(641, 489) - -[node name="Track" parent="." instance=ExtResource("2_aska1")] -position = Vector2(1376, 108) -curve = SubResource("Curve2D_56v8v") - -[node name="TrainRoute" parent="." node_paths=PackedStringArray("train") instance=ExtResource("6_sec3k")] -train = NodePath("../TrainEngine") - -[node name="TrainRouteStop" parent="TrainRoute" node_paths=PackedStringArray("station") instance=ExtResource("7_hql3n")] -station = NodePath("../../TrainStation") -delay = 40.0 - -[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] - -[editable path="Tracks/TrackSwitch"] -[editable path="Tracks/TrackSwitch/LeftTrack"] -[editable path="Tracks/TrackSwitch/RightTrack"] -[editable path="Tracks/TrackSwitch2"] -[editable path="Tracks/TrackSwitch2/LeftTrack"] -[editable path="Tracks/TrackSwitch2/RightTrack"] diff --git a/scenes/test_track_1.tscn b/scenes/test_track_1.tscn deleted file mode 100644 index 3337e67..0000000 --- a/scenes/test_track_1.tscn +++ /dev/null @@ -1,368 +0,0 @@ -[gd_scene load_steps=31 format=3 uid="uid://cadcn8wkc5qsa"] - -[ext_resource type="Script" path="res://scripts/TestTrack1.gd" id="1_4j3ii"] -[ext_resource type="PackedScene" uid="uid://d1xy67euifbh6" path="res://prefabs/Track.tscn" id="1_xd5th"] -[ext_resource type="Script" path="res://scripts/TracksController.gd" id="2_1mxdt"] -[ext_resource type="PackedScene" uid="uid://bm5dq3lcopsvl" path="res://prefabs/TrackSwitch.tscn" id="2_3o3ks"] -[ext_resource type="PackedScene" uid="uid://ctghq2lknpslx" path="res://prefabs/TrainStation.tscn" id="3_xcxqr"] -[ext_resource type="PackedScene" uid="uid://c5rp2hi42rfrv" path="res://prefabs/TrainEngine.tscn" id="5_i7i1o"] -[ext_resource type="PackedScene" uid="uid://c7r1kx700h11u" path="res://prefabs/TrainRoute.tscn" id="6_gcl3h"] -[ext_resource type="PackedScene" uid="uid://c4ncuqtx6xes" path="res://prefabs/TrainRouteStop.tscn" id="7_ws50l"] - -[sub_resource type="Curve2D" id="Curve2D_5ytd8"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 544, 16, -45, -45, 45, 45, 664, 56, 2.08165e-12, 2.08165e-12, 10.6838, 22.4144, 704, 128) -} -point_count = 3 - -[sub_resource type="Curve2D" id="Curve2D_2hjnx"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(-43.9422, -0.960031, 43.9422, 0.960031, 2.08165e-12, 2.08165e-12, -0.41989, -34.0143, 0.41989, 34.0143, 64, 72, 0, 0, 0, 0, 64, 128) -} -point_count = 3 - -[sub_resource type="ArrayMesh" id="ArrayMesh_umy7o"] -_surfaces = [{ -"2d": true, -"aabb": AABB(-1.5, -13.5, 0, 3.00001, 27, 0), -"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0), -"format": 33558545, -"index_count": 6, -"index_data": PackedByteArray(3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 0), -"primitive": 3, -"vertex_count": 4, -"vertex_data": PackedByteArray(0, 0, 192, 63, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 65, 0, 0, 192, 191, 0, 0, 88, 193, 0, 0, 192, 63, 0, 0, 88, 193) -}] - -[sub_resource type="MultiMesh" id="MultiMesh_vqlwl"] -resource_local_to_scene = true -instance_count = 16 -mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(0.992327, -0.123641, 0, 4.99044, 0.123641, 0.992327, 0, 0.290575, 0.962388, -0.271678, 0, 14.8556, 0.271678, 0.962388, 0, 1.86741, 0.90543, -0.424495, 0, 24.3492, 0.424495, 0.90543, 0, 4.96879, 0.818401, -0.574647, 0, 33.1875, 0.574647, 0.818401, 0, 9.61463, 0.708248, -0.705964, 0, 41.0933, 0.705964, 0.708248, 0, 15.7144, 0.586411, -0.810013, 0, 47.872, 0.810013, 0.586411, 0, 23.0491, 0.462831, -0.886447, 0, 53.4373, 0.886447, 0.462831, 0, 31.3455, 0.342998, -0.939336, 0, 57.7867, 0.939336, 0.342998, 0, 40.342, 0.229513, -0.973306, 0, 60.9541, 0.973306, 0.229513, 0, 49.821, 0.120222, -0.992747, 0, 62.9901, 0.992747, 0.120222, 0, 59.606, 0.0206377, -0.999787, 0, 63.9268, 0.999787, 0.0206377, 0, 69.5566, 0.00835572, -0.999965, 0, 64.0814, 0.999965, 0.00835572, 0, 79.5551, 0.00414735, -0.999991, 0, 64.1545, 0.999991, 0.00414735, 0, 89.5548, -0.000117465, -1, 0, 64.1852, 1, -0.000117465, 0, 99.5547, -0.00508728, -0.999987, 0, 64.1715, 0.999987, -0.00508728, 0, 109.555, -0.0112259, -0.999937, 0, 64.1074, 0.999937, -0.0112259, 0, 119.554) - -[sub_resource type="Curve2D" id="Curve2D_jdlbk"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 96, 0) -} -point_count = 2 - -[sub_resource type="MultiMesh" id="MultiMesh_6ypi5"] -resource_local_to_scene = true -instance_count = 10 -mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(1, 2.16838e-14, 0, 5, -2.16838e-14, 1, 0, 1.97323e-12, 1, 2.16839e-14, 0, 15, -2.16839e-14, 1, 0, 1.75639e-12, 1, 2.16839e-14, 0, 25, -2.16839e-14, 1, 0, 1.53955e-12, 1, 2.16838e-14, 0, 35, -2.16838e-14, 1, 0, 1.32272e-12, 1, 2.16838e-14, 0, 45, -2.16838e-14, 1, 0, 1.10588e-12, 1, 2.16839e-14, 0, 55, -2.16839e-14, 1, 0, 8.89038e-13, 1, 2.16838e-14, 0, 65, -2.16838e-14, 1, 0, 6.72199e-13, 1, 2.16838e-14, 0, 75, -2.16838e-14, 1, 0, 4.55361e-13, 1, 2.16839e-14, 0, 85, -2.16839e-14, 1, 0, 2.38522e-13, 1, 2.16839e-14, 0, 95, -2.16839e-14, 1, 0, 2.16839e-14) - -[sub_resource type="Curve2D" id="Curve2D_1ghy7"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, -24.017, 16.005, 24.017, -16.005, 74, -12, -0.15749, -0.15749, 0.15749, 0.15749, 130, -28) -} -point_count = 3 - -[sub_resource type="MultiMesh" id="MultiMesh_mevmg"] -resource_local_to_scene = true -instance_count = 14 -mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(0.999648, -0.026521, 0, 4.99242, 0.026521, 0.999648, 0, 0.271338, 0.999906, 0.0136889, 0, 14.9902, -0.0136889, 0.999906, 0, 0.430786, 0.998032, 0.0627002, 0, 24.9858, -0.0627002, 0.998032, 0, 0.172665, 0.993346, 0.115172, 0, 34.9562, -0.115172, 0.993346, 0, -0.580401, 0.982975, 0.18374, 0, 44.8662, -0.18374, 0.982975, 0, -1.90406, 0.961156, 0.276007, 0, 54.6501, -0.276007, 0.961156, 0, -3.95497, 0.915015, 0.40342, 0, 64.1712, -0.40342, 0.915015, 0, -6.99119, 0.848704, 0.528868, 0, 73.1065, -0.528868, 0.848704, 0, -11.4457, 0.903296, 0.429017, 0, 81.7289, -0.429017, 0.903296, 0, -16.4998, 0.944942, 0.327237, 0, 90.871, -0.327237, 0.944942, 0, -20.5389, 0.96897, 0.247177, 0, 100.381, -0.247177, 0.96897, 0, -23.6171, 0.985394, 0.170292, 0, 110.115, -0.170292, 0.985394, 0, -25.8932, 0.995921, 0.0902245, 0, 120, -0.0902245, 0.995921, 0, -27.3868, 0.999953, -0.00967744, 0, 129.974, 0.00967744, 0.999953, 0, -28.0002) - -[sub_resource type="Curve2D" id="Curve2D_agot6"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, -23.902, -16.064, 23.902, 16.064, 64, 16, 0, 0, 0, 0, 80, 65) -} -point_count = 3 - -[sub_resource type="MultiMesh" id="MultiMesh_u62bb"] -resource_local_to_scene = true -instance_count = 12 -mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(0.998161, -0.0606213, 0, 4.9967, 0.0606213, 0.998161, 0, 0.169378, 0.992717, -0.120468, 0, 14.9649, 0.120468, 0.992717, 0, 0.941638, 0.984055, -0.177863, 0, 24.8746, 0.177863, 0.984055, 0, 2.27142, 0.969439, -0.245334, 0, 34.6825, 0.245334, 0.969439, 0, 4.21167, 0.944761, -0.32776, 0, 44.323, 0.32776, 0.944761, 0, 6.85753, 0.90068, -0.434483, 0, 53.6727, 0.434483, 0.90068, 0, 10.3906, 0.817576, -0.575821, 0, 62.5102, 0.575821, 0.817576, 0, 15.0492, 0.63649, -0.771285, 0, 70.2234, 0.771285, 0.63649, 0, 21.3568, 0.414092, -0.910235, 0, 76.0271, 0.910235, 0.414092, 0, 29.4489, 0.193854, -0.98103, 0, 79.608, 0.98103, 0.193854, 0, 38.7571, 0.0270504, -0.999634, 0, 81.1038, 0.999634, 0.0270504, 0, 48.6292, -0.131902, -0.991263, 0, 80.9487, 0.991263, -0.131902, 0, 58.6157) - -[sub_resource type="Curve2D" id="Curve2D_gl7m7"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, -24.017, 16.005, 24.017, -16.005, 64, -16, 1.83541, 39.2943, -1.83541, -39.2943, 115, -89) -} -point_count = 3 - -[sub_resource type="MultiMesh" id="MultiMesh_u1yjv"] -resource_local_to_scene = true -instance_count = 16 -mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(0.99808, 0.0619333, 0, 4.99647, -0.0619333, 0.99808, 0, -0.176236, 0.992584, 0.121559, 0, 14.9636, -0.121559, 0.992584, 0, -0.961502, 0.98391, 0.178663, 0, 24.872, -0.178663, 0.98391, 0, -2.30135, 0.969346, 0.2457, 0, 34.6786, -0.2457, 0.969346, 0, -4.24865, 0.94496, 0.327186, 0, 44.3185, -0.327186, 0.94496, 0, -6.89664, 0.901405, 0.432977, 0, 53.6711, -0.432977, 0.901405, 0, -10.4225, 0.837023, 0.547167, 0, 62.5187, -0.547167, 0.837023, 0, -15.0622, 0.827404, 0.561607, 0, 70.8643, -0.561607, 0.827404, 0, -20.5707, 0.805572, 0.592498, 0, 79.0941, -0.592498, 0.805572, 0, -26.2507, 0.76406, 0.645145, 0, 87.0616, -0.645145, 0.76406, 0, -32.2911, 0.697405, 0.716677, 0, 94.5499, -0.716677, 0.697405, 0, -38.9132, 0.599872, 0.800096, 0, 101.303, -0.800096, 0.599872, 0, -46.2796, 0.466576, 0.884481, 0, 106.978, -0.884481, 0.466576, 0, -54.5005, 0.307666, 0.951494, 0, 111.271, -0.951494, 0.307666, 0, -63.5181, 0.148572, 0.988902, 0, 113.941, -0.988902, 0.148572, 0, -73.1413, -0.00053732, 1, 0, 115.024, -1, -0.00053732, 0, -83.0706) - -[sub_resource type="Curve2D" id="Curve2D_xdxc8"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, -23.902, -16.064, 23.902, 16.064, 64, 16, 0, 0, 0, 0, 128, 32) -} -point_count = 3 - -[sub_resource type="MultiMesh" id="MultiMesh_5mimc"] -resource_local_to_scene = true -instance_count = 13 -mesh = SubResource("ArrayMesh_umy7o") -buffer = PackedFloat32Array(0.998161, -0.0606213, 0, 4.9967, 0.0606213, 0.998161, 0, 0.169378, 0.992717, -0.120468, 0, 14.9649, 0.120468, 0.992717, 0, 0.941638, 0.984055, -0.177863, 0, 24.8746, 0.177863, 0.984055, 0, 2.27142, 0.969439, -0.245334, 0, 34.6825, 0.245334, 0.969439, 0, 4.21167, 0.944761, -0.32776, 0, 44.323, 0.32776, 0.944761, 0, 6.85753, 0.90068, -0.434483, 0, 53.6727, 0.434483, 0.90068, 0, 10.3906, 0.845464, -0.534033, 0, 62.5102, 0.534033, 0.845464, 0, 15.0492, 0.909689, -0.415289, 0, 71.1239, 0.415289, 0.909689, 0, 20.116, 0.949047, -0.315133, 0, 80.3316, 0.315133, 0.949047, 0, 24.0021, 0.971927, -0.235281, 0, 89.8854, 0.235281, 0.971927, 0, 26.9434, 0.985684, -0.168601, 0, 99.6439, 0.168601, 0.985684, 0, 29.1182, 0.993824, -0.110965, 0, 109.523, 0.110965, 0.993824, 0, 30.6578, 0.998585, -0.0531809, 0, 119.475, 0.0531809, 0.998585, 0, 31.6286) - -[sub_resource type="Curve2D" id="Curve2D_uq2bq"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0.198425, 2.08165e-12, 2.08165e-12, -99, 204, -27, 115, 27, -115, -230, 100, 0, 0, 0, 0, -61, -16, -36.2647, 2.46773, 36.2647, -2.46773, 251, -32, 0.891905, 2.08165e-12, -0.891905, -2.08165e-12, 291, -96) -} -point_count = 5 - -[sub_resource type="Curve2D" id="Curve2D_w101q"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(-0.788518, -3.15158, 0.788518, 3.15158, -34, -53, -60.1357, 12.4726, 60.1357, -12.4726, 118, -85, -10.3306, -1.68979, 10.3306, 1.68979, 302, -117) -} -point_count = 3 - -[sub_resource type="Curve2D" id="Curve2D_ncru3"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(-2.35969, -4.01147, 2.35969, 4.01147, 109, -214, -28.3162, -53.8008, 28.3162, 53.8008, 91, 104, 0, 0, 0, 0, 203, 146, -31.1479, -0.943874, 31.1479, 0.943874, 256, 148, -54.2378, 5.04538, 54.2378, -5.04538, 858, 143, 1.68369, 8.69908, -1.68369, -8.69908, 940, 106) -} -point_count = 6 - -[sub_resource type="Curve2D" id="Curve2D_38jn6"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 256, 2.08165e-12) -} -point_count = 2 - -[sub_resource type="Curve2D" id="Curve2D_sis42"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 248, 0, 0, 0, 0, 0, -56, 0) -} -point_count = 2 - -[sub_resource type="Curve2D" id="Curve2D_2f2g8"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 86.267, 0, -86.267, 96, -88, 0, 0, 0, 0, 0, -168, 0, 0, 0, 0, -160, -168) -} -point_count = 4 - -[sub_resource type="Curve2D" id="Curve2D_yi26a"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 2.08165e-12, 2.08165e-12, 0, 0, 0, 0, 256, 2.08165e-12) -} -point_count = 2 - -[sub_resource type="Curve2D" id="Curve2D_h7ahl"] -resource_local_to_scene = true -_data = { -"points": PackedVector2Array(0, 0, 0, 0, 232, 72, -25.1984, 30.2381, 25.1984, -30.2381, 248, -32, 0.787451, 0.629961, -0.787451, -0.629961, 328, -56) -} -point_count = 3 - -[node name="TestTrack1" type="Node2D"] -script = ExtResource("1_4j3ii") - -[node name="Tracks" type="Node2D" parent="."] -script = ExtResource("2_1mxdt") - -[node name="Track" parent="Tracks" instance=ExtResource("1_xd5th")] -curve = SubResource("Curve2D_5ytd8") - -[node name="TrackSwitch" parent="Tracks" instance=ExtResource("2_3o3ks")] -position = Vector2(704, 128) -rotation = 1.5708 - -[node name="LeftTrack" parent="Tracks/TrackSwitch" index="0"] -curve = SubResource("Curve2D_2hjnx") - -[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch/LeftTrack" index="1"] -multimesh = SubResource("MultiMesh_vqlwl") - -[node name="HeadPoint" parent="Tracks/TrackSwitch/LeftTrack" index="2"] -rotation = 0.0218441 - -[node name="TailPoint" parent="Tracks/TrackSwitch/LeftTrack" index="3"] -position = Vector2(64, 128) -rotation = 1.5708 -progress = 163.446 - -[node name="TrackLine" parent="Tracks/TrackSwitch/LeftTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4.04853, 0.194471, 7.95559, 0.59311, 11.7221, 1.18876, 15.349, 1.97427, 18.8372, 2.94247, 22.1877, 4.08623, 25.4013, 5.39837, 28.4791, 6.87175, 31.4219, 8.49921, 34.2306, 10.2736, 36.9063, 12.1878, 39.4498, 14.2345, 41.8621, 16.4068, 44.1441, 18.6973, 46.2967, 21.099, 48.3209, 23.6046, 50.2175, 26.2072, 51.9876, 28.8994, 53.6321, 31.6741, 55.1518, 34.5242, 56.5478, 37.4425, 57.8209, 40.4219, 58.972, 43.4552, 60.0022, 46.5352, 60.9124, 49.6549, 61.7034, 52.8069, 62.3762, 55.9843, 62.9318, 59.1798, 63.371, 62.3863, 63.6948, 65.5966, 63.9042, 68.8035, 64, 72, 64.0369, 75.1533, 64.0692, 78.2343, 64.097, 81.2412, 64.1206, 84.1721, 64.1401, 87.0252, 64.1559, 89.7988, 64.1682, 92.4909, 64.1771, 95.0998, 64.1861, 100.061, 64.1845, 104.666, 64.1744, 108.903, 64.1575, 112.755, 64.1356, 116.209, 64.1107, 119.25, 64.0591, 124.033, 64, 128) - -[node name="Pointer" parent="Tracks/TrackSwitch/LeftTrack" index="5"] -position = Vector2(54.2924, 32.8752) -rotation = 1.07745 - -[node name="RightTrack" parent="Tracks/TrackSwitch" index="1"] -curve = SubResource("Curve2D_jdlbk") - -[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch/RightTrack" index="1"] -multimesh = SubResource("MultiMesh_6ypi5") - -[node name="HeadPoint" parent="Tracks/TrackSwitch/RightTrack" index="2"] -rotation = -2.16839e-14 - -[node name="TailPoint" parent="Tracks/TrackSwitch/RightTrack" index="3"] -position = Vector2(96, 0) -rotation = -2.16839e-14 -progress = 96.0 - -[node name="TrackLine" parent="Tracks/TrackSwitch/RightTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 4.125, 1.9922e-12, 8.85938, 1.88954e-12, 11.7715, 1.8264e-12, 15, 1.75639e-12, 18.5098, 1.68029e-12, 22.2656, 1.59885e-12, 26.2324, 1.51283e-12, 30.375, 1.423e-12, 34.6582, 1.33013e-12, 39.0469, 1.23496e-12, 43.5059, 1.13828e-12, 48, 1.04082e-12, 52.4941, 9.43375e-13, 56.9531, 8.46687e-13, 61.3418, 7.51523e-13, 65.625, 6.58647e-13, 69.7676, 5.6882e-13, 73.7344, 4.82805e-13, 77.4902, 4.01363e-13, 81, 3.25258e-13, 84.2285, 2.55251e-13, 87.1406, 1.92105e-13, 91.875, 8.94459e-14, 96, 0) - -[node name="Pointer" parent="Tracks/TrackSwitch/RightTrack" index="5"] -position = Vector2(66.7824, 6.3355e-13) -rotation = -2.16839e-14 - -[node name="TrackSwitch2" parent="Tracks" instance=ExtResource("2_3o3ks")] -position = Vector2(870, 524) - -[node name="LeftTrack" parent="Tracks/TrackSwitch2" index="0"] -curve = SubResource("Curve2D_1ghy7") - -[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch2/LeftTrack" index="1"] -multimesh = SubResource("MultiMesh_mevmg") - -[node name="HeadPoint" parent="Tracks/TrackSwitch2/LeftTrack" index="2"] -rotation = -0.160763 - -[node name="TailPoint" parent="Tracks/TrackSwitch2/LeftTrack" index="3"] -position = Vector2(130, -28) -rotation = 0.78541 -progress = 135.026 - -[node name="TrackLine" parent="Tracks/TrackSwitch2/LeftTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 2.19462, 0.14083, 4.771, 0.2641, 8.18511, 0.375703, 12.3257, 0.44046, 17.0815, 0.423193, 19.6553, 0.372808, 22.3412, 0.288724, 25.1253, 0.166546, 27.9936, 0.00187469, 30.9323, -0.209686, 33.9275, -0.472533, 36.9652, -0.791065, 40.0316, -1.16968, 43.1127, -1.61277, 46.1946, -2.12474, 49.2635, -2.70998, 52.3053, -3.37289, 55.3063, -4.11787, 58.2525, -4.94932, 61.1299, -5.87162, 63.9248, -6.88919, 66.6231, -8.00641, 69.2111, -9.22769, 71.6747, -10.5574, 74, -12, 76.2733, -13.4545, 78.5851, -14.819, 80.9281, -16.0962, 83.2953, -17.2891, 85.6793, -18.4006, 88.0729, -19.4333, 90.4689, -20.3903, 92.86, -21.2743, 97.5989, -22.8347, 102.232, -24.1375, 106.7, -25.2053, 110.947, -26.0609, 114.915, -26.7272, 118.545, -27.2268, 121.779, -27.5825, 124.561, -27.8171, 128.534, -28.0142, 130, -28) - -[node name="Pointer" parent="Tracks/TrackSwitch2/LeftTrack" index="5"] -position = Vector2(65.8023, -7.65092) -rotation = -0.401816 - -[node name="RightTrack" parent="Tracks/TrackSwitch2" index="1"] -curve = SubResource("Curve2D_agot6") - -[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch2/RightTrack" index="1"] -multimesh = SubResource("MultiMesh_u62bb") - -[node name="TailPoint" parent="Tracks/TrackSwitch2/RightTrack" index="3"] -position = Vector2(80, 65) -rotation = 1.25518 -progress = 121.458 - -[node name="TrackLine" parent="Tracks/TrackSwitch2/RightTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 1.76964, 0.028625, 6.63878, 0.241, 10.0295, 0.475391, 13.9477, 0.826875, 18.311, 1.31917, 23.0368, 1.976, 25.5098, 2.37353, 28.0427, 2.82108, 30.6249, 3.32162, 33.2462, 3.87813, 35.8963, 4.49355, 38.5649, 5.17086, 41.2417, 5.91302, 43.9163, 6.723, 46.5786, 7.60376, 49.218, 8.55827, 51.8245, 9.58948, 54.3875, 10.7004, 56.8969, 11.8939, 59.3423, 13.173, 61.7135, 14.5408, 64, 16, 66.1488, 17.5539, 68.1186, 19.1976, 71.55, 22.7176, 74.3523, 26.4871, 76.5837, 30.4333, 78.3023, 34.4829, 79.5663, 38.5633, 80.4339, 42.6013, 80.9632, 46.524, 81.2125, 50.2585, 81.2398, 53.7317, 81.1033, 56.8708, 80.8612, 59.6027, 80.2929, 63.5534, 80, 65) - -[node name="Pointer" parent="Tracks/TrackSwitch2/RightTrack" index="5"] -position = Vector2(64, 16) - -[node name="TrackSwitch3" parent="Tracks" instance=ExtResource("2_3o3ks")] -position = Vector2(151, 141) -rotation = 1.5708 - -[node name="LeftTrack" parent="Tracks/TrackSwitch3" index="0"] -curve = SubResource("Curve2D_gl7m7") - -[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch3/LeftTrack" index="1"] -multimesh = SubResource("MultiMesh_u1yjv") - -[node name="TailPoint" parent="Tracks/TrackSwitch3/LeftTrack" index="3"] -position = Vector2(115, -89) -rotation = -1.61747 -progress = 160.931 - -[node name="TrackLine" parent="Tracks/TrackSwitch3/LeftTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 1.76493, -0.031045, 6.62261, -0.249297, 10.0063, -0.487274, 13.9174, -0.842432, 18.2738, -1.33823, 22.9936, -1.99813, 25.4642, -2.39694, 27.9949, -2.84558, 30.5755, -3.34697, 33.1957, -3.90405, 35.8452, -4.51975, 38.514, -5.197, 41.1916, -5.93874, 43.8678, -6.74789, 46.5325, -7.62739, 49.1753, -8.58017, 51.7861, -9.60917, 54.3545, -10.7173, 56.8703, -11.9075, 59.3234, -13.1828, 61.7033, -14.5459, 64, -16, 66.2646, -17.506, 68.5508, -19.0257, 70.8522, -20.5625, 73.1622, -22.1202, 75.4744, -23.7024, 77.7822, -25.3128, 80.0793, -26.955, 82.359, -28.6326, 84.615, -30.3493, 86.8406, -32.1087, 89.0294, -33.9145, 91.175, -35.7703, 93.2708, -37.6798, 95.3103, -39.6465, 97.2871, -41.6742, 99.1947, -43.7665, 101.026, -45.927, 102.776, -48.1594, 104.437, -50.4673, 106.002, -52.8544, 107.466, -55.3243, 108.822, -57.8806, 110.063, -60.527, 111.183, -63.2672, 112.175, -66.1047, 113.033, -69.0432, 113.75, -72.0865, 114.321, -75.238, 114.737, -78.5014, 114.994, -81.8805, 115.083, -85.3788, 115, -89) - -[node name="Pointer" parent="Tracks/TrackSwitch3/LeftTrack" index="5"] -position = Vector2(64, -16) - -[node name="RightTrack" parent="Tracks/TrackSwitch3" index="1"] -curve = SubResource("Curve2D_xdxc8") - -[node name="MultiMeshInstance2D" parent="Tracks/TrackSwitch3/RightTrack" index="1"] -multimesh = SubResource("MultiMesh_5mimc") - -[node name="TailPoint" parent="Tracks/TrackSwitch3/RightTrack" index="3"] -position = Vector2(128, 32) - -[node name="TrackLine" parent="Tracks/TrackSwitch3/RightTrack" index="4"] -points = PackedVector2Array(2.08165e-12, 2.08165e-12, 1.76964, 0.028625, 6.63878, 0.241, 10.0295, 0.475391, 13.9477, 0.826875, 18.311, 1.31917, 23.0368, 1.976, 25.5098, 2.37353, 28.0427, 2.82108, 30.6249, 3.32162, 33.2462, 3.87813, 35.8963, 4.49355, 38.5649, 5.17086, 41.2417, 5.91302, 43.9163, 6.723, 46.5786, 7.60376, 49.218, 8.55827, 51.8245, 9.58948, 54.3875, 10.7004, 56.8969, 11.8939, 59.3423, 13.173, 61.7135, 14.5408, 64, 16, 66.2865, 17.4592, 68.6577, 18.827, 71.1031, 20.1061, 73.6125, 21.2996, 76.1756, 22.4105, 78.782, 23.4417, 81.4214, 24.3962, 84.0837, 25.277, 86.7583, 26.087, 89.4351, 26.8291, 92.1037, 27.5065, 94.7538, 28.1219, 97.3751, 28.6784, 99.9574, 29.1789, 102.49, 29.6265, 104.963, 30.024, 109.689, 30.6808, 114.052, 31.1731, 117.97, 31.5246, 121.361, 31.759, 126.23, 31.9714, 128, 32) - -[node name="Pointer" parent="Tracks/TrackSwitch3/RightTrack" index="5"] -position = Vector2(64, 16) - -[node name="Track2" parent="Tracks" instance=ExtResource("1_xd5th")] -position = Vector2(413, 320) -curve = SubResource("Curve2D_uq2bq") - -[node name="Track3" parent="Tracks" instance=ExtResource("1_xd5th")] -position = Vector2(274, 309) -curve = SubResource("Curve2D_w101q") - -[node name="Track4" parent="Tracks" instance=ExtResource("1_xd5th")] -position = Vector2(10, 483) -curve = SubResource("Curve2D_ncru3") - -[node name="Track5" parent="Tracks" instance=ExtResource("1_xd5th")] -position = Vector2(614, 524) -curve = SubResource("Curve2D_38jn6") - -[node name="Track6" parent="Tracks" instance=ExtResource("1_xd5th")] -position = Vector2(1056, 496) -curve = SubResource("Curve2D_sis42") - -[node name="Track7" parent="Tracks" instance=ExtResource("1_xd5th")] -position = Vector2(1304, 496) -curve = SubResource("Curve2D_2f2g8") - -[node name="Track8" parent="Tracks" instance=ExtResource("1_xd5th")] -position = Vector2(888, 328) -curve = SubResource("Curve2D_yi26a") - -[node name="TrainStation" parent="." instance=ExtResource("3_xcxqr")] -position = Vector2(314, 524) - -[node name="TrainEngine1" parent="." instance=ExtResource("5_i7i1o")] -color = Color(1, 0, 0, 1) - -[node name="TrainEngine2" parent="." instance=ExtResource("5_i7i1o")] -color = Color(0, 0, 1, 1) - -[node name="TrainStation2" parent="." instance=ExtResource("3_xcxqr")] -position = Vector2(248, 16) - -[node name="TrainRoute2" parent="." node_paths=PackedStringArray("train") instance=ExtResource("6_gcl3h")] -train = NodePath("../TrainEngine2") - -[node name="TrainRouteStop" parent="TrainRoute2" node_paths=PackedStringArray("station") instance=ExtResource("7_ws50l")] -station = NodePath("../../TrainStation") - -[node name="TrainRouteStop2" parent="TrainRoute2" node_paths=PackedStringArray("station") instance=ExtResource("7_ws50l")] -station = NodePath("../../TrainStation2") - -[node name="TrainRoute" parent="." node_paths=PackedStringArray("train") instance=ExtResource("6_gcl3h")] -train = NodePath("../TrainEngine1") - -[node name="TrainRouteStop" parent="TrainRoute" node_paths=PackedStringArray("station") instance=ExtResource("7_ws50l")] -station = NodePath("../../TrainStation") - -[node name="TrainRouteStop2" parent="TrainRoute" node_paths=PackedStringArray("station") instance=ExtResource("7_ws50l")] -station = NodePath("../../TrainStation2") - -[node name="Track" parent="." instance=ExtResource("1_xd5th")] -position = Vector2(-80, 72) -curve = SubResource("Curve2D_h7ahl") - -[editable path="Tracks/TrackSwitch"] -[editable path="Tracks/TrackSwitch/LeftTrack"] -[editable path="Tracks/TrackSwitch/RightTrack"] -[editable path="Tracks/TrackSwitch2"] -[editable path="Tracks/TrackSwitch2/LeftTrack"] -[editable path="Tracks/TrackSwitch2/RightTrack"] -[editable path="Tracks/TrackSwitch3"] -[editable path="Tracks/TrackSwitch3/LeftTrack"] -[editable path="Tracks/TrackSwitch3/RightTrack"] diff --git a/scripts/TestTrack1.gd b/scripts/TestTrack1.gd deleted file mode 100644 index 962b8d4..0000000 --- a/scripts/TestTrack1.gd +++ /dev/null @@ -1,28 +0,0 @@ -extends Node - -@export var car_count = 2 - -@onready var _train_vehicle_reference = load("res://prefabs/TrainVehicle.tscn") -@onready var _engine1: TrainEngine = $TrainEngine1 -@onready var _engine2: TrainEngine = $TrainEngine2 -@onready var _tracks_controller: TracksController = $Tracks - -func _ready(): - self._engine1.connect_tracks_controller(self._tracks_controller) - self._engine2.connect_tracks_controller(self._tracks_controller) - self._engine1.add_to_track($Tracks/Track8, 500) - self._engine2.add_to_track($Tracks/Track2, 500) - - var last_car = self._engine1 - for index in range(car_count): - var car = self._train_vehicle_reference.instantiate() - add_child(car) - last_car.set_follower_car(car) - last_car = car - - last_car = self._engine2 - for index in range(car_count): - var car = self._train_vehicle_reference.instantiate() - add_child(car) - last_car.set_follower_car(car) - last_car = car diff --git a/scripts/track1.gd b/scripts/track1.gd deleted file mode 100644 index d25503c..0000000 --- a/scripts/track1.gd +++ /dev/null @@ -1,20 +0,0 @@ -extends Node - -@export var car_count = 25 - -@onready var train_vehicle_reference = load("res://prefabs/TrainVehicle.tscn") -@onready var engine = $TrainEngine - -func _setup_train(): - #engine.connect("train_info", $TestWorld, "update_train_info") - engine.add_to_track($Tracks/Track, 500) - - var last_car = engine - for index in range(car_count): - var car = train_vehicle_reference.instantiate() - add_child(car) - last_car.set_follower_car(car) - last_car = car - -func _on_Timer_timeout(): - _setup_train()