From f4f7a8513fed9e47e7456d6602e823cb8115a9aa Mon Sep 17 00:00:00 2001 From: Winnie Kwan Date: Wed, 14 Aug 2024 21:21:00 -0400 Subject: [PATCH] Fixed crate trap with groups --- ...lding-d8b27d524c55c751f790b95800ba03e2.cfg | 2 +- ...state-6d8e6ff1e6f20a36e0402d27c623c86c.cfg | 4 +- ...state-b6bd7a241034177d7fe082a7597ba8ea.cfg | 2 +- ...state-96b2131180b71dd158e52c5527d22dd4.cfg | 2 +- ...state-65637dc57c83dac3d15ec1cb22439bd7.cfg | 6 +-- .godot/editor/editor_layout.cfg | 20 ++++---- .godot/editor/filesystem_cache8 | 26 +++++----- .godot/editor/filesystem_update4 | 2 + ...state-c2a7af834e91ff64325daddf58e45dc0.cfg | 8 +-- ...lding-c2a7af834e91ff64325daddf58e45dc0.cfg | 4 +- ...state-38bf74ff262409a94a41206b2b776d33.cfg | 2 +- ...state-cc2f727180cd42d9c13434cb55b1ce69.cfg | 4 +- .godot/editor/project_metadata.cfg | 8 ++- .godot/editor/script_editor_cache.cfg | 42 ++++++++-------- ...state-7f960b0e063e7daa9b04ba3fda3f82d8.cfg | 4 +- ...lding-04c9d84a3d9ea9dd834ba38ef56cde2b.cfg | 3 ++ scenes/character.tscn | 2 +- scenes/game.tscn | 50 +------------------ scenes/slimeEnemy.tscn | 2 +- scripts/Trigger.gd | 6 +-- 20 files changed, 80 insertions(+), 119 deletions(-) create mode 100644 .godot/editor/trigger.gd-folding-04c9d84a3d9ea9dd834ba38ef56cde2b.cfg diff --git a/.godot/editor/Trigger.gd-folding-d8b27d524c55c751f790b95800ba03e2.cfg b/.godot/editor/Trigger.gd-folding-d8b27d524c55c751f790b95800ba03e2.cfg index e860dd4..762d715 100644 --- a/.godot/editor/Trigger.gd-folding-d8b27d524c55c751f790b95800ba03e2.cfg +++ b/.godot/editor/Trigger.gd-folding-d8b27d524c55c751f790b95800ba03e2.cfg @@ -1,3 +1,3 @@ [folding] -sections_unfolded=PackedStringArray() +sections_unfolded=PackedStringArray("Resource") diff --git a/.godot/editor/bullet.tscn-editstate-6d8e6ff1e6f20a36e0402d27c623c86c.cfg b/.godot/editor/bullet.tscn-editstate-6d8e6ff1e6f20a36e0402d27c623c86c.cfg index b7c69a8..a91b6f0 100644 --- a/.godot/editor/bullet.tscn-editstate-6d8e6ff1e6f20a36e0402d27c623c86c.cfg +++ b/.godot/editor/bullet.tscn-editstate-6d8e6ff1e6f20a36e0402d27c623c86c.cfg @@ -1,7 +1,7 @@ [editor_states] Anim={ -"visible": false +"visible": true } 2D={ "grid_offset": Vector2(0, 0), @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/Game/Coins")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/CharacterBody2D")]) diff --git a/.godot/editor/character.tscn-editstate-b6bd7a241034177d7fe082a7597ba8ea.cfg b/.godot/editor/character.tscn-editstate-b6bd7a241034177d7fe082a7597ba8ea.cfg index 66a7910..7363054 100644 --- a/.godot/editor/character.tscn-editstate-b6bd7a241034177d7fe082a7597ba8ea.cfg +++ b/.godot/editor/character.tscn-editstate-b6bd7a241034177d7fe082a7597ba8ea.cfg @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/Game/Coins")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/CharacterBody2D")]) diff --git a/.godot/editor/coin.tscn-editstate-96b2131180b71dd158e52c5527d22dd4.cfg b/.godot/editor/coin.tscn-editstate-96b2131180b71dd158e52c5527d22dd4.cfg index 90a14ad..5e29c79 100644 --- a/.godot/editor/coin.tscn-editstate-96b2131180b71dd158e52c5527d22dd4.cfg +++ b/.godot/editor/coin.tscn-editstate-96b2131180b71dd158e52c5527d22dd4.cfg @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/Game/Coins")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/CharacterBody2D")]) diff --git a/.godot/editor/crate.tscn-editstate-65637dc57c83dac3d15ec1cb22439bd7.cfg b/.godot/editor/crate.tscn-editstate-65637dc57c83dac3d15ec1cb22439bd7.cfg index c344d10..07aadbe 100644 --- a/.godot/editor/crate.tscn-editstate-65637dc57c83dac3d15ec1cb22439bd7.cfg +++ b/.godot/editor/crate.tscn-editstate-65637dc57c83dac3d15ec1cb22439bd7.cfg @@ -1,14 +1,14 @@ [editor_states] Anim={ -"visible": false +"visible": true } 2D={ "grid_offset": Vector2(0, 0), "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(-51.75, -30.5), +"ofs": Vector2(-71.25, -39.35), "primary_grid_step": Vector2i(8, 8), "show_edit_locks": true, "show_guides": true, @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/Game/Coins")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/CharacterBody2D")]) diff --git a/.godot/editor/editor_layout.cfg b/.godot/editor/editor_layout.cfg index 46a8cdf..4acb4da 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,26 +19,26 @@ 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://graphics/") -dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://") +dock_filesystem_selected_paths=PackedStringArray("res://scripts/trigger.gd") +dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/") dock_3="Scene,Import" dock_4="FileSystem" dock_5="Inspector,Node,History" [EditorNode] -open_scenes=PackedStringArray("res://scenes/game.tscn", "res://scenes/character.tscn", "res://scenes/bullet.tscn", "res://scenes/crate.tscn", "res://scenes/platform.tscn", "res://scenes/coin.tscn", "res://scenes/hud.tscn", "res://scenes/slimeEnemy.tscn") -current_scene="" +open_scenes=PackedStringArray("res://scenes/character.tscn", "res://scenes/bullet.tscn", "res://scenes/crate.tscn", "res://scenes/platform.tscn", "res://scenes/coin.tscn", "res://scenes/hud.tscn", "res://scenes/slimeEnemy.tscn", "res://scenes/game.tscn") +current_scene="res://scenes/character.tscn" center_split_offset=-272 selected_default_debugger_tab_idx=0 -selected_main_editor_idx=0 -selected_bottom_panel_item=0 +selected_main_editor_idx=2 +selected_bottom_panel_item=9 [ScriptEditor] -open_scripts=["res://scripts/bullet.gd", "res://scripts/characterBody.gd", "res://scripts/coin.gd", "res://scripts/enemy.gd", "res://scripts/gamecontroller.gd", "res://scripts/Trigger.gd"] -selected_script="res://scripts/gamecontroller.gd" -open_help=[] +open_scripts=["res://scripts/bullet.gd", "res://scripts/characterBody.gd", "res://scripts/coin.gd", "res://scripts/enemy.gd", "res://scripts/gamecontroller.gd", "res://scripts/trigger.gd"] +selected_script="res://scripts/trigger.gd" +open_help=["CharacterBody2D"] script_split_offset=70 list_split_offset=0 diff --git a/.godot/editor/filesystem_cache8 b/.godot/editor/filesystem_cache8 index 2275f70..021dbbc 100644 --- a/.godot/editor/filesystem_cache8 +++ b/.godot/editor/filesystem_cache8 @@ -21,21 +21,21 @@ Player Idle 48x48.png::CompressedTexture2D::6544563428604246579::1723383776::172 player jump 48x48.png::CompressedTexture2D::1627608568707791839::1723383776::1723682031::1::::<><>:: ::res://graphics/playerLand/::1723682046 player land 48x48.png::CompressedTexture2D::3499637713582873633::1723383776::1723682046::1::::<><>:: -::res://graphics/playerRun/::1723383776 +::res://graphics/playerRun/::1723682052 player run 48x48.png::CompressedTexture2D::1502492849971408816::1723383776::1723682052::1::::<><>:: -::res://scenes/::1723682052 -bullet.tscn::PackedScene::6880909734590904373::1723383776::0::1::::<><>::res://scripts/bullet.gd<>uid://ddxm7hj323fta::::res://graphics/items/cannister.png -character.tscn::PackedScene::451838158579532324::1723682052::0::1::::<><>::res://scripts/characterBody.gd<>uid://714a2jbwrdbp::::res://graphics/playerDeath/Player Death 64x64.png<>uid://c0iiaebonyhh0::::res://graphics/playerIdle/Player Idle 48x48.png<>uid://vn23qn3f0dvc::::res://graphics/playerRun/player run 48x48.png<>uid://xgoqfqmvorcx::::res://graphics/playerJump/player jump 48x48.png -coin.tscn::PackedScene::2149639666289516704::1723679592::0::1::::<><>::uid://b38vv525jl8cd::::res://graphics/pickups/coin.png<>res://scripts/coin.gd -crate.tscn::PackedScene::41931541512830250::1723383776::0::1::::<><>::uid://ddxm7hj323fta::::res://graphics/items/cannister.png -game.tscn::PackedScene::1738196330916037717::1723679592::0::1::::<><>::res://scripts/gamecontroller.gd<>uid://go4yc8hfo1gq::::res://scenes/character.tscn<>uid://dwb83f7uoweuy::::res://graphics/Terrain (32x32).png<>res://scripts/Trigger.gd<>uid://doodiicuxeb53::::res://graphics/background/BG Image.png<>uid://ry5bkalocmx5::::res://graphics/background/Additional Sky.png<>uid://cl2dnusewe0ch::::res://graphics/background/Additional Water.png<>uid://ukuu7p7vhlq::::res://scenes/crate.tscn<>uid://c5w3e6gjovcvk::::res://scenes/platform.tscn<>uid://5vkisovypn7u::::res://scenes/coin.tscn<>uid://b07px1qf5obql::::res://scenes/slimeEnemy.tscn -hud.tscn::PackedScene::2846083967266652522::1723679592::0::1::::<><>:: -platform.tscn::PackedScene::6925631844010706180::1723383776::0::1::::<><>:: -slimeEnemy.tscn::PackedScene::4208155081516926623::1723679592::0::1::::<><>::uid://dl8k7bq5pkuvk::::res://graphics/enemies/slime_purple.png<>res://scripts/enemy.gd -::res://scripts/::1723681992 +::res://scenes/::1723682242 +bullet.tscn::PackedScene::6880909734590904373::1723682242::0::1::::<><>::res://scripts/bullet.gd<>uid://ddxm7hj323fta::::res://graphics/items/cannister.png +character.tscn::PackedScene::451838158579532324::1723682242::0::1::::<><>::res://scripts/characterBody.gd<>uid://714a2jbwrdbp::::res://graphics/playerDeath/Player Death 64x64.png<>uid://c0iiaebonyhh0::::res://graphics/playerIdle/Player Idle 48x48.png<>uid://xgoqfqmvorcx::::res://graphics/playerJump/player jump 48x48.png<>uid://vn23qn3f0dvc::::res://graphics/playerRun/player run 48x48.png +coin.tscn::PackedScene::2149639666289516704::1723682242::0::1::::<><>::uid://b38vv525jl8cd::::res://graphics/pickups/coin.png<>res://scripts/coin.gd +crate.tscn::PackedScene::41931541512830250::1723682242::0::1::::<><>::uid://ddxm7hj323fta::::res://graphics/items/cannister.png +game.tscn::PackedScene::1738196330916037717::1723684315::0::1::::<><>::res://scripts/gamecontroller.gd<>uid://go4yc8hfo1gq::::res://scenes/character.tscn<>uid://dwb83f7uoweuy::::res://graphics/Terrain (32x32).png<>res://scripts/Trigger.gd<>uid://doodiicuxeb53::::res://graphics/background/BG Image.png<>uid://ry5bkalocmx5::::res://graphics/background/Additional Sky.png<>uid://cl2dnusewe0ch::::res://graphics/background/Additional Water.png<>uid://ukuu7p7vhlq::::res://scenes/crate.tscn<>uid://5vkisovypn7u::::res://scenes/coin.tscn<>uid://b07px1qf5obql::::res://scenes/slimeEnemy.tscn +hud.tscn::PackedScene::2846083967266652522::1723682242::0::1::::<><>:: +platform.tscn::PackedScene::6925631844010706180::1723682242::0::1::::<><>:: +slimeEnemy.tscn::PackedScene::4208155081516926623::1723682242::0::1::::<><>::uid://dl8k7bq5pkuvk::::res://graphics/enemies/slime_purple.png<>res://scripts/enemy.gd +::res://scripts/::1723682076 bullet.gd::GDScript::-1::1723383776::0::1::::<>Area2D<>:: characterBody.gd::GDScript::-1::1723679592::0::1::::<>CharacterBody2D<>:: coin.gd::GDScript::-1::1723679592::0::1::::<>Area2D<>:: -enemy.gd::GDScript::-1::1723679592::0::1::::<>Area2D<>:: +enemy.gd::GDScript::-1::1723682076::0::1::::<>Area2D<>:: gamecontroller.gd::GDScript::-1::1723679592::0::1::::<>Node<>:: -Trigger.gd::GDScript::-1::1723679592::0::1::::<>Area2D<>:: +Trigger.gd::GDScript::-1::1723684315::0::1::::<>Area2D<>:: diff --git a/.godot/editor/filesystem_update4 b/.godot/editor/filesystem_update4 index 9a3cb15..2e5d839 100644 --- a/.godot/editor/filesystem_update4 +++ b/.godot/editor/filesystem_update4 @@ -7,3 +7,5 @@ res://scenes/crate.tscn res://scenes/platform.tscn res://scenes/coin.tscn res://scenes/hud.tscn +res://scripts/Trigger.gd +res://scripts/trigger.gd diff --git a/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg b/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg index 7290f61..6d533ed 100644 --- a/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg +++ b/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg @@ -1,14 +1,14 @@ [editor_states] Anim={ -"visible": false +"visible": true } 2D={ "grid_offset": Vector2(0, 0), "grid_snap_active": false, "grid_step": Vector2(8, 8), "grid_visibility": 1, -"ofs": Vector2(-72.3954, -166.147), +"ofs": Vector2(-228.526, -228.286), "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": 1.33484 +"zoom": 0.943874 } 3D={ "fov": 70.01, @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/Game/Coins")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/CharacterBody2D")]) diff --git a/.godot/editor/game.tscn-folding-c2a7af834e91ff64325daddf58e45dc0.cfg b/.godot/editor/game.tscn-folding-c2a7af834e91ff64325daddf58e45dc0.cfg index 4057eeb..d542da2 100644 --- a/.godot/editor/game.tscn-folding-c2a7af834e91ff64325daddf58e45dc0.cfg +++ b/.godot/editor/game.tscn-folding-c2a7af834e91ff64325daddf58e45dc0.cfg @@ -1,5 +1,5 @@ [folding] -node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("TileMap"), PackedStringArray("tile_set", "Transform"), NodePath("ParallaxBackground/ParallaxLayer"), PackedStringArray("Motion"), NodePath("ParallaxBackground/ParallaxLayer/Sprite2D"), PackedStringArray("Transform"), NodePath("ParallaxBackground/ParallaxLayer/Sprite2D2"), PackedStringArray("Transform"), NodePath("ParallaxBackground/ParallaxLayer/Sprite2D3"), PackedStringArray("Transform"), NodePath("level"), PackedStringArray("Transform"), NodePath("level/StaticBody2D"), PackedStringArray("Transform"), NodePath("AreaTrigger"), PackedStringArray("Transform"), NodePath("Platform"), PackedStringArray("Transform"), NodePath("Coins/Area2D"), PackedStringArray("Transform"), NodePath("SlimeEnemy"), PackedStringArray("Transform")] +node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("TileMap"), PackedStringArray("tile_set", "Transform"), NodePath("ParallaxBackground/ParallaxLayer"), PackedStringArray("Motion"), NodePath("ParallaxBackground/ParallaxLayer/Sprite2D"), PackedStringArray("Transform"), NodePath("ParallaxBackground/ParallaxLayer/Sprite2D2"), PackedStringArray("Transform"), NodePath("ParallaxBackground/ParallaxLayer/Sprite2D3"), PackedStringArray("Transform"), NodePath("level"), PackedStringArray("Transform"), NodePath("level/StaticBody2D"), PackedStringArray("Transform"), NodePath("AreaTrigger"), PackedStringArray("Transform"), NodePath("Coins/Area2D"), PackedStringArray("Transform"), NodePath("SlimeEnemy"), PackedStringArray("Transform")] resource_unfolds=["res://scenes/game.tscn::TileSet_47g5u", PackedStringArray("terrain_set_0/terrain__array", "physics_layer__array", "custom_data_layer__array"), "res://scenes/game.tscn::WorldBoundaryShape2D_3u4a8", PackedStringArray("Resource"), "res://scenes/game.tscn::CircleShape2D_x8qck", PackedStringArray("Resource")] -nodes_folded=[NodePath("GameController"), NodePath("ParallaxBackground"), NodePath("level"), NodePath("CharacterBody2D"), NodePath("AreaTrigger"), NodePath("crates"), NodePath("Platform"), NodePath("Coins")] +nodes_folded=[NodePath("GameController"), NodePath("ParallaxBackground"), NodePath("level"), NodePath("CharacterBody2D"), NodePath("AreaTrigger"), NodePath("crates"), NodePath("Coins")] diff --git a/.godot/editor/hud.tscn-editstate-38bf74ff262409a94a41206b2b776d33.cfg b/.godot/editor/hud.tscn-editstate-38bf74ff262409a94a41206b2b776d33.cfg index 22c3522..d26dbc7 100644 --- a/.godot/editor/hud.tscn-editstate-38bf74ff262409a94a41206b2b776d33.cfg +++ b/.godot/editor/hud.tscn-editstate-38bf74ff262409a94a41206b2b776d33.cfg @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/Game/Coins")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/CharacterBody2D")]) diff --git a/.godot/editor/platform.tscn-editstate-cc2f727180cd42d9c13434cb55b1ce69.cfg b/.godot/editor/platform.tscn-editstate-cc2f727180cd42d9c13434cb55b1ce69.cfg index c5530b6..24e3fa4 100644 --- a/.godot/editor/platform.tscn-editstate-cc2f727180cd42d9c13434cb55b1ce69.cfg +++ b/.godot/editor/platform.tscn-editstate-cc2f727180cd42d9c13434cb55b1ce69.cfg @@ -1,7 +1,7 @@ [editor_states] Anim={ -"visible": false +"visible": true } 2D={ "grid_offset": Vector2(0, 0), @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/Game/Coins")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/CharacterBody2D")]) diff --git a/.godot/editor/project_metadata.cfg b/.godot/editor/project_metadata.cfg index d31a6f3..5dcf220 100644 --- a/.godot/editor/project_metadata.cfg +++ b/.godot/editor/project_metadata.cfg @@ -14,8 +14,8 @@ run_debug_collisions=true [recent_files] -scenes=["res://scenes/character.tscn", "res://scenes/slimeEnemy.tscn", "res://scenes/hud.tscn", "res://scenes/coin.tscn", "res://scenes/platform.tscn", "res://scenes/crate.tscn", "res://scenes/bullet.tscn", "res://scenes/game.tscn", "res://scenes/enemy.tscn"] -scripts=["res://scripts/enemy.gd", "res://scripts/coin.gd", "res://scripts/Trigger.gd", "res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd"] +scenes=["res://scenes/game.tscn", "res://scenes/character.tscn", "res://scenes/slimeEnemy.tscn", "res://scenes/hud.tscn", "res://scenes/coin.tscn", "res://scenes/platform.tscn", "res://scenes/crate.tscn", "res://scenes/bullet.tscn", "res://scenes/enemy.tscn"] +scripts=["CharacterBody2D", "res://scripts/enemy.gd", "res://scripts/coin.gd", "res://scripts/Trigger.gd", "res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd"] [linked_properties] @@ -57,3 +57,7 @@ last_selected_language="GDScript" [project_settings] advanced_mode=true + +[scripts_panel] + +show_scripts_panel=false diff --git a/.godot/editor/script_editor_cache.cfg b/.godot/editor/script_editor_cache.cfg index 3964bf2..81ec781 100644 --- a/.godot/editor/script_editor_cache.cfg +++ b/.godot/editor/script_editor_cache.cfg @@ -5,7 +5,7 @@ state={ "breakpoints": PackedInt32Array(), "column": 0, "folded_lines": Array[int]([]), -"h_scroll_position": 13, +"h_scroll_position": 0, "row": 28, "scroll_position": 17.0, "selection": false, @@ -17,24 +17,10 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 8, +"column": 29, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 13, -"scroll_position": 0.0, -"selection": false, -"syntax_highlighter": "GDScript" -} - -[res://scripts/Trigger.gd] - -state={ -"bookmarks": PackedInt32Array(), -"breakpoints": PackedInt32Array(), -"column": 34, -"folded_lines": Array[int]([]), -"h_scroll_position": 0, -"row": 3, +"row": 12, "scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" @@ -63,7 +49,7 @@ state={ "folded_lines": Array[int]([]), "h_scroll_position": 0, "row": 32, -"scroll_position": 5.0, +"scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" } @@ -73,11 +59,25 @@ state={ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 0, +"column": 21, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 38, -"scroll_position": 80.0, +"row": 5, +"scroll_position": 0.0, +"selection": false, +"syntax_highlighter": "GDScript" +} + +[res://scripts/trigger.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 31, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 6, +"scroll_position": 0.0, "selection": false, "syntax_highlighter": "GDScript" } diff --git a/.godot/editor/slimeEnemy.tscn-editstate-7f960b0e063e7daa9b04ba3fda3f82d8.cfg b/.godot/editor/slimeEnemy.tscn-editstate-7f960b0e063e7daa9b04ba3fda3f82d8.cfg index 87c22c7..754917b 100644 --- a/.godot/editor/slimeEnemy.tscn-editstate-7f960b0e063e7daa9b04ba3fda3f82d8.cfg +++ b/.godot/editor/slimeEnemy.tscn-editstate-7f960b0e063e7daa9b04ba3fda3f82d8.cfg @@ -1,7 +1,7 @@ [editor_states] Anim={ -"visible": false +"visible": true } 2D={ "grid_offset": Vector2(0, 0), @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/Game/Coins")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17848/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9465/@VSplitContainer@9284/@HSplitContainer@9286/@HSplitContainer@9288/@Control@9289/@SubViewportContainer@9290/@SubViewport@9291/CharacterBody2D")]) diff --git a/.godot/editor/trigger.gd-folding-04c9d84a3d9ea9dd834ba38ef56cde2b.cfg b/.godot/editor/trigger.gd-folding-04c9d84a3d9ea9dd834ba38ef56cde2b.cfg new file mode 100644 index 0000000..762d715 --- /dev/null +++ b/.godot/editor/trigger.gd-folding-04c9d84a3d9ea9dd834ba38ef56cde2b.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray("Resource") diff --git a/scenes/character.tscn b/scenes/character.tscn index bdf9c7e..1f25605 100644 --- a/scenes/character.tscn +++ b/scenes/character.tscn @@ -249,7 +249,7 @@ animations = [{ [sub_resource type="CircleShape2D" id="CircleShape2D_ubfw4"] radius = 13.0384 -[node name="CharacterBody2D" type="CharacterBody2D"] +[node name="CharacterBody2D" type="CharacterBody2D" groups=["player", "sprite"]] position = Vector2(-1, 0) script = ExtResource("1_ymy68") JUMP_VELOCITY = -500.0 diff --git a/scenes/game.tscn b/scenes/game.tscn index b7c186b..61282a1 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -1,14 +1,13 @@ -[gd_scene load_steps=19 format=3 uid="uid://y083suj12rld"] +[gd_scene load_steps=15 format=3 uid="uid://y083suj12rld"] [ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_77wyw"] [ext_resource type="PackedScene" uid="uid://go4yc8hfo1gq" path="res://scenes/character.tscn" id="2_64ccm"] [ext_resource type="Texture2D" uid="uid://dwb83f7uoweuy" path="res://graphics/Terrain (32x32).png" id="2_l22q1"] -[ext_resource type="Script" path="res://scripts/Trigger.gd" id="2_nfj1w"] +[ext_resource type="Script" path="res://scripts/trigger.gd" id="2_nfj1w"] [ext_resource type="Texture2D" uid="uid://doodiicuxeb53" path="res://graphics/background/BG Image.png" id="3_1agog"] [ext_resource type="Texture2D" uid="uid://ry5bkalocmx5" path="res://graphics/background/Additional Sky.png" id="4_g10bt"] [ext_resource type="Texture2D" uid="uid://cl2dnusewe0ch" path="res://graphics/background/Additional Water.png" id="5_ax33h"] [ext_resource type="PackedScene" uid="uid://ukuu7p7vhlq" path="res://scenes/crate.tscn" id="5_u8rgi"] -[ext_resource type="PackedScene" uid="uid://c5w3e6gjovcvk" path="res://scenes/platform.tscn" id="6_0ewk8"] [ext_resource type="PackedScene" uid="uid://5vkisovypn7u" path="res://scenes/coin.tscn" id="10_vh708"] [ext_resource type="PackedScene" uid="uid://b07px1qf5obql" path="res://scenes/slimeEnemy.tscn" id="11_gnd6o"] @@ -487,43 +486,6 @@ sources/0 = SubResource("TileSetAtlasSource_xg6qs") [sub_resource type="CircleShape2D" id="CircleShape2D_x8qck"] radius = 60.2993 -[sub_resource type="Animation" id="Animation_spruu"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath(".:position") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector2(0, 0)] -} - -[sub_resource type="Animation" id="Animation_qecmg"] -resource_name = "move" -loop_mode = 2 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath(".:position") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 1), -"transitions": PackedFloat32Array(1, 1), -"update": 0, -"values": [Vector2(0, 0), Vector2(100, 0)] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_3nvvt"] -_data = { -"RESET": SubResource("Animation_spruu"), -"move": SubResource("Animation_qecmg") -} - [node name="Game" type="Node2D"] [node name="GameController" type="Node" parent="."] @@ -585,14 +547,6 @@ debug_color = Color(0.556863, 0.415686, 0.964706, 0.419608) [node name="crate1" parent="crates" instance=ExtResource("5_u8rgi")] position = Vector2(114, 30) -[node name="Platform" parent="." instance=ExtResource("6_0ewk8")] - -[node name="AnimationPlayer" type="AnimationPlayer" parent="Platform"] -libraries = { -"": SubResource("AnimationLibrary_3nvvt") -} -autoplay = "move" - [node name="BoxTrap" type="Node2D" parent="."] position = Vector2(273, -87) diff --git a/scenes/slimeEnemy.tscn b/scenes/slimeEnemy.tscn index 4a93cff..ef334af 100644 --- a/scenes/slimeEnemy.tscn +++ b/scenes/slimeEnemy.tscn @@ -42,7 +42,7 @@ animations = [{ [sub_resource type="RectangleShape2D" id="RectangleShape2D_5m2pq"] size = Vector2(14, 15) -[node name="SlimeEnemy" type="Area2D"] +[node name="SlimeEnemy" type="Area2D" groups=["sprite"]] script = ExtResource("1_c0t6u") metadata/_edit_group_ = true diff --git a/scripts/Trigger.gd b/scripts/Trigger.gd index c4937ea..cbdf00f 100644 --- a/scripts/Trigger.gd +++ b/scripts/Trigger.gd @@ -4,7 +4,5 @@ extends Area2D signal areatrigger(effect, Object) func _on_body_entered(body): - print("detected a body") - # Need to fix this part and see why it's not acknowledging the static body -# if body.get_collider() != StaticBody2D: -# areatrigger.emit(effect, body) + if body.is_in_group("sprite"): + areatrigger.emit(effect, body)