diff --git a/Assets/Textures/Opera_senza_titolo (3).png b/Assets/Textures/Opera_senza_titolo (3).png new file mode 100644 index 0000000..57b2fb9 Binary files /dev/null and b/Assets/Textures/Opera_senza_titolo (3).png differ diff --git a/Assets/Textures/Opera_senza_titolo (3).png.import b/Assets/Textures/Opera_senza_titolo (3).png.import new file mode 100644 index 0000000..6dc69c0 --- /dev/null +++ b/Assets/Textures/Opera_senza_titolo (3).png.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://5nu7hitxgm2p" +path.s3tc="res://.godot/imported/Opera_senza_titolo (3).png-23e881f022353c47864987e0da03b76c.s3tc.ctex" +path.etc2="res://.godot/imported/Opera_senza_titolo (3).png-23e881f022353c47864987e0da03b76c.etc2.ctex" +metadata={ +"imported_formats": ["s3tc", "etc2"], +"vram_texture": true +} + +[deps] + +source_file="res://Assets/Textures/Opera_senza_titolo (3).png" +dest_files=["res://.godot/imported/Opera_senza_titolo (3).png-23e881f022353c47864987e0da03b76c.s3tc.ctex", "res://.godot/imported/Opera_senza_titolo (3).png-23e881f022353c47864987e0da03b76c.etc2.ctex"] + +[params] + +compress/mode=2 +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/bptc_ldr=0 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +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=0 diff --git a/Assets/Textures/Opera_senza_titolo (4).png b/Assets/Textures/Opera_senza_titolo (4).png new file mode 100644 index 0000000..415c3ec Binary files /dev/null and b/Assets/Textures/Opera_senza_titolo (4).png differ diff --git a/Assets/Textures/Opera_senza_titolo (4).png.import b/Assets/Textures/Opera_senza_titolo (4).png.import new file mode 100644 index 0000000..391417f --- /dev/null +++ b/Assets/Textures/Opera_senza_titolo (4).png.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cpb1ashccd2ki" +path.s3tc="res://.godot/imported/Opera_senza_titolo (4).png-c8721971d0f1a5880c4dffc63f03ddd9.s3tc.ctex" +path.etc2="res://.godot/imported/Opera_senza_titolo (4).png-c8721971d0f1a5880c4dffc63f03ddd9.etc2.ctex" +metadata={ +"imported_formats": ["s3tc", "etc2"], +"vram_texture": true +} + +[deps] + +source_file="res://Assets/Textures/Opera_senza_titolo (4).png" +dest_files=["res://.godot/imported/Opera_senza_titolo (4).png-c8721971d0f1a5880c4dffc63f03ddd9.s3tc.ctex", "res://.godot/imported/Opera_senza_titolo (4).png-c8721971d0f1a5880c4dffc63f03ddd9.etc2.ctex"] + +[params] + +compress/mode=2 +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/bptc_ldr=0 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +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=0 diff --git a/Nodes/Train_P1.tscn b/Nodes/Train_P1.tscn index 7027c23..35483f4 100644 --- a/Nodes/Train_P1.tscn +++ b/Nodes/Train_P1.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=30 format=3 uid="uid://md2ofbviios3"] +[gd_scene load_steps=32 format=3 uid="uid://md2ofbviios3"] [ext_resource type="Script" path="res://scripts/Train.gd" id="1_0x664"] [ext_resource type="PackedScene" uid="uid://bhivunrkj87cy" path="res://Nodes/engine.tscn" id="3_1ix85"] @@ -23,7 +23,9 @@ [ext_resource type="Texture2D" uid="uid://biyvvql2ufkdf" path="res://Assets/Textures/Opera_senza_titolo (1).png" id="15_dew1j"] [ext_resource type="PackedScene" uid="uid://bkpnrgcfr1jgl" path="res://Nodes/Bin.tscn" id="16_q3kvk"] [ext_resource type="AudioStream" uid="uid://b52sd64x20ulv" path="res://Assets/Sounds/_SOUNDFX_/Gunpowder.wav" id="17_ajifv"] +[ext_resource type="Texture2D" uid="uid://5nu7hitxgm2p" path="res://Assets/Textures/Opera_senza_titolo (3).png" id="18_xnvtr"] [ext_resource type="Texture2D" uid="uid://cet5o7wla1x7t" path="res://Assets/Textures/Opera_senza_titolo.png" id="19_5df2b"] +[ext_resource type="Texture2D" uid="uid://cpb1ashccd2ki" path="res://Assets/Textures/Opera_senza_titolo (4).png" id="19_crlxr"] [sub_resource type="SpriteFrames" id="SpriteFrames_6p0y6"] animations = [{ @@ -115,11 +117,21 @@ speed_scale = 2.0 playing = true [node name="Storage" parent="." instance=ExtResource("4_5jw5g")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.31598, 0.0193453, -5.2771) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.41138, 0.0193443, -4.80548) icon = ExtResource("14_503dh") +[node name="Storage4" parent="." instance=ExtResource("4_5jw5g")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.41138, 0.0193443, -0.805475) +currentType = 3 +icon = ExtResource("18_xnvtr") + +[node name="Storage5" parent="." instance=ExtResource("4_5jw5g")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.41138, 0.0193443, 2.67569) +currentType = 4 +icon = ExtResource("19_crlxr") + [node name="Storage2" parent="." instance=ExtResource("4_5jw5g")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.31598, 0.0193453, 0.876562) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.92129, 0.0193453, -12.2529) currentType = 2 icon = ExtResource("19_5df2b") @@ -130,13 +142,13 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.32927, 1.2303, 0.0486939) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.38381, 1.2303, 5.95106) [node name="Engine" parent="." instance=ExtResource("3_1ix85")] -transform = Transform3D(-6.55671e-08, 0, 1.5, 0, 1.5, 0, -1.5, 0, -6.55671e-08, -3.45639, 1.1688, 9) +transform = Transform3D(-6.55671e-08, 0, 1.5, 0, 1.5, 0, -1.5, 0, -6.55671e-08, -4.44257, 1.1688, 10.8577) [node name="Bin" parent="." instance=ExtResource("16_q3kvk")] -transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0.70291, -0.287106, 10.1948) +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 4.66916, -0.287106, 10.1948) [node name="Storage3" parent="." instance=ExtResource("4_5jw5g")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.63306, -0.159192, -10.7834) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.08816, -0.159192, -10.9498) currentType = 1 icon = ExtResource("15_dew1j") audioClip = ExtResource("17_ajifv") diff --git a/Nodes/UI.tscn b/Nodes/UI.tscn index 8c3cff6..939d35e 100644 --- a/Nodes/UI.tscn +++ b/Nodes/UI.tscn @@ -4,7 +4,7 @@ [ext_resource type="Script" path="res://Nodes/UI.gd" id="1_dxr24"] [ext_resource type="Texture2D" uid="uid://44lfs83sax35" path="res://undefined - Imgur.png" id="2_udann"] [ext_resource type="Texture2D" uid="uid://cxfybbp5idjwg" path="res://o_idle1.png" id="3_segqn"] -[ext_resource type="PackedScene" path="res://menu/stats_player_1.tscn" id="3_yhsvf"] +[ext_resource type="PackedScene" uid="uid://dgr3cta6n1tg3" path="res://menu/stats_player_1.tscn" id="3_yhsvf"] [ext_resource type="PackedScene" path="res://menu/stats_player_2.tscn" id="4_c4m18"] [ext_resource type="Texture2D" uid="uid://dsphpbpt27t1i" path="res://a3TCqhg.png" id="4_uiyin"] @@ -31,6 +31,7 @@ script = ExtResource("1_dxr24") [node name="Panel" type="Panel" parent="."] custom_minimum_size = Vector2(15, 0) +layout_mode = 1 anchors_preset = 13 anchor_left = 0.5 anchor_right = 0.5 @@ -39,6 +40,7 @@ grow_horizontal = 2 grow_vertical = 2 [node name="VSlider" type="VSlider" parent="."] +layout_mode = 1 anchors_preset = 13 anchor_left = 0.5 anchor_right = 0.5 @@ -56,6 +58,7 @@ editable = false scrollable = false [node name="VSlider2" type="VSlider" parent="."] +layout_mode = 1 anchors_preset = 13 anchor_left = 0.5 anchor_right = 0.5 @@ -74,7 +77,7 @@ scrollable = false [node name="GameOver" type="Control" parent="."] visible = false -layout_mode = 3 +layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -82,6 +85,7 @@ grow_horizontal = 2 grow_vertical = 2 [node name="Label" type="Label" parent="GameOver"] +layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 @@ -98,6 +102,7 @@ label_settings = SubResource("LabelSettings_ot0gm") horizontal_alignment = 1 [node name="VBoxContainer" type="VBoxContainer" parent="GameOver"] +layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 @@ -113,17 +118,15 @@ size_flags_horizontal = 4 size_flags_vertical = 4 [node name="Button" type="Button" parent="GameOver/VBoxContainer"] -offset_right = 175.0 -offset_bottom = 31.0 +layout_mode = 2 text = "RESTART" [node name="Button2" type="Button" parent="GameOver/VBoxContainer"] -offset_top = 35.0 -offset_right = 175.0 -offset_bottom = 66.0 +layout_mode = 2 text = "BACK TO MAIN MENU" [node name="BoxContainer" type="BoxContainer" parent="GameOver"] +layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 @@ -138,28 +141,24 @@ grow_vertical = 2 [node name="HBoxContainer" type="HBoxContainer" parent="GameOver/BoxContainer"] custom_minimum_size = Vector2(900, 500) -offset_right = 1004.0 -offset_bottom = 500.0 +layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 4 [node name="TextureRect" type="TextureRect" parent="GameOver/BoxContainer/HBoxContainer"] custom_minimum_size = Vector2(500, 0) -offset_right = 500.0 -offset_bottom = 500.0 +layout_mode = 2 texture = ExtResource("3_segqn") ignore_texture_size = true [node name="TextureRect2" type="TextureRect" parent="GameOver/BoxContainer/HBoxContainer"] custom_minimum_size = Vector2(500, 0) -offset_left = 504.0 -offset_right = 1004.0 -offset_bottom = 500.0 +layout_mode = 2 texture = ExtResource("4_uiyin") ignore_texture_size = true [node name="Control" type="Control" parent="."] -layout_mode = 3 +layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -167,6 +166,7 @@ grow_horizontal = 2 grow_vertical = 2 [node name="Stats_Player1" parent="Control" instance=ExtResource("3_yhsvf")] +layout_mode = 1 anchors_preset = 0 anchor_bottom = 0.0 offset_right = 0.0 @@ -174,6 +174,7 @@ grow_vertical = 1 scale = Vector2(0.6, 0.6) [node name="Stats_Player2" parent="Control" instance=ExtResource("4_c4m18")] +layout_mode = 1 scale = Vector2(0.6, 0.6) [connection signal="pressed" from="GameOver/VBoxContainer/Button" to="." method="_on_button_pressed"] diff --git a/Nodes/game.tscn b/Nodes/game.tscn index 9875d22..138c80d 100644 --- a/Nodes/game.tscn +++ b/Nodes/game.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=14 format=3 uid="uid://b8u4bo4mklj55"] [ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_dubwq"] -[ext_resource type="PackedScene" uid="uid://nxapkgcq2c70" path="res://Nodes/light_setup.tscn" id="2_1lh4t"] +[ext_resource type="PackedScene" path="res://Nodes/light_setup.tscn" id="2_1lh4t"] [ext_resource type="PackedScene" uid="uid://bqe8ucbruto1j" path="res://Nodes/StartNode.tscn" id="3_xcgy2"] [ext_resource type="PackedScene" uid="uid://md2ofbviios3" path="res://Nodes/Train_P1.tscn" id="4_gg4ea"] [ext_resource type="PackedScene" uid="uid://bikdn7ep2vpxw" path="res://Nodes/Train_P2.tscn" id="5_wi6pu"] diff --git a/scripts/Modules/Cannon.gd b/scripts/Modules/Cannon.gd index 367dd64..d5d911d 100644 --- a/scripts/Modules/Cannon.gd +++ b/scripts/Modules/Cannon.gd @@ -22,6 +22,7 @@ func interact(player): if currentStashValue < maxStashValue: currentStashValue += 1 ammoType = 0 + DAMAGE = 5 player.clearInventory() $AudioStreamPlayer2.play() return @@ -37,6 +38,7 @@ func interact(player): if currentStashValue < maxStashValue: currentStashValue += 1 ammoType = 1 + DAMAGE = 8 player.clearInventory() $AudioStreamPlayer2.play() return @@ -45,6 +47,7 @@ func interact(player): if currentStashValue < maxStashValue: currentStashValue += 1 ammoType = 2 + DAMAGE = 12 player.clearInventory() $AudioStreamPlayer2.play() return diff --git a/scripts/Modules/Engine.gd b/scripts/Modules/Engine.gd index f4e0fdd..3691d0a 100644 --- a/scripts/Modules/Engine.gd +++ b/scripts/Modules/Engine.gd @@ -3,7 +3,7 @@ class_name TrainEngine enum STATE {RUNNING, DEAD} -const maxSpeed = 20 +const maxSpeed = 40 const refuelRate = 1.0 @onready var train = get_parent() as Train