From c5290f9520d5aed31e77f852ba96ca05634c9963 Mon Sep 17 00:00:00 2001 From: psychowolf960 <119869367+psychowolf960@users.noreply.github.com> Date: Tue, 7 May 2024 22:05:58 +0200 Subject: [PATCH] Fixes --- .godot/editor/create_recent.Node | 1 + .godot/editor/editor_layout.cfg | 17 +- .godot/editor/filesystem_cache8 | 23 +- .godot/editor/filesystem_update4 | 7 +- ...state-c2a7af834e91ff64325daddf58e45dc0.cfg | 2 +- ...state-1a75c62674f0e88c69acf03f4897b8b1.cfg | 6 +- ...lding-1a75c62674f0e88c69acf03f4897b8b1.cfg | 2 +- ...state-aff36490106a0d5d7998ae54548faa72.cfg | 176 +++++++++++ ...lding-aff36490106a0d5d7998ae54548faa72.cfg | 5 + ...state-7946f7215711e60c9a0eac2a1e6d5ccb.cfg | 6 +- ...state-234fb6894ec6226e856ab7f825500d3d.cfg | 2 +- .godot/editor/project_metadata.cfg | 5 +- .godot/editor/script_editor_cache.cfg | 20 +- ...state-cfec31ac835903e5b6c8af87b017aecf.cfg | 2 +- .godot/uid_cache.bin | Bin 5743 -> 5782 bytes scenes/game.tscn | 1 + scenes/mainmenu.tscn | 108 ++++--- scenes/mainmenu2.tscn | 288 ++++++++++++++++++ scripts/Camera2D.gd | 5 +- scripts/killzone.gd | 1 - scripts/mainmenu.gd | 13 +- 21 files changed, 596 insertions(+), 94 deletions(-) create mode 100644 .godot/editor/mainmenu2.tscn-editstate-aff36490106a0d5d7998ae54548faa72.cfg create mode 100644 .godot/editor/mainmenu2.tscn-folding-aff36490106a0d5d7998ae54548faa72.cfg create mode 100644 scenes/mainmenu2.tscn diff --git a/.godot/editor/create_recent.Node b/.godot/editor/create_recent.Node index 407cef8..b612054 100644 --- a/.godot/editor/create_recent.Node +++ b/.godot/editor/create_recent.Node @@ -1,3 +1,4 @@ +HScrollBar Camera2D Button Node diff --git a/.godot/editor/editor_layout.cfg b/.godot/editor/editor_layout.cfg index 81b789b..fcf8679 100644 --- a/.godot/editor/editor_layout.cfg +++ b/.godot/editor/editor_layout.cfg @@ -4,7 +4,7 @@ dock_1_selected_tab_idx=0 dock_2_selected_tab_idx=0 dock_3_selected_tab_idx=0 dock_4_selected_tab_idx=0 -dock_5_selected_tab_idx=0 +dock_5_selected_tab_idx=1 dock_6_selected_tab_idx=0 dock_7_selected_tab_idx=0 dock_8_selected_tab_idx=0 @@ -19,7 +19,7 @@ dock_filesystem_split=0 dock_filesystem_display_mode=0 dock_filesystem_file_sort=0 dock_filesystem_file_list_display_mode=1 -dock_filesystem_selected_paths=PackedStringArray("res://scenes/mainmenu.tscn") +dock_filesystem_selected_paths=PackedStringArray("res://scenes/mainmenu2.tscn") dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scenes/", "res://assets/", "res://assets/sprites/", "res://assets/fonts/") dock_3="Scene,Import" dock_4="FileSystem" @@ -27,16 +27,17 @@ dock_5="Inspector,Node,History" [EditorNode] -open_scenes=PackedStringArray("res://scenes/game.tscn", "res://scenes/player.tscn", "res://scenes/slime.tscn", "res://scenes/optionsmenu.tscn", "res://scenes/mainmenu.tscn") -current_scene="res://scenes/mainmenu.tscn" -center_split_offset=-392 +open_scenes=PackedStringArray("res://scenes/game.tscn", "res://scenes/player.tscn", "res://scenes/slime.tscn", "res://scenes/optionsmenu.tscn", "res://scenes/mainmenu.tscn", "res://scenes/mainmenu2.tscn") +current_scene="res://scenes/game.tscn" +center_split_offset=-252 selected_default_debugger_tab_idx=0 -selected_main_editor_idx=0 +selected_main_editor_idx=2 +selected_bottom_panel_item=0 [ScriptEditor] -open_scripts=["res://scripts/gamemanager.gd", "res://scripts/mainmenu.gd", "res://scripts/optionsmenu.gd", "res://scripts/player.gd", "res://scripts/slime.gd"] -selected_script="res://scripts/mainmenu.gd" +open_scripts=["res://scripts/Camera2D.gd", "res://scripts/gamemanager.gd", "res://scripts/killzone.gd", "res://scripts/mainmenu.gd", "res://scripts/optionsmenu.gd", "res://scripts/player.gd", "res://scripts/slime.gd"] +selected_script="res://scripts/Camera2D.gd" open_help=[] script_split_offset=70 list_split_offset=0 diff --git a/.godot/editor/filesystem_cache8 b/.godot/editor/filesystem_cache8 index c243eff..8cd1bb2 100644 --- a/.godot/editor/filesystem_cache8 +++ b/.godot/editor/filesystem_cache8 @@ -1,5 +1,5 @@ ea4bc82a6ad023ab7ee23ee620429895 -::res://::1715083481 +::res://::1715085996 default_bus_layout.tres::AudioBusLayout::6154612993266235982::1714267924::0::1::::<><>:: export_presets.cfg::TextFile::-1::1714940346::0::1::::<><>:: icon.svg::CompressedTexture2D::6469127827471254761::1714267924::1714564333::1::::<><>:: @@ -140,24 +140,25 @@ platforms.png::CompressedTexture2D::6429460309075172824::1714267924::1714267924: slime_green.png::CompressedTexture2D::3222140907498469096::1714267924::1714267924::1::::<><>:: slime_purple.png::CompressedTexture2D::3959724587980025257::1714267924::1714267924::1::::<><>:: world_tileset.png::CompressedTexture2D::263196027477670198::1714988957::1714988958::1::::<><>:: -::res://scenes/::1715075705 +::res://scenes/::1715103095 coin.tscn::PackedScene::1086827868758606395::1714649078::0::1::::<><>::uid://bped01tsjeycn::::res://assets/sprites/coin.png<>res://scripts/coin.gd<>uid://hxv3svfwkg67::::res://assets/sounds/coin.wav -game.tscn::PackedScene::6221769105244979977::1715075701::0::1::::<><>::uid://dqnaqj8yb6hwd::::res://scenes/player.tscn<>res://scripts/gamemanager.gd<>uid://c53kogtyjwsss::::res://assets/fonts/PixelOperator8-Bold.ttf<>uid://d0q2g65ahgok::::res://assets/sprites/world_tileset.png<>uid://bgv5v2fxqlswe::::res://scenes/platform.tscn<>uid://pqp5qaw561fr::::res://scenes/coin.tscn<>uid://bo6kp1akmk3ey::::res://scenes/killzone.tscn<>uid://duj85jkd1ay6m::::res://scenes/slime.tscn<>res://addons/phantom_camera/scripts/phantom_camera_host/phantom_camera_host.gd<>res://scripts/Camera2D.gd<>uid://dbjl1e6kdxpl6::::res://assets/fonts/PixelOperator8.ttf<>res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd<>res://addons/phantom_camera/scripts/resources/tween_resource.gd<>res://scripts/signalbus.gd +game.tscn::PackedScene::6221769105244979977::1715086385::0::1::::<><>::uid://dqnaqj8yb6hwd::::res://scenes/player.tscn<>res://scripts/gamemanager.gd<>uid://c53kogtyjwsss::::res://assets/fonts/PixelOperator8-Bold.ttf<>uid://d0q2g65ahgok::::res://assets/sprites/world_tileset.png<>uid://bgv5v2fxqlswe::::res://scenes/platform.tscn<>uid://pqp5qaw561fr::::res://scenes/coin.tscn<>uid://bo6kp1akmk3ey::::res://scenes/killzone.tscn<>uid://duj85jkd1ay6m::::res://scenes/slime.tscn<>res://addons/phantom_camera/scripts/phantom_camera_host/phantom_camera_host.gd<>res://scripts/Camera2D.gd<>uid://dbjl1e6kdxpl6::::res://assets/fonts/PixelOperator8.ttf<>res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd<>res://addons/phantom_camera/scripts/resources/tween_resource.gd<>res://scripts/signalbus.gd killzone.tscn::PackedScene::3433695527915565152::1714844158::0::1::::<><>::res://scripts/killzone.gd -mainmenu.tscn::PackedScene::5060128894474056495::1714928850::0::1::::<><>::res://scripts/mainmenu.gd<>uid://dbjl1e6kdxpl6::::res://assets/fonts/PixelOperator8.ttf<>uid://cyfxuch6qa87f::::res://icon.svg +mainmenu.tscn::PackedScene::5060128894474056495::1715103095::0::1::::<><>::res://scripts/mainmenu.gd<>uid://dbjl1e6kdxpl6::::res://assets/fonts/PixelOperator8.ttf<>uid://cyfxuch6qa87f::::res://icon.svg music.tscn::PackedScene::789652015453189431::1714569304::0::1::::<><>::uid://m73dm4jhs3eq::::res://assets/music/time_for_adventure.mp3 -optionsmenu.tscn::PackedScene::7285262778080745610::1714928849::0::1::::<><>::res://scripts/optionsmenu.gd<>uid://dbjl1e6kdxpl6::::res://assets/fonts/PixelOperator8.ttf +optionsmenu.tscn::PackedScene::7285262778080745610::1715086385::0::1::::<><>::res://scripts/optionsmenu.gd<>uid://dbjl1e6kdxpl6::::res://assets/fonts/PixelOperator8.ttf platform.tscn::PackedScene::2852766116732873392::1714267924::0::1::::<><>::uid://cxuqjimd7csiq::::res://assets/sprites/platforms.png -player.tscn::PackedScene::8309149557574787539::1715074890::0::1::::<><>::res://scripts/player.gd<>res://scenes/SmoothPixel.gdshader +player.tscn::PackedScene::8309149557574787539::1715086385::0::1::::<><>::res://scripts/player.gd<>res://scenes/SmoothPixel.gdshader prudence.tscn::PackedScene::708535710287922101::1714983107::0::1::::<><>::res://scripts/gamemanager.gd<>uid://dbjl1e6kdxpl6::::res://assets/fonts/PixelOperator8.ttf<>uid://pqp5qaw561fr::::res://scenes/coin.tscn<>uid://dqnaqj8yb6hwd::::res://scenes/player.tscn<>uid://bo6kp1akmk3ey::::res://scenes/killzone.tscn<>uid://bgv5v2fxqlswe::::res://scenes/platform.tscn<>uid://duj85jkd1ay6m::::res://scenes/slime.tscn -slime.tscn::PackedScene::8583676046534204298::1715074890::0::1::::<><>::res://scripts/slime.gd<>res://shader/SmoothPixel.gdshader<>uid://bo6kp1akmk3ey::::res://scenes/killzone.tscn -SmoothPixel.gdshader::Shader::-1::1715075705::0::1::::<><>:: -::res://scripts/::1715073057 -Camera2D.gd::GDScript::-1::1715073057::0::1::::<>Camera2D<>:: +mainmenu2.tscn::PackedScene::7560313907226335791::1715103373::0::1::::<><>::res://scripts/mainmenu.gd<>uid://dbjl1e6kdxpl6::::res://assets/fonts/PixelOperator8.ttf<>uid://cyfxuch6qa87f::::res://icon.svg +slime.tscn::PackedScene::8583676046534204298::1715086385::0::1::::<><>::res://scripts/slime.gd<>res://shader/SmoothPixel.gdshader<>uid://bo6kp1akmk3ey::::res://scenes/killzone.tscn +SmoothPixel.gdshader::Shader::-1::1715103095::0::1::::<><>:: +::res://scripts/::1715086240 +Camera2D.gd::GDScript::-1::1715086010::0::1::::<>Camera2D<>:: coin.gd::GDScript::-1::1714662653::0::1::::<>Area2D<>:: gamemanager.gd::GDScript::-1::1714849320::0::1::::<>Node<>:: killzone.gd::GDScript::-1::1714929762::0::1::::<>Area2D<>:: -mainmenu.gd::GDScript::-1::1714928846::0::1::::<>Control<>:: +mainmenu.gd::GDScript::-1::1715086240::0::1::::<>Control<>:: optionsmenu.gd::GDScript::-1::1714577650::0::1::::<>Control<>:: player.gd::GDScript::-1::1714919249::0::1::::<>CharacterBody2D<>:: signalbus.gd::GDScript::-1::1714929723::0::1::::<>Node<>:: diff --git a/.godot/editor/filesystem_update4 b/.godot/editor/filesystem_update4 index 21021fc..2cf1744 100644 --- a/.godot/editor/filesystem_update4 +++ b/.godot/editor/filesystem_update4 @@ -1,7 +1,10 @@ -res://scenes/mainmenu.tscn +res://scenes/game.tscn res://scripts/Camera2D.gd res://scenes/SmoothPixel.gdshader -res://scenes/game.tscn res://scenes/player.tscn res://scenes/slime.tscn res://scenes/optionsmenu.tscn +res://scenes/mainmenu.tscn +res://scripts/mainmenu.gd +res://scenes/mainmenu2.tscn +res://scripts/killzone.gd diff --git a/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg b/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg index 7822f8b..4765c13 100644 --- a/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg +++ b/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg @@ -173,4 +173,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17095/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@61/@VBoxContainer@62/@PanelContainer@109/MainScreen/@CanvasItemEditor@9461/@VSplitContainer@9280/@HSplitContainer@9282/@HSplitContainer@9284/@Control@9285/@SubViewportContainer@9286/@SubViewport@9287/Game/Killzone")]) diff --git a/.godot/editor/mainmenu.tscn-editstate-1a75c62674f0e88c69acf03f4897b8b1.cfg b/.godot/editor/mainmenu.tscn-editstate-1a75c62674f0e88c69acf03f4897b8b1.cfg index 08a6638..f8646e8 100644 --- a/.godot/editor/mainmenu.tscn-editstate-1a75c62674f0e88c69acf03f4897b8b1.cfg +++ b/.godot/editor/mainmenu.tscn-editstate-1a75c62674f0e88c69acf03f4897b8b1.cfg @@ -8,7 +8,7 @@ Anim={ "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(-200.175, -209.475), +"ofs": Vector2(-117.913, -178.708), "primary_grid_step": Vector2i(8, 8), "show_edit_locks": true, "show_guides": true, @@ -32,7 +32,7 @@ Anim={ "snap_rotation_step": 0.261799, "snap_scale": false, "snap_scale_step": 0.1, -"zoom": 0.5 +"zoom": 0.561231 } 3D={ "fov": 70.01, @@ -173,4 +173,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17095/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@61/@VBoxContainer@62/@PanelContainer@109/MainScreen/@CanvasItemEditor@9461/@VSplitContainer@9280/@HSplitContainer@9282/@HSplitContainer@9284/@Control@9285/@SubViewportContainer@9286/@SubViewport@9287/Game/Killzone")]) diff --git a/.godot/editor/mainmenu.tscn-folding-1a75c62674f0e88c69acf03f4897b8b1.cfg b/.godot/editor/mainmenu.tscn-folding-1a75c62674f0e88c69acf03f4897b8b1.cfg index 23f62b9..2cc8a54 100644 --- a/.godot/editor/mainmenu.tscn-folding-1a75c62674f0e88c69acf03f4897b8b1.cfg +++ b/.godot/editor/mainmenu.tscn-folding-1a75c62674f0e88c69acf03f4897b8b1.cfg @@ -1,5 +1,5 @@ [folding] -node_unfolds=[NodePath("MarginContainer"), PackedStringArray("Layout", "Layout/Transform"), NodePath("MarginContainer/Panel"), PackedStringArray("Layout", "Layout/Container Sizing", "Layout/Transform", "Theme"), NodePath("MarginContainer/Panel/VBoxContainer"), PackedStringArray("Layout"), NodePath("MarginContainer2"), PackedStringArray("Layout", "Layout/Transform", "Localization"), NodePath("MarginContainer2/HBoxContainer"), PackedStringArray("Layout", "Localization", "Layout/Transform", "Layout/Container Sizing"), NodePath("MarginContainer2/HBoxContainer/World1"), PackedStringArray("Layout", "Layout/Transform", "Layout/Container Sizing", "Localization", "Focus"), NodePath("MarginContainer2/HBoxContainer/World1/Label2"), PackedStringArray("Layout", "Layout/Transform", "Theme Overrides", "Theme Overrides/fonts", "Theme Overrides/font_sizes", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("MarginContainer2/HBoxContainer/World1/Label1"), PackedStringArray("Theme", "Layout"), NodePath("MarginContainer2/HBoxContainer/World4"), PackedStringArray("Theme", "Visibility", "Layout", "Layout/Container Sizing"), NodePath("MarginContainer2/Panel"), PackedStringArray("Layout", "Layout/Container Sizing", "Layout/Transform", "Theme", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/panel", "Localization")] +node_unfolds=[NodePath("MarginContainer"), PackedStringArray("Layout"), NodePath("MarginContainer/Panel"), PackedStringArray("Layout", "Layout/Container Sizing", "Layout/Transform", "Theme"), NodePath("MarginContainer/Panel/VBoxContainer"), PackedStringArray("Layout"), NodePath("MarginContainer2"), PackedStringArray("Layout", "Layout/Transform", "Localization"), NodePath("MarginContainer2/HBoxContainer"), PackedStringArray("Layout", "Localization", "Layout/Transform", "Layout/Container Sizing"), NodePath("MarginContainer2/HBoxContainer/World1"), PackedStringArray("Layout", "Layout/Transform", "Layout/Container Sizing", "Localization", "Focus"), NodePath("MarginContainer2/HBoxContainer/World1/Label2"), PackedStringArray("Layout", "Layout/Transform", "Theme Overrides", "Theme Overrides/fonts", "Theme Overrides/font_sizes", "Theme Overrides/styles", "theme_override_styles/normal"), NodePath("MarginContainer2/HBoxContainer/World1/Label1"), PackedStringArray("Theme", "Layout"), NodePath("MarginContainer2/HBoxContainer/World3"), PackedStringArray("Layout", "Visibility"), NodePath("MarginContainer2/HBoxContainer/World3/Label"), PackedStringArray("Theme Overrides", "Theme Overrides/fonts", "Theme Overrides/font_sizes"), NodePath("MarginContainer2/HBoxContainer/World4"), PackedStringArray("Theme", "Visibility", "Layout", "Layout/Container Sizing", "Texture", "Ordering"), NodePath("MarginContainer2/Panel"), PackedStringArray("Layout", "Layout/Container Sizing", "Layout/Transform", "Theme", "Theme Overrides", "Theme Overrides/styles", "theme_override_styles/panel", "Localization")] resource_unfolds=["res://scenes/mainmenu.tscn::Theme_45hd1", PackedStringArray(), "res://scenes/mainmenu.tscn::StyleBoxFlat_2rwsq", PackedStringArray(), "res://scenes/mainmenu.tscn::StyleBoxFlat_8c08p", PackedStringArray("Border Width", "Expand Margins"), "res://scenes/mainmenu.tscn::StyleBoxFlat_llkcd", PackedStringArray("Border Width", "Expand Margins")] nodes_folded=[] diff --git a/.godot/editor/mainmenu2.tscn-editstate-aff36490106a0d5d7998ae54548faa72.cfg b/.godot/editor/mainmenu2.tscn-editstate-aff36490106a0d5d7998ae54548faa72.cfg new file mode 100644 index 0000000..18997ac --- /dev/null +++ b/.godot/editor/mainmenu2.tscn-editstate-aff36490106a0d5d7998ae54548faa72.cfg @@ -0,0 +1,176 @@ +[editor_states] + +Anim={ +"visible": false +} +2D={ +"grid_offset": Vector2(0, 0), +"grid_snap_active": false, +"grid_step": Vector2(8, 8), +"grid_visibility": 1, +"ofs": Vector2(323.971, -189.616), +"primary_grid_step": Vector2i(8, 8), +"show_edit_locks": true, +"show_guides": true, +"show_helpers": true, +"show_origin": true, +"show_rulers": true, +"show_transformation_gizmos": true, +"show_viewport": true, +"show_zoom_control": true, +"smart_snap_active": false, +"snap_guides": true, +"snap_node_anchors": true, +"snap_node_center": true, +"snap_node_parent": true, +"snap_node_sides": true, +"snap_other_nodes": true, +"snap_pixel": true, +"snap_relative": false, +"snap_rotation": false, +"snap_rotation_offset": 0.0, +"snap_rotation_step": 0.261799, +"snap_scale": false, +"snap_scale_step": 0.1, +"zoom": 0.890899 +} +3D={ +"fov": 70.01, +"gizmos_status": { +"AudioListener3D": 0, +"AudioStreamPlayer3D": 0, +"CPUParticles3D": 0, +"CSGShape3D": 0, +"Camera3D": 0, +"CollisionObject3D": 0, +"CollisionPolygon3D": 0, +"CollisionShape3D": 0, +"Decal": 0, +"FogVolume": 0, +"GPUParticles3D": 0, +"GPUParticlesCollision3D": 0, +"Joint3D": 0, +"Light3D": 0, +"LightmapGI": 0, +"LightmapProbe": 0, +"Marker3D": 0, +"NavigationLink3D": 0, +"NavigationRegion3D": 0, +"OccluderInstance3D": 0, +"Path3D": 0, +"PhantomCamera": 0, +"PhysicalBone3D": 0, +"RayCast3D": 0, +"ReflectionProbe": 0, +"ShapeCast3D": 0, +"Skeleton3D": 0, +"SoftBody3D": 0, +"SpringArm3D": 0, +"VehicleWheel3D": 0, +"VisibleOnScreenNotifier3D": 0, +"VoxelGI": 0 +}, +"local_coords": false, +"preview_sun_env": { +"environ_ao_enabled": false, +"environ_enabled": true, +"environ_energy": 1.0, +"environ_gi_enabled": false, +"environ_glow_enabled": true, +"environ_ground_color": Color(0.2, 0.169, 0.133, 1), +"environ_sky_color": Color(0.385, 0.454, 0.55, 1), +"environ_tonemap_enabled": true, +"sun_color": Color(1, 1, 1, 1), +"sun_enabled": true, +"sun_energy": 1.0, +"sun_max_distance": 100.0, +"sun_rotation": Vector2(-1.0472, 2.61799) +}, +"rotate_snap": 15.0, +"scale_snap": 10.0, +"show_grid": true, +"show_origin": true, +"snap_enabled": false, +"translate_snap": 1.0, +"viewport_mode": 1, +"viewports": [{ +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": true, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}, { +"auto_orthogonal": false, +"auto_orthogonal_enabled": true, +"cinematic_preview": false, +"display_mode": 20, +"distance": 4.0, +"doppler": false, +"frame_time": false, +"gizmos": true, +"half_res": false, +"information": false, +"listener": false, +"lock_rotation": false, +"orthogonal": false, +"position": Vector3(0, 0, 0), +"use_environment": false, +"view_type": 0, +"x_rotation": 0.5, +"y_rotation": -0.5 +}], +"zfar": 4000.01, +"znear": 0.05 +} +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17095/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@61/@VBoxContainer@62/@PanelContainer@109/MainScreen/@CanvasItemEditor@9461/@VSplitContainer@9280/@HSplitContainer@9282/@HSplitContainer@9284/@Control@9285/@SubViewportContainer@9286/@SubViewport@9287/Game/Killzone")]) diff --git a/.godot/editor/mainmenu2.tscn-folding-aff36490106a0d5d7998ae54548faa72.cfg b/.godot/editor/mainmenu2.tscn-folding-aff36490106a0d5d7998ae54548faa72.cfg new file mode 100644 index 0000000..48fbba2 --- /dev/null +++ b/.godot/editor/mainmenu2.tscn-folding-aff36490106a0d5d7998ae54548faa72.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[NodePath("."), PackedStringArray("Layout"), NodePath("MarginContainer2/Panel"), PackedStringArray("Layout"), NodePath("MarginContainer2/HScrollBar"), PackedStringArray("Visibility", "Ordering", "Layout", "Layout/Container Sizing", "Layout/Transform", "Theme", "Theme Overrides")] +resource_unfolds=["res://scenes/mainmenu2.tscn::Theme_45hd1", PackedStringArray(), "res://scenes/mainmenu2.tscn::StyleBoxFlat_2rwsq", PackedStringArray(), "res://scenes/mainmenu2.tscn::StyleBoxFlat_llkcd", PackedStringArray(), "res://scenes/mainmenu2.tscn::StyleBoxFlat_8c08p", PackedStringArray()] +nodes_folded=[] diff --git a/.godot/editor/optionsmenu.tscn-editstate-7946f7215711e60c9a0eac2a1e6d5ccb.cfg b/.godot/editor/optionsmenu.tscn-editstate-7946f7215711e60c9a0eac2a1e6d5ccb.cfg index 025fd90..e865666 100644 --- a/.godot/editor/optionsmenu.tscn-editstate-7946f7215711e60c9a0eac2a1e6d5ccb.cfg +++ b/.godot/editor/optionsmenu.tscn-editstate-7946f7215711e60c9a0eac2a1e6d5ccb.cfg @@ -8,7 +8,7 @@ Anim={ "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(373.537, 222.237), +"ofs": Vector2(-200.175, -209.475), "primary_grid_step": Vector2i(8, 8), "show_edit_locks": true, "show_guides": true, @@ -32,7 +32,7 @@ Anim={ "snap_rotation_step": 0.261799, "snap_scale": false, "snap_scale_step": 0.1, -"zoom": 2.51984 +"zoom": 0.5 } 3D={ "fov": 70.01, @@ -173,4 +173,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17095/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@61/@VBoxContainer@62/@PanelContainer@109/MainScreen/@CanvasItemEditor@9461/@VSplitContainer@9280/@HSplitContainer@9282/@HSplitContainer@9284/@Control@9285/@SubViewportContainer@9286/@SubViewport@9287/Game/Killzone")]) diff --git a/.godot/editor/player.tscn-editstate-234fb6894ec6226e856ab7f825500d3d.cfg b/.godot/editor/player.tscn-editstate-234fb6894ec6226e856ab7f825500d3d.cfg index fcb99f2..325f85c 100644 --- a/.godot/editor/player.tscn-editstate-234fb6894ec6226e856ab7f825500d3d.cfg +++ b/.godot/editor/player.tscn-editstate-234fb6894ec6226e856ab7f825500d3d.cfg @@ -173,4 +173,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17095/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@61/@VBoxContainer@62/@PanelContainer@109/MainScreen/@CanvasItemEditor@9461/@VSplitContainer@9280/@HSplitContainer@9282/@HSplitContainer@9284/@Control@9285/@SubViewportContainer@9286/@SubViewport@9287/Game/Killzone")]) diff --git a/.godot/editor/project_metadata.cfg b/.godot/editor/project_metadata.cfg index 9f96e82..671da1a 100644 --- a/.godot/editor/project_metadata.cfg +++ b/.godot/editor/project_metadata.cfg @@ -14,8 +14,8 @@ run_deploy_remote_debug=false [recent_files] -scenes=["res://scenes/mainmenu.tscn", "res://scenes/optionsmenu.tscn", "res://scenes/slime.tscn", "res://scenes/player.tscn", "res://scenes/game.tscn", "res://scenes/prudence.tscn", "res://scenes/killzone.tscn", "res://torch.tscn", "res://scenes/level1.tscn", "res://scenes/coin.tscn"] -scripts=["res://scripts/optionsmenu.gd", "res://scripts/player.gd", "res://scripts/gamemanager.gd", "res://scripts/slime.gd", "res://README.md", "res://scripts/signalbus.gd", "res://scripts/Camera2D.gd", "res://scripts/killzone.gd", "HBoxContainer", "res://scripts/mainmenu.gd"] +scenes=["res://scenes/mainmenu2.tscn", "res://scenes/mainmenu.tscn", "res://scenes/optionsmenu.tscn", "res://scenes/slime.tscn", "res://scenes/player.tscn", "res://scenes/game.tscn", "res://scenes/prudence.tscn", "res://scenes/killzone.tscn", "res://torch.tscn", "res://scenes/level1.tscn"] +scripts=["res://scripts/Camera2D.gd", "res://scripts/killzone.gd", "res://scripts/optionsmenu.gd", "res://scripts/player.gd", "res://scripts/gamemanager.gd", "res://scripts/slime.gd", "res://README.md", "res://scripts/signalbus.gd", "HBoxContainer", "res://scripts/mainmenu.gd"] [linked_properties] @@ -50,6 +50,7 @@ DirectionalLight2D:scale=true CanvasLayer:scale=true LightOccluder2D:scale=true Sprite2D:scale=true +HScrollBar:scale=true [dialog_bounds] diff --git a/.godot/editor/script_editor_cache.cfg b/.godot/editor/script_editor_cache.cfg index 4316a85..4d73bbd 100644 --- a/.godot/editor/script_editor_cache.cfg +++ b/.godot/editor/script_editor_cache.cfg @@ -59,12 +59,16 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 11, +"column": 0, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 22, +"row": 20, "scroll_position": 0.0, -"selection": false, +"selection": true, +"selection_from_column": 0, +"selection_from_line": 20, +"selection_to_column": 34, +"selection_to_line": 21, "syntax_highlighter": "GDScript" } @@ -73,10 +77,10 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 46, +"column": 27, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 29, +"row": 67, "scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" @@ -115,11 +119,11 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 0, +"column": 1, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 30, -"scroll_position": 5.0, +"row": 33, +"scroll_position": 7.0, "selection": false, "syntax_highlighter": "GDScript" } diff --git a/.godot/editor/slime.tscn-editstate-cfec31ac835903e5b6c8af87b017aecf.cfg b/.godot/editor/slime.tscn-editstate-cfec31ac835903e5b6c8af87b017aecf.cfg index 233f63c..9471ee1 100644 --- a/.godot/editor/slime.tscn-editstate-cfec31ac835903e5b6c8af87b017aecf.cfg +++ b/.godot/editor/slime.tscn-editstate-cfec31ac835903e5b6c8af87b017aecf.cfg @@ -173,4 +173,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17095/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@61/@VBoxContainer@62/@PanelContainer@109/MainScreen/@CanvasItemEditor@9461/@VSplitContainer@9280/@HSplitContainer@9282/@HSplitContainer@9284/@Control@9285/@SubViewportContainer@9286/@SubViewport@9287/Game/Killzone")]) diff --git a/.godot/uid_cache.bin b/.godot/uid_cache.bin index 138d329f50f24d139e0e5144f419a93963021814..1c4cef14cd602a3d9ef6654a75b934a03c686f80 100644 GIT binary patch delta 50 zcmaE_GfkH6H{G G=K%o9_7VpG delta 10 RcmbQH`(B4Jcq3z;7yuQ818D#N diff --git a/scenes/game.tscn b/scenes/game.tscn index 7a31156..9e7d327 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -805,5 +805,6 @@ limit_bottom = 280 script = ExtResource("14_7p3ir") [connection signal="mouse_entered" from="Player" to="Player/Camera2D" method="_on_player_mouse_entered"] +[connection signal="body_entered" from="Killzone" to="Player/Camera2D" method="_on_killzone_body_entered"] [connection signal="hit" from="Killzone" to="Player/Camera2D" method="_on_killzone_hit"] [connection signal="ready" from="Killzone" to="Player/Camera2D" method="_on_killzone_ready"] diff --git a/scenes/mainmenu.tscn b/scenes/mainmenu.tscn index 22e246d..8f200a3 100644 --- a/scenes/mainmenu.tscn +++ b/scenes/mainmenu.tscn @@ -38,21 +38,20 @@ layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 +offset_left = 1.0 +offset_right = 1.0 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_qj2ne") [node name="MarginContainer" type="MarginContainer" parent="."] +custom_minimum_size = Vector2(200, 200) layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -offset_left = -107.0 -offset_top = 76.0 -offset_right = 107.0 -offset_bottom = 179.0 grow_horizontal = 2 grow_vertical = 2 @@ -95,35 +94,40 @@ layout_mode = 1 anchors_preset = 5 anchor_left = 0.5 anchor_right = 0.5 -offset_left = -539.0 -offset_top = 30.0 -offset_right = -6.0 -offset_bottom = 203.0 +offset_left = -494.0 +offset_top = 50.0 +offset_right = 495.0 +offset_bottom = 318.0 grow_horizontal = 2 -scale = Vector2(2, 2) [node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer2"] -custom_minimum_size = Vector2(500, 0) layout_mode = 2 +size_flags_horizontal = 4 -[node name="World3" type="Control" parent="MarginContainer2/HBoxContainer"] +[node name="World1" type="Control" parent="MarginContainer2/HBoxContainer"] +y_sort_enabled = true +custom_minimum_size = Vector2(150, 0) layout_mode = 2 -size_flags_horizontal = 3 -[node name="Level4" type="Label" parent="MarginContainer2/HBoxContainer/World3"] +[node name="Label2" type="Label" parent="MarginContainer2/HBoxContainer/World1"] layout_mode = 1 -anchors_preset = 5 +anchors_preset = 8 anchor_left = 0.5 +anchor_top = 0.5 anchor_right = 0.5 -offset_left = -30.0 -offset_right = 30.0 -offset_bottom = 23.0 +anchor_bottom = 0.5 +offset_left = -69.0 +offset_top = -86.5 +offset_right = 69.0 +offset_bottom = -62.5 grow_horizontal = 2 +grow_vertical = 2 theme_override_fonts/font = ExtResource("2_h05dh") theme_override_font_sizes/font_size = 24 -text = "World 3" +theme_override_styles/normal = SubResource("StyleBoxFlat_8c08p") +text = "World 1" -[node name="Level5" type="TextureRect" parent="MarginContainer2/HBoxContainer/World3"] +[node name="Label1" type="TextureRect" parent="MarginContainer2/HBoxContainer/World1"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -138,27 +142,30 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("3_tlb1w") expand_mode = 1 +stretch_mode = 5 -[node name="World1" type="Control" parent="MarginContainer2/HBoxContainer"] -y_sort_enabled = true +[node name="World2" type="Control" parent="MarginContainer2/HBoxContainer"] +custom_minimum_size = Vector2(150, 0) layout_mode = 2 -size_flags_horizontal = 3 -[node name="Label2" type="Label" parent="MarginContainer2/HBoxContainer/World1"] +[node name="Label" type="Label" parent="MarginContainer2/HBoxContainer/World2"] layout_mode = 1 -anchors_preset = 5 +anchors_preset = 8 anchor_left = 0.5 +anchor_top = 0.5 anchor_right = 0.5 -offset_left = -30.0 -offset_right = 30.0 -offset_bottom = 23.0 +anchor_bottom = 0.5 +offset_left = -69.0 +offset_top = -86.5 +offset_right = 69.0 +offset_bottom = -62.5 grow_horizontal = 2 +grow_vertical = 2 theme_override_fonts/font = ExtResource("2_h05dh") theme_override_font_sizes/font_size = 24 -theme_override_styles/normal = SubResource("StyleBoxFlat_8c08p") -text = "World 1" +text = "World 2" -[node name="Label1" type="TextureRect" parent="MarginContainer2/HBoxContainer/World1"] +[node name="TextureRect" type="TextureRect" parent="MarginContainer2/HBoxContainer/World2"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -175,24 +182,28 @@ texture = ExtResource("3_tlb1w") expand_mode = 1 stretch_mode = 5 -[node name="World2" type="Control" parent="MarginContainer2/HBoxContainer"] +[node name="World3" type="Control" parent="MarginContainer2/HBoxContainer"] +custom_minimum_size = Vector2(150, 0) layout_mode = 2 -size_flags_horizontal = 3 -[node name="Level4" type="Label" parent="MarginContainer2/HBoxContainer/World2"] +[node name="Label" type="Label" parent="MarginContainer2/HBoxContainer/World3"] layout_mode = 1 -anchors_preset = 5 +anchors_preset = 8 anchor_left = 0.5 +anchor_top = 0.5 anchor_right = 0.5 -offset_left = -30.0 -offset_right = 30.0 -offset_bottom = 23.0 +anchor_bottom = 0.5 +offset_left = -69.0 +offset_top = -86.5 +offset_right = 69.0 +offset_bottom = -62.5 grow_horizontal = 2 +grow_vertical = 2 theme_override_fonts/font = ExtResource("2_h05dh") theme_override_font_sizes/font_size = 24 -text = "World 2" +text = "World 3" -[node name="Level5" type="TextureRect" parent="MarginContainer2/HBoxContainer/World2"] +[node name="TextureRect" type="TextureRect" parent="MarginContainer2/HBoxContainer/World3"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -207,20 +218,26 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("3_tlb1w") expand_mode = 1 +stretch_mode = 5 [node name="World4" type="Control" parent="MarginContainer2/HBoxContainer"] +visible = false +custom_minimum_size = Vector2(150, 0) layout_mode = 2 -size_flags_horizontal = 3 [node name="Level4" type="Label" parent="MarginContainer2/HBoxContainer/World4"] layout_mode = 1 -anchors_preset = 5 +anchors_preset = 8 anchor_left = 0.5 +anchor_top = 0.5 anchor_right = 0.5 -offset_left = -30.0 -offset_right = 30.0 -offset_bottom = 23.0 +anchor_bottom = 0.5 +offset_left = -69.0 +offset_top = -86.5 +offset_right = 69.0 +offset_bottom = -62.5 grow_horizontal = 2 +grow_vertical = 2 theme_override_fonts/font = ExtResource("2_h05dh") theme_override_font_sizes/font_size = 24 text = "World 4" @@ -240,10 +257,11 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("3_tlb1w") expand_mode = 1 +stretch_mode = 5 [node name="Panel" type="Panel" parent="MarginContainer2"] +custom_minimum_size = Vector2(0, 200) layout_mode = 2 -size_flags_vertical = 0 theme_override_styles/panel = SubResource("StyleBoxFlat_llkcd") [connection signal="pressed" from="MarginContainer/Panel/VBoxContainer/Play" to="." method="_on_play_pressed"] diff --git a/scenes/mainmenu2.tscn b/scenes/mainmenu2.tscn new file mode 100644 index 0000000..b23b3a7 --- /dev/null +++ b/scenes/mainmenu2.tscn @@ -0,0 +1,288 @@ +[gd_scene load_steps=8 format=3 uid="uid://dfyjja5jtyhwx"] + +[ext_resource type="Script" path="res://scripts/mainmenu.gd" id="1_s0bw2"] +[ext_resource type="FontFile" uid="uid://dbjl1e6kdxpl6" path="res://assets/fonts/PixelOperator8.ttf" id="2_k51t6"] +[ext_resource type="Texture2D" uid="uid://cyfxuch6qa87f" path="res://icon.svg" id="3_dfwo2"] + +[sub_resource type="Theme" id="Theme_45hd1"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2rwsq"] +bg_color = Color(0.4, 0.627451, 0.796078, 1) +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 +border_color = Color(0, 0, 0, 1) +border_blend = true +expand_margin_left = 10.0 +expand_margin_top = 10.0 +expand_margin_right = 10.0 +expand_margin_bottom = 10.0 +shadow_color = Color(1, 1, 1, 0.6) +shadow_size = 2 +anti_aliasing = false + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_llkcd"] +bg_color = Color(0.121569, 0.121569, 0.121569, 0.305882) +expand_margin_top = 10.0 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8c08p"] +bg_color = Color(0.152941, 0.152941, 0.152941, 1) +expand_margin_left = 5.0 +expand_margin_top = 5.0 +expand_margin_right = 5.0 +expand_margin_bottom = 5.0 + +[node name="mainmenu" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 1.0 +offset_right = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_s0bw2") + +[node name="MarginContainer" type="MarginContainer" parent="."] +custom_minimum_size = Vector2(200, 200) +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Panel" type="Panel" parent="MarginContainer"] +layout_mode = 2 +theme = SubResource("Theme_45hd1") +theme_override_styles/panel = SubResource("StyleBoxFlat_2rwsq") + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/Panel"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -46.0 +offset_top = -40.0 +offset_right = 46.0 +offset_bottom = 40.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Play" type="Button" parent="MarginContainer/Panel/VBoxContainer"] +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_k51t6") +text = "Play" + +[node name="Options" type="Button" parent="MarginContainer/Panel/VBoxContainer"] +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_k51t6") +text = "Options" + +[node name="Exit" type="Button" parent="MarginContainer/Panel/VBoxContainer"] +layout_mode = 2 +theme_override_fonts/font = ExtResource("2_k51t6") +text = "Exit" + +[node name="MarginContainer2" type="MarginContainer" parent="."] +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -494.0 +offset_top = 50.0 +offset_right = 495.0 +offset_bottom = 318.0 +grow_horizontal = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer2"] +layout_mode = 2 +size_flags_horizontal = 4 + +[node name="Panel" type="Panel" parent="MarginContainer2"] +custom_minimum_size = Vector2(0, 150) +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_llkcd") + +[node name="HScrollBar" type="HScrollBar" parent="MarginContainer2"] +layout_mode = 2 + +[node name="World1" type="Control" parent="MarginContainer2/HScrollBar"] +y_sort_enabled = true +custom_minimum_size = Vector2(150, 0) +layout_mode = 2 +anchors_preset = 0 +offset_left = 265.0 +offset_right = 415.0 +offset_bottom = 268.0 + +[node name="Label2" type="Label" parent="MarginContainer2/HScrollBar/World1"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -69.0 +offset_top = -86.5 +offset_right = 69.0 +offset_bottom = -62.5 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_fonts/font = ExtResource("2_k51t6") +theme_override_font_sizes/font_size = 24 +theme_override_styles/normal = SubResource("StyleBoxFlat_8c08p") +text = "World 1" + +[node name="Label1" type="TextureRect" parent="MarginContainer2/HScrollBar/World1"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -32.0 +offset_top = -32.0 +offset_right = 32.0 +offset_bottom = 32.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("3_dfwo2") +expand_mode = 1 +stretch_mode = 5 + +[node name="World2" type="Control" parent="MarginContainer2/HScrollBar"] +custom_minimum_size = Vector2(150, 0) +layout_mode = 2 +anchors_preset = 0 +offset_left = 419.0 +offset_right = 569.0 +offset_bottom = 268.0 + +[node name="Label" type="Label" parent="MarginContainer2/HScrollBar/World2"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -69.0 +offset_top = -86.5 +offset_right = 69.0 +offset_bottom = -62.5 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_fonts/font = ExtResource("2_k51t6") +theme_override_font_sizes/font_size = 24 +text = "World 2" + +[node name="TextureRect" type="TextureRect" parent="MarginContainer2/HScrollBar/World2"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -32.0 +offset_top = -32.0 +offset_right = 32.0 +offset_bottom = 32.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("3_dfwo2") +expand_mode = 1 +stretch_mode = 5 + +[node name="World3" type="Control" parent="MarginContainer2/HScrollBar"] +custom_minimum_size = Vector2(150, 0) +layout_mode = 2 +anchors_preset = 0 +offset_left = 573.0 +offset_right = 723.0 +offset_bottom = 268.0 + +[node name="Label" type="Label" parent="MarginContainer2/HScrollBar/World3"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -69.0 +offset_top = -86.5 +offset_right = 69.0 +offset_bottom = -62.5 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_fonts/font = ExtResource("2_k51t6") +theme_override_font_sizes/font_size = 24 +text = "World 3" + +[node name="TextureRect" type="TextureRect" parent="MarginContainer2/HScrollBar/World3"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -32.0 +offset_top = -32.0 +offset_right = 32.0 +offset_bottom = 32.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("3_dfwo2") +expand_mode = 1 +stretch_mode = 5 + +[node name="World4" type="Control" parent="MarginContainer2/HScrollBar"] +visible = false +custom_minimum_size = Vector2(150, 0) +layout_mode = 2 +anchors_preset = 0 +offset_left = 265.0 +offset_right = 415.0 +offset_bottom = 173.0 + +[node name="Level4" type="Label" parent="MarginContainer2/HScrollBar/World4"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -69.0 +offset_top = -86.5 +offset_right = 69.0 +offset_bottom = -62.5 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_fonts/font = ExtResource("2_k51t6") +theme_override_font_sizes/font_size = 24 +text = "World 4" + +[node name="Level5" type="TextureRect" parent="MarginContainer2/HScrollBar/World4"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -32.0 +offset_top = -32.0 +offset_right = 32.0 +offset_bottom = 32.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("3_dfwo2") +expand_mode = 1 +stretch_mode = 5 + +[connection signal="pressed" from="MarginContainer/Panel/VBoxContainer/Play" to="." method="_on_play_pressed"] +[connection signal="pressed" from="MarginContainer/Panel/VBoxContainer/Options" to="." method="_on_options_pressed"] +[connection signal="pressed" from="MarginContainer/Panel/VBoxContainer/Exit" to="." method="_on_exit_pressed"] diff --git a/scripts/Camera2D.gd b/scripts/Camera2D.gd index 06c980a..efa1b77 100644 --- a/scripts/Camera2D.gd +++ b/scripts/Camera2D.gd @@ -29,6 +29,7 @@ func _shake(): offset.x = amplitude * amount * noise.get_noise_2d(noise.seed,_noise_y) offset.y = amplitude * amount * noise.get_noise_2d(noise.seed*2,_noise_y) -func _on_killzone_hit(): - add_trauma(0.6) + +func _on_killzone_body_entered(body): print("fine") + add_trauma(0.6) diff --git a/scripts/killzone.gd b/scripts/killzone.gd index de327cf..95a9506 100644 --- a/scripts/killzone.gd +++ b/scripts/killzone.gd @@ -20,4 +20,3 @@ func _process(delta): func _on_body_entered(body): _throw_parent_out_of_screen(body) - hit.emit() diff --git a/scripts/mainmenu.gd b/scripts/mainmenu.gd index 15c492e..0cc9b95 100644 --- a/scripts/mainmenu.gd +++ b/scripts/mainmenu.gd @@ -33,7 +33,10 @@ func _start_animation_right(): animation_in_progress = true var hbox = $MarginContainer2/HBoxContainer var last_child = worlds[worlds.size()-1] - hbox.move_child(last_child, 0) # Moves last child to index zero, which reorders all children + for world in worlds: + world.visible = true + hbox.move_child(last_child, 0) + last_child.visible = false selected_level = last_child.name print("selected level: ", last_child.name) @@ -46,13 +49,13 @@ func _start_animation_right(): func _on_play_pressed(): if selected_level == "idk": get_tree().change_scene_to_file("res://scenes/game.tscn") - elif selected_level == "World1": + elif selected_level == "World3": get_tree().change_scene_to_file("res://scenes/prudence.tscn") - elif selected_level == "World2": + elif selected_level == "World4": print("world2") - elif selected_level == "World3": + elif selected_level == "World1": print("world3") - elif selected_level == "World4": + elif selected_level == "World2": print("world4") func _on_options_pressed():