diff --git a/ExternalMaterial/DifficultySelection/DifficultyButton0.png b/ExternalMaterial/DifficultySelection/DifficultyButton0.png index 5e929571..ca6abe20 100644 --- a/ExternalMaterial/DifficultySelection/DifficultyButton0.png +++ b/ExternalMaterial/DifficultySelection/DifficultyButton0.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bcabf9a8301e56265d09547017b22b1b15b22a846df0bf173d611b8d6078f1ea -size 1613 +oid sha256:d87bc03488b4fdc168c25bb1c74ef1fbf60cc650d7a3659aaee90e490328fa72 +size 1647 diff --git a/ExternalMaterial/DifficultySelection/DifficultyButton1.png b/ExternalMaterial/DifficultySelection/DifficultyButton1.png index cbf3a733..df70004d 100644 --- a/ExternalMaterial/DifficultySelection/DifficultyButton1.png +++ b/ExternalMaterial/DifficultySelection/DifficultyButton1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d5870a73bee14877a48240656ccb6b79450ab2d513a0cf3f3fa98d880074fec -size 2403 +oid sha256:af9383558c52052acd7cc4a72c07840f298c5b01dbde446ccd9315c011ccf01d +size 2471 diff --git a/ExternalMaterial/DifficultySelection/DifficultyButton2.png b/ExternalMaterial/DifficultySelection/DifficultyButton2.png index 8e7b1b5b..cac5ca7c 100644 --- a/ExternalMaterial/DifficultySelection/DifficultyButton2.png +++ b/ExternalMaterial/DifficultySelection/DifficultyButton2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:32bf7d986a47efe21e1b95b828aba8b40846f20a2df243057375149de8cec724 -size 2288 +oid sha256:4c6130ccc08cd06537c9c55e76dd2094d1b24e7fa6743a54b4a3f6308411a3a0 +size 2325 diff --git a/ExternalMaterial/DifficultySelection/DifficultyButton3.png b/ExternalMaterial/DifficultySelection/DifficultyButton3.png index 1f61415b..c4baddc6 100644 --- a/ExternalMaterial/DifficultySelection/DifficultyButton3.png +++ b/ExternalMaterial/DifficultySelection/DifficultyButton3.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97a280c234ecfe607e321526b03142e66b6a4230796b95fb7d5f7040c685b8fb -size 2148 +oid sha256:be6a30305bc4b894aba0e094e32afd4e2fb4b9b2315f8cf1675cfefce27479d2 +size 2184 diff --git a/ExternalMaterial/DifficultySelection/DifficultySelection.pxc b/ExternalMaterial/DifficultySelection/DifficultySelection.pxc index 3d3b2c14..57111e10 100644 Binary files a/ExternalMaterial/DifficultySelection/DifficultySelection.pxc and b/ExternalMaterial/DifficultySelection/DifficultySelection.pxc differ diff --git a/ExternalMaterial/DifficultySelection/DifficultySelection.pxc1 b/ExternalMaterial/DifficultySelection/DifficultySelection.pxc1 index 3d3b2c14..bffcedcb 100644 Binary files a/ExternalMaterial/DifficultySelection/DifficultySelection.pxc1 and b/ExternalMaterial/DifficultySelection/DifficultySelection.pxc1 differ diff --git a/ExternalMaterial/DifficultySelection/MenuBackgroundSmall.aseprite b/ExternalMaterial/DifficultySelection/MenuBackgroundSmall.aseprite new file mode 100644 index 00000000..41e1a9bf --- /dev/null +++ b/ExternalMaterial/DifficultySelection/MenuBackgroundSmall.aseprite @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f796a630cc8f726ae634bbabe80aa294da9203f9a28da05fde935e18d92de85f +size 463 diff --git a/ExternalMaterial/DifficultySelection/export.png b/ExternalMaterial/DifficultySelection/export.png index f5c0d2eb..4064e72b 100644 --- a/ExternalMaterial/DifficultySelection/export.png +++ b/ExternalMaterial/DifficultySelection/export.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:815ea2e1e1bb70b6b33642bbf1a43818ed97b892571e1e3de6d5ab571f6998c1 -size 7830 +oid sha256:5dd5a39a64d6605437a40d98e5a84c57a52ae4d32258421bf1dc41a079074cf4 +size 8018 diff --git a/ExternalMaterial/DifficultySelection/l1_robot pov1.png b/ExternalMaterial/DifficultySelection/l1_robot pov1.png new file mode 100644 index 00000000..4253da39 --- /dev/null +++ b/ExternalMaterial/DifficultySelection/l1_robot pov1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2ea949a2e52b155784584b57cca0ceb2cad0815a605ae8eebc1d88b479576c8 +size 3526 diff --git a/ExternalMaterial/DifficultySelection/l1_robot pov1.png.import b/ExternalMaterial/DifficultySelection/l1_robot pov1.png.import new file mode 100644 index 00000000..8ad8dd15 --- /dev/null +++ b/ExternalMaterial/DifficultySelection/l1_robot pov1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://crhanvkb0vxas" +path="res://.godot/imported/l1_robot pov1.png-5173629588e6a49bd1388c7f2690b749.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ExternalMaterial/DifficultySelection/l1_robot pov1.png" +dest_files=["res://.godot/imported/l1_robot pov1.png-5173629588e6a49bd1388c7f2690b749.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/Resources/Enemies/Thermathron.tres b/Resources/Enemies/Thermathron.tres index 15a39755..cac16298 100644 --- a/Resources/Enemies/Thermathron.tres +++ b/Resources/Enemies/Thermathron.tres @@ -1,5 +1,6 @@ -[gd_resource type="Resource" script_class="EnemyResource" load_steps=3 format=3 uid="uid://cfdvg162u65sr"] +[gd_resource type="Resource" script_class="EnemyResource" load_steps=4 format=3 uid="uid://cfdvg162u65sr"] +[ext_resource type="Script" uid="uid://cq65aed620ijo" path="res://Scripts/Resources/Loot/LootDrop.cs" id="1_f3huq"] [ext_resource type="Resource" uid="uid://cdfmedtgp2rcn" path="res://Resources/Weapons/EnemyWeapon.tres" id="7_filx8"] [ext_resource type="Script" uid="uid://cd5o0ceb50jki" path="res://Scripts/Resources/EnemyResource.cs" id="8_x8scf"] @@ -11,7 +12,7 @@ PrefabPath = &"res://Scenes/Actors/Thermathron.tscn" MaxHealth = 8.0 MovementSpeed = 38.0 Weapon = ExtResource("7_filx8") -LootDrops = [] +LootDrops = Array[ExtResource("1_f3huq")]([]) MotivationReward = 4.0 PlayerDetectionRange = 90.0 ViewRange = 120.0 diff --git a/Resources/Enemies/Turret360.tres b/Resources/Enemies/Turret360.tres index 10c381e6..99d247de 100644 --- a/Resources/Enemies/Turret360.tres +++ b/Resources/Enemies/Turret360.tres @@ -1,5 +1,6 @@ -[gd_resource type="Resource" script_class="EnemyResource" load_steps=3 format=3 uid="uid://ysd6wl2gmdhn"] +[gd_resource type="Resource" script_class="EnemyResource" load_steps=4 format=3 uid="uid://ysd6wl2gmdhn"] +[ext_resource type="Script" uid="uid://cq65aed620ijo" path="res://Scripts/Resources/Loot/LootDrop.cs" id="1_sma76"] [ext_resource type="Resource" uid="uid://dyaxm3st70sh6" path="res://Resources/Weapons/Enemy/TurretWeapon.tres" id="1_yap8t"] [ext_resource type="Script" uid="uid://cd5o0ceb50jki" path="res://Scripts/Resources/EnemyResource.cs" id="2_sma76"] @@ -11,7 +12,7 @@ PrefabPath = &"res://Scenes/Actors/Turret360.tscn" MaxHealth = 14.0 MovementSpeed = 0.0 Weapon = ExtResource("1_yap8t") -LootDrops = [] +LootDrops = Array[ExtResource("1_sma76")]([]) MotivationReward = 4.0 PlayerDetectionRange = 90.0 ViewRange = 120.0 diff --git a/Resources/Maps/Tutorial.tres b/Resources/Maps/Tutorial.tres index 0d3a4d03..c3497b3f 100644 --- a/Resources/Maps/Tutorial.tres +++ b/Resources/Maps/Tutorial.tres @@ -1,13 +1,14 @@ -[gd_resource type="Resource" script_class="MapResource" load_steps=4 format=3 uid="uid://b4u3cs6ietmow"] +[gd_resource type="Resource" script_class="MapResource" load_steps=5 format=3 uid="uid://b4u3cs6ietmow"] [ext_resource type="Script" uid="uid://mja0rk7n2kln" path="res://Scripts/Resources/MapStartDataResource.cs" id="1_3bwtp"] [ext_resource type="Script" uid="uid://quy4d4tgvqfy" path="res://Scripts/Resources/MapResource.cs" id="1_5stb7"] +[ext_resource type="Script" uid="uid://epnwjptvks3t" path="res://Scripts/Resources/LootItem.cs" id="1_dpitu"] [sub_resource type="Resource" id="Resource_dpitu"] script = ExtResource("1_3bwtp") EggIndex = 0 -StartingEquipment = [] -RemoveEquipment = [] +StartingEquipment = Array[ExtResource("1_dpitu")]([]) +RemoveEquipment = Array[ExtResource("1_dpitu")]([]) metadata/_custom_type_script = "uid://mja0rk7n2kln" [resource] diff --git a/Scenes/HUD/DifficultySelection.tscn b/Scenes/HUD/DifficultySelection.tscn index 0601f506..51f0e18d 100644 --- a/Scenes/HUD/DifficultySelection.tscn +++ b/Scenes/HUD/DifficultySelection.tscn @@ -1,33 +1,71 @@ -[gd_scene load_steps=5 format=3 uid="uid://7jevaemboajn"] +[gd_scene load_steps=11 format=3 uid="uid://7jevaemboajn"] -[ext_resource type="Texture2D" uid="uid://dbrliyhwbbscy" path="res://Sprites/UI/DifficultyButton0.png" id="1_00pwu"] -[ext_resource type="Texture2D" uid="uid://chjt6y61ywk6" path="res://Sprites/UI/DifficultyButton1.png" id="2_m1stl"] -[ext_resource type="Texture2D" uid="uid://bu50y0l51u05" path="res://Sprites/UI/DifficultyButton2.png" id="3_dmnj4"] -[ext_resource type="Texture2D" uid="uid://b5dwiatnadrpx" path="res://Sprites/UI/DifficultyButton3.png" id="4_pkp66"] +[ext_resource type="Script" uid="uid://bst70cv5631js" path="res://Scripts/UI/DifficultyMenu.cs" id="1_m1stl"] +[ext_resource type="Resource" uid="uid://b4u3cs6ietmow" path="res://Resources/Maps/Tutorial.tres" id="2_dmnj4"] +[ext_resource type="Theme" uid="uid://dnsadvmunm76k" path="res://Resources/Styles/MainMenuButtons.tres" id="3_0vv33"] +[ext_resource type="Texture2D" uid="uid://b4fhb0wyc5vw" path="res://Sprites/UI/BackIcon.png" id="4_bl7tq"] +[ext_resource type="LabelSettings" uid="uid://buk3e7bbwmnv1" path="res://Resources/Styles/Hud_Text_Style.tres" id="5_bl7tq"] +[ext_resource type="Texture2D" uid="uid://xum7nxbnoph8" path="res://ExternalMaterial/DifficultySelection/DifficultyButton0.png" id="6_bl7tq"] +[ext_resource type="Texture2D" uid="uid://44hye5leueuy" path="res://ExternalMaterial/DifficultySelection/DifficultyButton1.png" id="7_mt161"] +[ext_resource type="Texture2D" uid="uid://cib48h3gmqoh0" path="res://ExternalMaterial/DifficultySelection/DifficultyButton2.png" id="8_vk2qx"] +[ext_resource type="Texture2D" uid="uid://8cxg6g1tulis" path="res://ExternalMaterial/DifficultySelection/DifficultyButton3.png" id="9_8157i"] -[node name="DifficultySelection" type="CenterContainer"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0vv33"] +bg_color = Color(0, 0, 0, 1) + +[node name="DifficultySelection" type="PanelContainer"] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_0vv33") +script = ExtResource("1_m1stl") +StartMap = ExtResource("2_dmnj4") -[node name="VBoxContainer" type="VBoxContainer" parent="."] +[node name="HBoxContainer" type="HBoxContainer" parent="."] layout_mode = 2 + +[node name="VBoxContainer2" type="VBoxContainer" parent="HBoxContainer"] +layout_mode = 2 + +[node name="BackButton" type="Button" parent="HBoxContainer/VBoxContainer2"] +layout_mode = 2 +size_flags_vertical = 0 +theme = ExtResource("3_0vv33") +text = "Back" +icon = ExtResource("4_bl7tq") + +[node name="Label" type="Label" parent="HBoxContainer/VBoxContainer2"] +layout_mode = 2 +text = "Select +Difficulty" +label_settings = ExtResource("5_bl7tq") + +[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 4 theme_override_constants/separation = 8 +alignment = 1 -[node name="TextureButton" type="TextureButton" parent="VBoxContainer"] +[node name="TextureButton" type="TextureButton" parent="HBoxContainer/VBoxContainer"] layout_mode = 2 -texture_normal = ExtResource("1_00pwu") +texture_normal = ExtResource("6_bl7tq") -[node name="TextureButton2" type="TextureButton" parent="VBoxContainer"] +[node name="TextureButton2" type="TextureButton" parent="HBoxContainer/VBoxContainer"] layout_mode = 2 -texture_normal = ExtResource("2_m1stl") +texture_normal = ExtResource("7_mt161") -[node name="TextureButton3" type="TextureButton" parent="VBoxContainer"] +[node name="TextureButton3" type="TextureButton" parent="HBoxContainer/VBoxContainer"] layout_mode = 2 -texture_normal = ExtResource("3_dmnj4") +texture_normal = ExtResource("8_vk2qx") -[node name="TextureButton4" type="TextureButton" parent="VBoxContainer"] +[node name="TextureButton4" type="TextureButton" parent="HBoxContainer/VBoxContainer"] layout_mode = 2 -texture_normal = ExtResource("4_pkp66") +texture_normal = ExtResource("9_8157i") + +[connection signal="pressed" from="HBoxContainer/VBoxContainer2/BackButton" to="." method="_on_back_button_pressed"] +[connection signal="pressed" from="HBoxContainer/VBoxContainer/TextureButton" to="." method="StartEasy"] +[connection signal="pressed" from="HBoxContainer/VBoxContainer/TextureButton2" to="." method="StartNormal"] +[connection signal="pressed" from="HBoxContainer/VBoxContainer/TextureButton3" to="." method="StartHard"] +[connection signal="pressed" from="HBoxContainer/VBoxContainer/TextureButton4" to="." method="StartLunatic"] diff --git a/Scenes/MainMenu.tscn b/Scenes/MainMenu.tscn index 3a918e40..984b07da 100644 --- a/Scenes/MainMenu.tscn +++ b/Scenes/MainMenu.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=23 format=3 uid="uid://5xajclchk3my"] +[gd_scene load_steps=24 format=3 uid="uid://5xajclchk3my"] [ext_resource type="Script" uid="uid://dql102fvubniv" path="res://Scripts/MainMenu.cs" id="1_702nk"] [ext_resource type="PackedScene" uid="uid://c84shrj84g4t2" path="res://Scenes/HUD/MusicRoom.tscn" id="2_if7li"] @@ -9,6 +9,7 @@ [ext_resource type="AudioStream" uid="uid://di416g5wgx6j0" path="res://Music/Title.mp3" id="4_i6ku4"] [ext_resource type="Theme" uid="uid://dnsadvmunm76k" path="res://Resources/Styles/MainMenuButtons.tres" id="4_nk7wn"] [ext_resource type="PackedScene" uid="uid://bnhcgsyh6wfo3" path="res://Scenes/HUD/OptionsMenu.tscn" id="5_7467j"] +[ext_resource type="PackedScene" uid="uid://7jevaemboajn" path="res://Scenes/HUD/DifficultySelection.tscn" id="6_pjscj"] [ext_resource type="LabelSettings" uid="uid://wr7cb2qa6w71" path="res://Resources/Styles/Title_Text_Style.tres" id="7_loo7a"] [ext_resource type="StyleBox" uid="uid://ctw2hju32l3rg" path="res://Resources/Styles/PixelStyleBoxRed.tres" id="7_rrcx7"] [ext_resource type="PackedScene" uid="uid://b3tyacxxw88lx" path="res://Scenes/Utils/StreamPlayerWithName.tscn" id="8_koqhg"] @@ -20,9 +21,9 @@ [ext_resource type="Resource" uid="uid://byo74ews118nl" path="res://Resources/Music/No_Reason.tres" id="13_fh7cp"] [ext_resource type="FontFile" uid="uid://cyk27h5aox1n7" path="res://fonts/sector_034.ttf" id="14_yxkem"] -[sub_resource type="AtlasTexture" id="AtlasTexture_ogjye"] +[sub_resource type="AtlasTexture" id="AtlasTexture_hy5wk"] atlas = ExtResource("9_riqfo") -region = Rect2(64, 0, 32, 16) +region = Rect2(288, 0, 32, 16) [sub_resource type="Theme" id="Theme_c7h4d"] @@ -44,6 +45,7 @@ MusicRoomTemplate = ExtResource("2_if7li") DebugMenuTemplate = ExtResource("9_nwlsr") CreditsMenuTemplate = ExtResource("4_8e205") OptionsMenuTemplate = ExtResource("5_7467j") +DifficultyMenuTemplate = ExtResource("6_pjscj") [node name="TextureRect2" type="TextureRect" parent="."] anchors_preset = 15 @@ -67,7 +69,7 @@ offset_top = 40.995 offset_right = 186.42 offset_bottom = 56.995 rotation = 3.14159 -texture = SubResource("AtlasTexture_ogjye") +texture = SubResource("AtlasTexture_hy5wk") [node name="MarginContainer" type="MarginContainer" parent="."] anchors_preset = 15 @@ -211,6 +213,10 @@ visible = false anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = -1.0 +offset_right = 1.0 +offset_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 theme_override_styles/panel = ExtResource("7_rrcx7") diff --git a/Scenes/test.tscn b/Scenes/test.tscn index 525b82b0..75234f4e 100644 --- a/Scenes/test.tscn +++ b/Scenes/test.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=152 format=4 uid="uid://bv451a8wgty4u"] +[gd_scene load_steps=153 format=4 uid="uid://bv451a8wgty4u"] [ext_resource type="Script" uid="uid://doxmbokehw8ci" path="res://Scripts/GameManager.cs" id="1_8tmoj"] [ext_resource type="PackedScene" uid="uid://c4pr2707hbeph" path="res://Scenes/Actors/fsm_player.tscn" id="2_ksslq"] @@ -74,6 +74,7 @@ [ext_resource type="PackedScene" uid="uid://c5fiv1nioghfb" path="res://Scenes/Actors/Marisa.tscn" id="50_mp5ma"] [ext_resource type="Resource" uid="uid://37h0tjja4sns" path="res://Resources/Maps/RebelBase.tres" id="52_orkt3"] [ext_resource type="PackedScene" uid="uid://bqjcwxene73l2" path="res://Scenes/Actors/ActorEnemyTest.tscn" id="55_chha6"] +[ext_resource type="Script" uid="uid://b5fesrd4lv8t1" path="res://Scripts/Resources/Events/EventResource.cs" id="55_dferh"] [ext_resource type="PackedScene" uid="uid://bjskkeb3ppcs8" path="res://Scenes/Actors/Turret360.tscn" id="62_h0jm4"] [ext_resource type="Script" uid="uid://v57xjmhi28kw" path="res://Scripts/Resources/Events/ControlActorEvent.cs" id="64_rphi8"] [ext_resource type="PackedScene" uid="uid://b0gpbkxdfbnjh" path="res://Scenes/Actors/ForceField_Horizontal.tscn" id="66_nxn3h"] @@ -268,7 +269,7 @@ ActivationType = 0 Targets = Array[NodePath]([NodePath("../Rumia")]) WaitForCompletion = true -[sub_resource type="Resource" id="Resource_j86ly"] +[sub_resource type="Resource" id="Resource_fuaed"] resource_local_to_scene = true script = ExtResource("49_0si7g") Target = NodePath(".") @@ -717,7 +718,7 @@ Invisible = true metadata/_edit_group_ = true [node name="ScriptableAreaTrigger" parent="Parallax2D/Factory Tilemaps/LevelProps/DebugTeleporter" instance=ExtResource("43_kf3qc")] -Events = [SubResource("Resource_usuub")] +Events = Array[ExtResource("55_dferh")]([SubResource("Resource_usuub")]) [node name="BlueKeycard2" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("35_rblsn")] position = Vector2(-1032, -317) @@ -914,7 +915,7 @@ position = Vector2(-1423, -188) [node name="LevelStartTrigger" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("43_kf3qc")] position = Vector2(-762, -129) scale = Vector2(1.455, 1.455) -Events = [SubResource("Resource_5er5x"), SubResource("Resource_b25hy")] +Events = Array[ExtResource("55_dferh")]([SubResource("Resource_5er5x"), SubResource("Resource_b25hy")]) [node name="AreaTrigger2" parent="Parallax2D/Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Target") instance=ExtResource("28_6au4t")] position = Vector2(-435, -162) @@ -957,7 +958,7 @@ metadata/_edit_group_ = true [node name="Script2" type="Node2D" parent="Parallax2D/Factory Tilemaps/LevelProps/Computer2"] position = Vector2(120, 25) script = ExtResource("42_wigyb") -Events = [SubResource("Resource_wma5c")] +Events = Array[ExtResource("55_dferh")]([SubResource("Resource_wma5c")]) [node name="Computer6" parent="Parallax2D/Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Targets") instance=ExtResource("31_243ec")] position = Vector2(-1113, -139) @@ -967,7 +968,7 @@ metadata/_edit_group_ = true [node name="Script2" type="Node2D" parent="Parallax2D/Factory Tilemaps/LevelProps/Computer6"] position = Vector2(0, 1) script = ExtResource("42_wigyb") -Events = [SubResource("Resource_cxj4w")] +Events = Array[ExtResource("55_dferh")]([SubResource("Resource_cxj4w")]) [node name="Computer7" parent="Parallax2D/Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Targets") instance=ExtResource("31_243ec")] position = Vector2(-1175.36, 213.708) @@ -978,7 +979,7 @@ metadata/_edit_group_ = true [node name="Computer7Script" type="Node2D" parent="Parallax2D/Factory Tilemaps/LevelProps/Computer7"] position = Vector2(0, 1) script = ExtResource("42_wigyb") -Events = [SubResource("Resource_tcc7d")] +Events = Array[ExtResource("55_dferh")]([SubResource("Resource_tcc7d")]) [node name="Computer5" parent="Parallax2D/Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Targets") instance=ExtResource("31_243ec")] position = Vector2(-1344, -251) @@ -986,7 +987,7 @@ Targets = [NodePath("Computer5Script")] [node name="Computer5Script" type="Node2D" parent="Parallax2D/Factory Tilemaps/LevelProps/Computer5"] script = ExtResource("42_wigyb") -Events = [SubResource("Resource_fasrq"), SubResource("Resource_mah4x"), SubResource("Resource_0bqta")] +Events = Array[ExtResource("55_dferh")]([SubResource("Resource_fasrq"), SubResource("Resource_mah4x"), SubResource("Resource_0bqta")]) [node name="Computer3" parent="Parallax2D/Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Target") instance=ExtResource("31_243ec")] position = Vector2(-612.57, -358.528) @@ -994,7 +995,7 @@ Target = NodePath("Script") [node name="Script" type="Node2D" parent="Parallax2D/Factory Tilemaps/LevelProps/Computer3"] script = ExtResource("42_wigyb") -Events = [SubResource("Resource_o2kpk")] +Events = Array[ExtResource("55_dferh")]([SubResource("Resource_o2kpk")]) [node name="Computer4" parent="Parallax2D/Factory Tilemaps/LevelProps" node_paths=PackedStringArray("Target") instance=ExtResource("31_243ec")] position = Vector2(-791, -505) @@ -1002,7 +1003,7 @@ Target = NodePath("Node2D") [node name="Node2D" type="Node2D" parent="Parallax2D/Factory Tilemaps/LevelProps/Computer4"] script = ExtResource("42_wigyb") -Events = [SubResource("Resource_s3g2w")] +Events = Array[ExtResource("55_dferh")]([SubResource("Resource_s3g2w")]) [node name="Label" type="Label" parent="Parallax2D/Factory Tilemaps/LevelProps/Computer4"] offset_left = -5.0 @@ -1031,11 +1032,11 @@ position = Vector2(-792, -407) [node name="BossBattleEndScript" type="Node2D" parent="Parallax2D/Factory Tilemaps/LevelProps"] position = Vector2(-1628.53, -477.628) script = ExtResource("42_wigyb") -Events = [SubResource("Resource_068l7"), SubResource("Resource_l3nop")] +Events = Array[ExtResource("55_dferh")]([SubResource("Resource_068l7"), SubResource("Resource_l3nop")]) [node name="BossBattleStartScript" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("43_kf3qc")] position = Vector2(-1487, -396) -Events = [SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_j86ly")] +Events = Array[ExtResource("55_dferh")]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_fuaed")]) [node name="Enemy13" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("47_u1ve6")] position = Vector2(-1657, -788) @@ -1338,7 +1339,7 @@ position = Vector2(-2072, -211) [node name="ScriptableAreaTrigger" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("43_kf3qc")] position = Vector2(-2063, -232) -Events = [SubResource("Resource_l476f"), SubResource("Resource_dskij")] +Events = Array[ExtResource("55_dferh")]([SubResource("Resource_l476f"), SubResource("Resource_dskij")]) [node name="ShieldExtendPickup" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("103_0bqta")] position = Vector2(-1646, 38) @@ -1466,7 +1467,7 @@ position = Vector2(-1633, 391) [node name="MovementSensorLonger" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("112_j86ly")] position = Vector2(-1495, 516) -Events = [SubResource("Resource_uslvo")] +Events = Array[ExtResource("55_dferh")]([SubResource("Resource_uslvo")]) [node name="WallEmitter" parent="Parallax2D/Factory Tilemaps/LevelProps" instance=ExtResource("113_dferh")] position = Vector2(-1480, 451) diff --git a/Scripts/MainMenu.cs b/Scripts/MainMenu.cs index 420416b7..68ac5822 100644 --- a/Scripts/MainMenu.cs +++ b/Scripts/MainMenu.cs @@ -37,6 +37,10 @@ public partial class MainMenu : CanvasLayer [Export] public PackedScene OptionsMenuTemplate { get; set; } + [ExportCategory("Difficulty Menu")] + [Export] + public PackedScene DifficultyMenuTemplate { get; set; } + // Called when the node enters the scene tree for the first time. public override void _Ready() { @@ -50,10 +54,10 @@ public partial class MainMenu : CanvasLayer private void _on_start_button_pressed() { - if (GameScene == null) return; - GlobalState.Session.NewSession(); - GlobalState.Session.AllowSaving = true; - GlobalState.Instance.GotoScene(GameScene); + SpawnMenu(DifficultyMenuTemplate, SubMenuHolder); + + return; + //GetTree().ChangeSceneToFile(GameScene); } diff --git a/Scripts/UI/DebugMenu.cs b/Scripts/UI/DebugMenu.cs index a97f56d8..c6fd8afd 100644 --- a/Scripts/UI/DebugMenu.cs +++ b/Scripts/UI/DebugMenu.cs @@ -7,7 +7,6 @@ using DebugMapSelectData = Cirno.Scripts.Resources.DebugMenu.DebugMapSelectData; public partial class DebugMenu : MenuBase { - [Export] public Theme ButtonTheme { get; private set; } diff --git a/Scripts/UI/DifficultyMenu.cs b/Scripts/UI/DifficultyMenu.cs new file mode 100644 index 00000000..d8f54668 --- /dev/null +++ b/Scripts/UI/DifficultyMenu.cs @@ -0,0 +1,39 @@ +using Cirno.Scripts.Enums; +using Cirno.Scripts.Resources; +using Godot; + +namespace Cirno.Scripts.UI; + +public partial class DifficultyMenu : MenuBase +{ + [Export] public MapResource StartMap { get; private set; } + + private void StartEasy() + { + StartGame(DifficultyLevel.Easy); + } + + private void StartNormal() + { + StartGame(DifficultyLevel.Normal); + } + + private void StartHard() + { + StartGame(DifficultyLevel.Hard); + } + + private void StartLunatic() + { + StartGame(DifficultyLevel.Lunatic); + } + + public void StartGame(DifficultyLevel difficultyLevel) + { + if (StartMap is null) return; + GlobalState.Session.NewSession(); + GlobalState.Session.AllowSaving = true; + GlobalState.Session.Difficulty = difficultyLevel; + GlobalState.Instance.GotoScene(StartMap); + } +} \ No newline at end of file diff --git a/Scripts/UI/DifficultyMenu.cs.uid b/Scripts/UI/DifficultyMenu.cs.uid new file mode 100644 index 00000000..d13b53fa --- /dev/null +++ b/Scripts/UI/DifficultyMenu.cs.uid @@ -0,0 +1 @@ +uid://bst70cv5631js diff --git a/Scripts/Utils/SessionSettings.cs b/Scripts/Utils/SessionSettings.cs index 549a5031..aedfdb85 100644 --- a/Scripts/Utils/SessionSettings.cs +++ b/Scripts/Utils/SessionSettings.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using Cirno.Scripts.Enums; namespace Cirno.Scripts.Utils; @@ -8,6 +9,7 @@ public class SessionSettings public bool SkipDialogues { get; set; } = false; public bool GodMode { get; set; } = false; + public DifficultyLevel Difficulty { get; set; } = DifficultyLevel.Normal; public bool AllowSaving { get; set; } = false; public Godot.Collections.Dictionary Items { get; set; } = new();