From 04d49fee670b1e2f7a7e151eba1a49e7ffa8c3f0 Mon Sep 17 00:00:00 2001 From: OddlyTimbot Date: Mon, 29 Jul 2024 21:05:41 -0400 Subject: [PATCH] box trap working --- ...state-6d8e6ff1e6f20a36e0402d27c623c86c.cfg | 2 +- ...state-b6bd7a241034177d7fe082a7597ba8ea.cfg | 2 +- ...state-65637dc57c83dac3d15ec1cb22439bd7.cfg | 2 +- .godot/editor/create_recent.Node | 6 +- .godot/editor/editor_layout.cfg | 12 +- .godot/editor/filesystem_cache8 | 19 +- .godot/editor/filesystem_update4 | 2 + ...state-c2a7af834e91ff64325daddf58e45dc0.cfg | 2 +- ...lding-c2a7af834e91ff64325daddf58e45dc0.cfg | 4 +- ...lding-f1f331c27a8a747c68def87f3a691aa7.cfg | 3 + ...state-cc2f727180cd42d9c13434cb55b1ce69.cfg | 175 +++++++++++++++++ ...lding-cc2f727180cd42d9c13434cb55b1ce69.cfg | 5 + .godot/editor/project_metadata.cfg | 7 +- .godot/editor/script_editor_cache.cfg | 20 +- ....png-4c444e886a83930bd4eef12f46edeb01.ctex | Bin 0 -> 92 bytes ...t.png-4c444e886a83930bd4eef12f46edeb01.md5 | 3 + ....png-789715c3cee1a1be196f2b6d1d974c62.ctex | Bin 0 -> 92 bytes ...t.png-789715c3cee1a1be196f2b6d1d974c62.md5 | 3 + .godot/uid_cache.bin | Bin 504 -> 614 bytes graphics/bullet.png | Bin 0 -> 200 bytes graphics/bullet.png.import | 34 ++++ scenes/bullet.tscn | 7 +- scenes/game.tscn | 177 +++++++++++++++++- scenes/platform.tscn | 10 + scripts/gamecontroller.gd | 17 +- 25 files changed, 480 insertions(+), 32 deletions(-) create mode 100644 .godot/editor/gamecontroller.gd-folding-f1f331c27a8a747c68def87f3a691aa7.cfg create mode 100644 .godot/editor/platform.tscn-editstate-cc2f727180cd42d9c13434cb55b1ce69.cfg create mode 100644 .godot/editor/platform.tscn-folding-cc2f727180cd42d9c13434cb55b1ce69.cfg create mode 100644 .godot/imported/bullet.png-4c444e886a83930bd4eef12f46edeb01.ctex create mode 100644 .godot/imported/bullet.png-4c444e886a83930bd4eef12f46edeb01.md5 create mode 100644 .godot/imported/bullet.png-789715c3cee1a1be196f2b6d1d974c62.ctex create mode 100644 .godot/imported/bullet.png-789715c3cee1a1be196f2b6d1d974c62.md5 create mode 100644 graphics/bullet.png create mode 100644 graphics/bullet.png.import create mode 100644 scenes/platform.tscn diff --git a/.godot/editor/bullet.tscn-editstate-6d8e6ff1e6f20a36e0402d27c623c86c.cfg b/.godot/editor/bullet.tscn-editstate-6d8e6ff1e6f20a36e0402d27c623c86c.cfg index e74f388..e03ba01 100644 --- a/.godot/editor/bullet.tscn-editstate-6d8e6ff1e6f20a36e0402d27c623c86c.cfg +++ b/.godot/editor/bullet.tscn-editstate-6d8e6ff1e6f20a36e0402d27c623c86c.cfg @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/TileMap")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/CharacterBody2D")]) diff --git a/.godot/editor/character.tscn-editstate-b6bd7a241034177d7fe082a7597ba8ea.cfg b/.godot/editor/character.tscn-editstate-b6bd7a241034177d7fe082a7597ba8ea.cfg index a856bc8..066d5d8 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@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/TileMap")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/CharacterBody2D")]) diff --git a/.godot/editor/crate.tscn-editstate-65637dc57c83dac3d15ec1cb22439bd7.cfg b/.godot/editor/crate.tscn-editstate-65637dc57c83dac3d15ec1cb22439bd7.cfg index 0ef8215..935376b 100644 --- a/.godot/editor/crate.tscn-editstate-65637dc57c83dac3d15ec1cb22439bd7.cfg +++ b/.godot/editor/crate.tscn-editstate-65637dc57c83dac3d15ec1cb22439bd7.cfg @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/TileMap")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/CharacterBody2D")]) diff --git a/.godot/editor/create_recent.Node b/.godot/editor/create_recent.Node index 7c950e1..a4c571f 100644 --- a/.godot/editor/create_recent.Node +++ b/.godot/editor/create_recent.Node @@ -1,9 +1,11 @@ +Node2D +AnimationPlayer +CollisionShape2D +AnimatableBody2D Sprite2D Camera2D TileMap Node AnimatedSprite2D -Node2D -CollisionShape2D Area2D RayCast2D diff --git a/.godot/editor/editor_layout.cfg b/.godot/editor/editor_layout.cfg index c2d791f..61d925e 100644 --- a/.godot/editor/editor_layout.cfg +++ b/.godot/editor/editor_layout.cfg @@ -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://scripts/bullet.gd") +dock_filesystem_selected_paths=PackedStringArray("res://scenes/platform.tscn") dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://", "res://scripts/", "res://scenes/", "res://graphics/", "res://graphics/items/") dock_3="Scene,Import" dock_4="FileSystem" @@ -27,17 +27,17 @@ 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") -current_scene="res://scenes/character.tscn" -center_split_offset=-252 +open_scenes=PackedStringArray("res://scenes/game.tscn", "res://scenes/character.tscn", "res://scenes/bullet.tscn", "res://scenes/crate.tscn", "res://scenes/platform.tscn") +current_scene="res://scenes/game.tscn" +center_split_offset=-329 selected_default_debugger_tab_idx=0 selected_main_editor_idx=2 selected_bottom_panel_item=0 [ScriptEditor] -open_scripts=["res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd"] -selected_script="res://scripts/CharacterBody2D.gd" +open_scripts=["res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd", "res://scripts/Trigger.gd"] +selected_script="res://scripts/gamecontroller.gd" open_help=[] script_split_offset=70 list_split_offset=0 diff --git a/.godot/editor/filesystem_cache8 b/.godot/editor/filesystem_cache8 index 9831197..3b28b40 100644 --- a/.godot/editor/filesystem_cache8 +++ b/.godot/editor/filesystem_cache8 @@ -1,7 +1,8 @@ ea4bc82a6ad023ab7ee23ee620429895 -::res://::1722291872 +::res://::1722297822 icon.svg::CompressedTexture2D::9114977118871582245::1722289482::1722289482::1::::<><>:: -::res://graphics/::1722289482 +::res://graphics/::1722297822 +bullet.png::CompressedTexture2D::4834894094516681527::1722297811::1722297822::1::::<><>:: Terrain (32x32).png::CompressedTexture2D::8707534964839485024::1722289482::1722289482::1::::<><>:: ::res://graphics/items/::1722289482 cannister.png::CompressedTexture2D::7418095402531000042::1722289482::1722289482::1::::<><>:: @@ -13,13 +14,13 @@ player jump 48x48.png::CompressedTexture2D::1627608568707791839::1722289482::172 player land 48x48.png::CompressedTexture2D::3499637713582873633::1722289482::1722289482::1::::<><>:: ::res://graphics/Player Run/::1722289482 player run 48x48.png::CompressedTexture2D::1502492849971408816::1722289482::1722289482::1::::<><>:: -::res://scenes/::1722289482 -bullet.tscn::PackedScene::6880909734590904373::1722289482::0::1::::<><>::res://scripts/bullet.gd -character.tscn::PackedScene::451838158579532324::1722289482::0::1::::<><>::res://scripts/CharacterBody2D.gd<>uid://c0iiaebonyhh0::::res://graphics/Player Idle/Player Idle 48x48.png<>uid://xgoqfqmvorcx::::res://graphics/Player Jump/player jump 48x48.png<>uid://vn23qn3f0dvc::::res://graphics/Player Run/player run 48x48.png -crate.tscn::PackedScene::41931541512830250::1722289482::0::1::::<><>::uid://ddxm7hj323fta::::res://graphics/items/cannister.png -game.tscn::PackedScene::1738196330916037717::1722289482::0::1::::<><>::res://scripts/gamecontroller.gd<>uid://go4yc8hfo1gq::::res://scenes/character.tscn<>uid://dwb83f7uoweuy::::res://graphics/Terrain (32x32).png<>res://scripts/Trigger.gd<>uid://ukuu7p7vhlq::::res://scenes/crate.tscn -::res://scripts/::1722289482 +::res://scenes/::1722297822 +bullet.tscn::PackedScene::6880909734590904373::1722297251::0::1::::<><>::res://scripts/bullet.gd +character.tscn::PackedScene::451838158579532324::1722297251::0::1::::<><>::res://scripts/CharacterBody2D.gd<>uid://c0iiaebonyhh0::::res://graphics/Player Idle/Player Idle 48x48.png<>uid://xgoqfqmvorcx::::res://graphics/Player Jump/player jump 48x48.png<>uid://vn23qn3f0dvc::::res://graphics/Player Run/player run 48x48.png +crate.tscn::PackedScene::41931541512830250::1722297251::0::1::::<><>::uid://ddxm7hj323fta::::res://graphics/items/cannister.png +game.tscn::PackedScene::1738196330916037717::1722297251::0::1::::<><>::res://scripts/gamecontroller.gd<>uid://go4yc8hfo1gq::::res://scenes/character.tscn<>uid://dwb83f7uoweuy::::res://graphics/Terrain (32x32).png<>res://scripts/Trigger.gd<>uid://ukuu7p7vhlq::::res://scenes/crate.tscn +::res://scripts/::1722293648 bullet.gd::GDScript::-1::1722289482::0::1::::<>Area2D<>:: -CharacterBody2D.gd::GDScript::-1::1722289482::0::1::::<>CharacterBody2D<>:: +CharacterBody2D.gd::GDScript::-1::1722293648::0::1::::<>CharacterBody2D<>:: gamecontroller.gd::GDScript::-1::1722289482::0::1::::<>Node2D<>:: Trigger.gd::GDScript::-1::1722289482::0::1::::<>Area2D<>:: diff --git a/.godot/editor/filesystem_update4 b/.godot/editor/filesystem_update4 index ee89cef..f13a72f 100644 --- a/.godot/editor/filesystem_update4 +++ b/.godot/editor/filesystem_update4 @@ -3,3 +3,5 @@ res://scenes/character.tscn res://scenes/bullet.tscn res://scenes/crate.tscn res://scripts/CharacterBody2D.gd +res://scenes/platform.tscn +res://scripts/gamecontroller.gd diff --git a/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg b/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg index d2be8d3..88668ae 100644 --- a/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg +++ b/.godot/editor/game.tscn-editstate-c2a7af834e91ff64325daddf58e45dc0.cfg @@ -172,4 +172,4 @@ Anim={ "zfar": 4000.01, "znear": 0.05 } -selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/TileMap")]) +selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/CharacterBody2D")]) diff --git a/.godot/editor/game.tscn-folding-c2a7af834e91ff64325daddf58e45dc0.cfg b/.godot/editor/game.tscn-folding-c2a7af834e91ff64325daddf58e45dc0.cfg index efbfcbc..9fcb061 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"), NodePath("level"), PackedStringArray("Transform"), NodePath("level/StaticBody2D"), PackedStringArray("Transform"), NodePath("AreaTrigger"), PackedStringArray("Transform")] -resource_unfolds=["res://scenes/game.tscn::TileSet_47g5u", PackedStringArray("terrain_set__array", "terrain_set_0/terrain__array"), "res://scenes/game.tscn::WorldBoundaryShape2D_3u4a8", PackedStringArray("Resource"), "res://scenes/game.tscn::CircleShape2D_x8qck", PackedStringArray("Resource")] +node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("TileMap"), PackedStringArray("tile_set"), NodePath("level"), PackedStringArray("Transform"), NodePath("level/StaticBody2D"), PackedStringArray("Transform"), NodePath("AreaTrigger"), PackedStringArray("Transform"), NodePath("Platform"), PackedStringArray("Transform")] +resource_unfolds=["res://scenes/game.tscn::TileSet_47g5u", PackedStringArray("terrain_set_0/terrain__array", "physics_layer__array"), "res://scenes/game.tscn::WorldBoundaryShape2D_3u4a8", PackedStringArray("Resource"), "res://scenes/game.tscn::CircleShape2D_x8qck", PackedStringArray("Resource")] nodes_folded=[NodePath("AreaTrigger")] diff --git a/.godot/editor/gamecontroller.gd-folding-f1f331c27a8a747c68def87f3a691aa7.cfg b/.godot/editor/gamecontroller.gd-folding-f1f331c27a8a747c68def87f3a691aa7.cfg new file mode 100644 index 0000000..e860dd4 --- /dev/null +++ b/.godot/editor/gamecontroller.gd-folding-f1f331c27a8a747c68def87f3a691aa7.cfg @@ -0,0 +1,3 @@ +[folding] + +sections_unfolded=PackedStringArray() diff --git a/.godot/editor/platform.tscn-editstate-cc2f727180cd42d9c13434cb55b1ce69.cfg b/.godot/editor/platform.tscn-editstate-cc2f727180cd42d9c13434cb55b1ce69.cfg new file mode 100644 index 0000000..eff236d --- /dev/null +++ b/.godot/editor/platform.tscn-editstate-cc2f727180cd42d9c13434cb55b1ce69.cfg @@ -0,0 +1,175 @@ +[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(-186.399, -149.806), +"primary_grid_step": Vector2i(8, 8), +"show_edit_locks": true, +"show_guides": true, +"show_helpers": false, +"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": 1.25992 +} +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, +"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@17140/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/Game/CharacterBody2D")]) diff --git a/.godot/editor/platform.tscn-folding-cc2f727180cd42d9c13434cb55b1ce69.cfg b/.godot/editor/platform.tscn-folding-cc2f727180cd42d9c13434cb55b1ce69.cfg new file mode 100644 index 0000000..ba18fde --- /dev/null +++ b/.godot/editor/platform.tscn-folding-cc2f727180cd42d9c13434cb55b1ce69.cfg @@ -0,0 +1,5 @@ +[folding] + +node_unfolds=[] +resource_unfolds=["res://scenes/platform.tscn::RectangleShape2D_l2jtx", PackedStringArray()] +nodes_folded=[] diff --git a/.godot/editor/project_metadata.cfg b/.godot/editor/project_metadata.cfg index 8b55ec3..c3a9afd 100644 --- a/.godot/editor/project_metadata.cfg +++ b/.godot/editor/project_metadata.cfg @@ -3,6 +3,8 @@ executable_path="/home/timbot/Documents/Software/godot/Godot_v4.2.1-stable_linux.x86_64" use_advanced_connections=false tile_source_sort=0 +tile_snap_option=0 +tile_snap_subdiv=4.0 [debug_options] @@ -12,8 +14,8 @@ run_debug_collisions=true [recent_files] -scenes=["res://scenes/crate.tscn", "res://scenes/bullet.tscn", "res://scenes/character.tscn", "res://scenes/game.tscn"] -scripts=["res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd"] +scenes=["res://scenes/platform.tscn", "res://scenes/crate.tscn", "res://scenes/bullet.tscn", "res://scenes/character.tscn", "res://scenes/game.tscn"] +scripts=["res://scripts/Trigger.gd", "res://scripts/bullet.gd", "res://scripts/CharacterBody2D.gd", "res://scripts/gamecontroller.gd"] [linked_properties] @@ -30,6 +32,7 @@ TileMap:scale=true Camera2D:zoom=true Camera2D:scale=true Sprite2D:scale=true +AnimatableBody2D:scale=true [dialog_bounds] diff --git a/.godot/editor/script_editor_cache.cfg b/.godot/editor/script_editor_cache.cfg index b349d25..b7285ec 100644 --- a/.godot/editor/script_editor_cache.cfg +++ b/.godot/editor/script_editor_cache.cfg @@ -3,11 +3,11 @@ state={ "bookmarks": PackedInt32Array(), "breakpoints": PackedInt32Array(), -"column": 0, +"column": 37, "folded_lines": Array[int]([]), "h_scroll_position": 0, -"row": 12, -"scroll_position": 0.0, +"row": 25, +"scroll_position": 12.0, "selection": false, "syntax_highlighter": "GDScript" } @@ -39,3 +39,17 @@ state={ "selection": false, "syntax_highlighter": "GDScript" } + +[res://scripts/Trigger.gd] + +state={ +"bookmarks": PackedInt32Array(), +"breakpoints": PackedInt32Array(), +"column": 28, +"folded_lines": Array[int]([]), +"h_scroll_position": 0, +"row": 5, +"scroll_position": 0.0, +"selection": false, +"syntax_highlighter": "GDScript" +} diff --git a/.godot/imported/bullet.png-4c444e886a83930bd4eef12f46edeb01.ctex b/.godot/imported/bullet.png-4c444e886a83930bd4eef12f46edeb01.ctex new file mode 100644 index 0000000000000000000000000000000000000000..80c79ffc0ebbb35017e90dbfb49a63224a8f90ec GIT binary patch literal 92 zcmZ<{4l!b6U|>*%Vj#u)9|(Xn954Y{s$dli46H!53J?c*y1B^!>2O!4fUp1y9|0g+ VUxk5Ffc?Vz7v+r1f*1cY002Eo4+{VQ literal 0 HcmV?d00001 diff --git a/.godot/imported/bullet.png-4c444e886a83930bd4eef12f46edeb01.md5 b/.godot/imported/bullet.png-4c444e886a83930bd4eef12f46edeb01.md5 new file mode 100644 index 0000000..03e9e13 --- /dev/null +++ b/.godot/imported/bullet.png-4c444e886a83930bd4eef12f46edeb01.md5 @@ -0,0 +1,3 @@ +source_md5="eadffe78a07b73548ad96160feed8442" +dest_md5="dac4452d7a2fbacc4a60e220e86f0cbe" + diff --git a/.godot/imported/bullet.png-789715c3cee1a1be196f2b6d1d974c62.ctex b/.godot/imported/bullet.png-789715c3cee1a1be196f2b6d1d974c62.ctex new file mode 100644 index 0000000000000000000000000000000000000000..80c79ffc0ebbb35017e90dbfb49a63224a8f90ec GIT binary patch literal 92 zcmZ<{4l!b6U|>*%Vj#u)9|(Xn954Y{s$dli46H!53J?c*y1B^!>2O!4fUp1y9|0g+ VUxk5Ffc?Vz7v+r1f*1cY002Eo4+{VQ literal 0 HcmV?d00001 diff --git a/.godot/imported/bullet.png-789715c3cee1a1be196f2b6d1d974c62.md5 b/.godot/imported/bullet.png-789715c3cee1a1be196f2b6d1d974c62.md5 new file mode 100644 index 0000000..03e9e13 --- /dev/null +++ b/.godot/imported/bullet.png-789715c3cee1a1be196f2b6d1d974c62.md5 @@ -0,0 +1,3 @@ +source_md5="eadffe78a07b73548ad96160feed8442" +dest_md5="dac4452d7a2fbacc4a60e220e86f0cbe" + diff --git a/.godot/uid_cache.bin b/.godot/uid_cache.bin index 94fa2a484b56d9eaa4471389f418a5d61c869e8c..26664fcb3b0dcf2dd45fb2eec477401f917df4f3 100644 GIT binary patch delta 121 zcmeyt{EUT>ZzJP(#ys=iK5P^INjQr$FfbIQ7F+4-7bmCYr55WamFDE6mgp7arNfj+ q!j+^KB^G34CL=47J^jV>$jsATQgB63a|&`2OVaX-a`j4zlk)&88Y_DM delta 10 RcmaFH@`IU?dn4m_MgSG^1DpT= diff --git a/graphics/bullet.png b/graphics/bullet.png new file mode 100644 index 0000000000000000000000000000000000000000..b66c56295a65620f1dbb05a6cd6c3b1d5426f2b0 GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^svyk41|*NpQ(y*CEX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1TCJzX3_ zB3j>`Gh{rVz;M7|M$w!kR%Yu@2QO-zkf~n(amM?y2mYF&UQ>gXhG3_@ro3XPP-E(N TW1l<&Xdr{9tDnm{r-UW|*dskl literal 0 HcmV?d00001 diff --git a/graphics/bullet.png.import b/graphics/bullet.png.import new file mode 100644 index 0000000..d311550 --- /dev/null +++ b/graphics/bullet.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ca5b88ipe5ks2" +path="res://.godot/imported/bullet.png-4c444e886a83930bd4eef12f46edeb01.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/bullet.png" +dest_files=["res://.godot/imported/bullet.png-4c444e886a83930bd4eef12f46edeb01.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/scenes/bullet.tscn b/scenes/bullet.tscn index d058be7..18c2d19 100644 --- a/scenes/bullet.tscn +++ b/scenes/bullet.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=3 format=3 uid="uid://c5bftwgkssaf2"] +[gd_scene load_steps=4 format=3 uid="uid://c5bftwgkssaf2"] [ext_resource type="Script" path="res://scripts/bullet.gd" id="1_t2eet"] +[ext_resource type="Texture2D" uid="uid://ca5b88ipe5ks2" path="res://graphics/bullet.png" id="2_7rmg4"] [sub_resource type="CircleShape2D" id="CircleShape2D_1gtqp"] radius = 6.0 @@ -12,4 +13,8 @@ script = ExtResource("1_t2eet") shape = SubResource("CircleShape2D_1gtqp") debug_color = Color(0.721569, 0.337255, 0.854902, 0.419608) +[node name="Sprite2D" type="Sprite2D" parent="."] +scale = Vector2(0.27027, 0.324324) +texture = ExtResource("2_7rmg4") + [connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/scenes/game.tscn b/scenes/game.tscn index 207bd0b..1f71c87 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=10 format=3 uid="uid://y083suj12rld"] +[gd_scene load_steps=14 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="PackedScene" uid="uid://ukuu7p7vhlq" path="res://scenes/crate.tscn" id="5_u8rgi"] +[ext_resource type="PackedScene" uid="uid://ci10o5e0xpxm8" path="res://scenes/platform.tscn" id="6_80wa1"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_xg6qs"] texture = ExtResource("2_l22q1") @@ -12,12 +13,18 @@ texture_region_size = Vector2i(32, 32) 0:0/0 = 0 0:0/0/terrain_set = 0 0:0/0/terrain = 0 +0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:0/0/physics_layer_0/angular_velocity = 0.0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 0:0/0/terrains_peering_bit/right_side = 0 0:0/0/terrains_peering_bit/bottom_right_corner = 0 0:0/0/terrains_peering_bit/bottom_side = 0 1:0/0 = 0 1:0/0/terrain_set = 0 1:0/0/terrain = 0 +1:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:0/0/physics_layer_0/angular_velocity = 0.0 +1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 1:0/0/terrains_peering_bit/right_side = 0 1:0/0/terrains_peering_bit/bottom_right_corner = 0 1:0/0/terrains_peering_bit/bottom_side = 0 @@ -26,16 +33,24 @@ texture_region_size = Vector2i(32, 32) 2:0/0 = 0 2:0/0/terrain_set = 0 2:0/0/terrain = 0 +2:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:0/0/physics_layer_0/angular_velocity = 0.0 +2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 2:0/0/terrains_peering_bit/bottom_side = 0 2:0/0/terrains_peering_bit/bottom_left_corner = 0 2:0/0/terrains_peering_bit/left_side = 0 4:0/0 = 0 4:0/0/terrain_set = 0 4:0/0/terrain = 0 +4:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:0/0/physics_layer_0/angular_velocity = 0.0 +4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 4:0/0/terrains_peering_bit/bottom_side = 0 6:0/0 = 0 6:0/0/terrain_set = 0 6:0/0/terrain = 0 +6:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:0/0/physics_layer_0/angular_velocity = 0.0 6:0/0/terrains_peering_bit/right_side = 0 6:0/0/terrains_peering_bit/bottom_side = 0 6:0/0/terrains_peering_bit/bottom_left_corner = 0 @@ -46,6 +61,8 @@ texture_region_size = Vector2i(32, 32) 7:0/0 = 0 7:0/0/terrain_set = 0 7:0/0/terrain = 0 +7:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:0/0/physics_layer_0/angular_velocity = 0.0 7:0/0/terrains_peering_bit/right_side = 0 7:0/0/terrains_peering_bit/bottom_right_corner = 0 7:0/0/terrains_peering_bit/bottom_side = 0 @@ -56,6 +73,8 @@ texture_region_size = Vector2i(32, 32) 9:0/0 = 0 9:0/0/terrain_set = 0 9:0/0/terrain = 0 +9:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:0/0/physics_layer_0/angular_velocity = 0.0 9:0/0/terrains_peering_bit/bottom_right_corner = 0 9:0/0/terrains_peering_bit/bottom_side = 0 9:0/0/terrains_peering_bit/bottom_left_corner = 0 @@ -63,6 +82,8 @@ texture_region_size = Vector2i(32, 32) 10:0/0 = 0 10:0/0/terrain_set = 0 10:0/0/terrain = 0 +10:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:0/0/physics_layer_0/angular_velocity = 0.0 10:0/0/terrains_peering_bit/right_side = 0 10:0/0/terrains_peering_bit/bottom_side = 0 10:0/0/terrains_peering_bit/bottom_left_corner = 0 @@ -72,6 +93,8 @@ texture_region_size = Vector2i(32, 32) 12:0/0 = 0 12:0/0/terrain_set = 0 12:0/0/terrain = 0 +12:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:0/0/physics_layer_0/angular_velocity = 0.0 12:0/0/terrains_peering_bit/right_side = 0 12:0/0/terrains_peering_bit/bottom_right_corner = 0 12:0/0/terrains_peering_bit/bottom_side = 0 @@ -80,6 +103,8 @@ texture_region_size = Vector2i(32, 32) 13:0/0 = 0 13:0/0/terrain_set = 0 13:0/0/terrain = 0 +13:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:0/0/physics_layer_0/angular_velocity = 0.0 13:0/0/terrains_peering_bit/right_side = 0 13:0/0/terrains_peering_bit/bottom_side = 0 13:0/0/terrains_peering_bit/bottom_left_corner = 0 @@ -88,6 +113,8 @@ texture_region_size = Vector2i(32, 32) 15:0/0 = 0 15:0/0/terrain_set = 0 15:0/0/terrain = 0 +15:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:0/0/physics_layer_0/angular_velocity = 0.0 15:0/0/terrains_peering_bit/right_side = 0 15:0/0/terrains_peering_bit/bottom_side = 0 15:0/0/terrains_peering_bit/left_side = 0 @@ -95,6 +122,9 @@ texture_region_size = Vector2i(32, 32) 0:1/0 = 0 0:1/0/terrain_set = 0 0:1/0/terrain = 0 +0:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:1/0/physics_layer_0/angular_velocity = 0.0 +0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 0:1/0/terrains_peering_bit/right_side = 0 0:1/0/terrains_peering_bit/bottom_right_corner = 0 0:1/0/terrains_peering_bit/bottom_side = 0 @@ -103,6 +133,8 @@ texture_region_size = Vector2i(32, 32) 1:1/0 = 0 1:1/0/terrain_set = 0 1:1/0/terrain = 0 +1:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:1/0/physics_layer_0/angular_velocity = 0.0 1:1/0/terrains_peering_bit/right_side = 0 1:1/0/terrains_peering_bit/bottom_right_corner = 0 1:1/0/terrains_peering_bit/bottom_side = 0 @@ -114,6 +146,9 @@ texture_region_size = Vector2i(32, 32) 2:1/0 = 0 2:1/0/terrain_set = 0 2:1/0/terrain = 0 +2:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:1/0/physics_layer_0/angular_velocity = 0.0 +2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 2:1/0/terrains_peering_bit/bottom_side = 0 2:1/0/terrains_peering_bit/bottom_left_corner = 0 2:1/0/terrains_peering_bit/left_side = 0 @@ -122,11 +157,16 @@ texture_region_size = Vector2i(32, 32) 4:1/0 = 0 4:1/0/terrain_set = 0 4:1/0/terrain = 0 +4:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:1/0/physics_layer_0/angular_velocity = 0.0 +4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 4:1/0/terrains_peering_bit/bottom_side = 0 4:1/0/terrains_peering_bit/top_side = 0 6:1/0 = 0 6:1/0/terrain_set = 0 6:1/0/terrain = 0 +6:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:1/0/physics_layer_0/angular_velocity = 0.0 6:1/0/terrains_peering_bit/right_side = 0 6:1/0/terrains_peering_bit/bottom_right_corner = 0 6:1/0/terrains_peering_bit/bottom_side = 0 @@ -137,6 +177,8 @@ texture_region_size = Vector2i(32, 32) 7:1/0 = 0 7:1/0/terrain_set = 0 7:1/0/terrain = 0 +7:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:1/0/physics_layer_0/angular_velocity = 0.0 7:1/0/terrains_peering_bit/right_side = 0 7:1/0/terrains_peering_bit/bottom_right_corner = 0 7:1/0/terrains_peering_bit/bottom_side = 0 @@ -147,6 +189,8 @@ texture_region_size = Vector2i(32, 32) 9:1/0 = 0 9:1/0/terrain_set = 0 9:1/0/terrain = 0 +9:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:1/0/physics_layer_0/angular_velocity = 0.0 9:1/0/terrains_peering_bit/right_side = 0 9:1/0/terrains_peering_bit/bottom_right_corner = 0 9:1/0/terrains_peering_bit/bottom_side = 0 @@ -156,6 +200,8 @@ texture_region_size = Vector2i(32, 32) 10:1/0 = 0 10:1/0/terrain_set = 0 10:1/0/terrain = 0 +10:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:1/0/physics_layer_0/angular_velocity = 0.0 10:1/0/terrains_peering_bit/right_side = 0 10:1/0/terrains_peering_bit/bottom_side = 0 10:1/0/terrains_peering_bit/left_side = 0 @@ -165,6 +211,8 @@ texture_region_size = Vector2i(32, 32) 12:1/0 = 0 12:1/0/terrain_set = 0 12:1/0/terrain = 0 +12:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:1/0/physics_layer_0/angular_velocity = 0.0 12:1/0/terrains_peering_bit/right_side = 0 12:1/0/terrains_peering_bit/bottom_side = 0 12:1/0/terrains_peering_bit/left_side = 0 @@ -173,6 +221,8 @@ texture_region_size = Vector2i(32, 32) 13:1/0 = 0 13:1/0/terrain_set = 0 13:1/0/terrain = 0 +13:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:1/0/physics_layer_0/angular_velocity = 0.0 13:1/0/terrains_peering_bit/right_side = 0 13:1/0/terrains_peering_bit/bottom_side = 0 13:1/0/terrains_peering_bit/left_side = 0 @@ -181,6 +231,8 @@ texture_region_size = Vector2i(32, 32) 15:1/0 = 0 15:1/0/terrain_set = 0 15:1/0/terrain = 0 +15:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:1/0/physics_layer_0/angular_velocity = 0.0 15:1/0/terrains_peering_bit/right_side = 0 15:1/0/terrains_peering_bit/bottom_side = 0 15:1/0/terrains_peering_bit/bottom_left_corner = 0 @@ -189,6 +241,8 @@ texture_region_size = Vector2i(32, 32) 16:1/0 = 0 16:1/0/terrain_set = 0 16:1/0/terrain = 0 +16:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) +16:1/0/physics_layer_0/angular_velocity = 0.0 16:1/0/terrains_peering_bit/right_side = 0 16:1/0/terrains_peering_bit/bottom_right_corner = 0 16:1/0/terrains_peering_bit/bottom_side = 0 @@ -198,12 +252,18 @@ texture_region_size = Vector2i(32, 32) 0:2/0 = 0 0:2/0/terrain_set = 0 0:2/0/terrain = 0 +0:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:2/0/physics_layer_0/angular_velocity = 0.0 +0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 0:2/0/terrains_peering_bit/right_side = 0 0:2/0/terrains_peering_bit/top_side = 0 0:2/0/terrains_peering_bit/top_right_corner = 0 1:2/0 = 0 1:2/0/terrain_set = 0 1:2/0/terrain = 0 +1:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:2/0/physics_layer_0/angular_velocity = 0.0 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 1:2/0/terrains_peering_bit/right_side = 0 1:2/0/terrains_peering_bit/left_side = 0 1:2/0/terrains_peering_bit/top_left_corner = 0 @@ -212,16 +272,25 @@ texture_region_size = Vector2i(32, 32) 2:2/0 = 0 2:2/0/terrain_set = 0 2:2/0/terrain = 0 +2:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:2/0/physics_layer_0/angular_velocity = 0.0 +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 2:2/0/terrains_peering_bit/left_side = 0 2:2/0/terrains_peering_bit/top_left_corner = 0 2:2/0/terrains_peering_bit/top_side = 0 4:2/0 = 0 4:2/0/terrain_set = 0 4:2/0/terrain = 0 +4:2/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:2/0/physics_layer_0/angular_velocity = 0.0 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 4:2/0/terrains_peering_bit/top_side = 0 6:3/0 = 0 6:3/0/terrain_set = 0 6:3/0/terrain = 0 +6:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:3/0/physics_layer_0/angular_velocity = 0.0 +6:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 6:3/0/terrains_peering_bit/right_side = 0 6:3/0/terrains_peering_bit/bottom_right_corner = 0 6:3/0/terrains_peering_bit/bottom_side = 0 @@ -230,6 +299,9 @@ texture_region_size = Vector2i(32, 32) 7:3/0 = 0 7:3/0/terrain_set = 0 7:3/0/terrain = 0 +7:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:3/0/physics_layer_0/angular_velocity = 0.0 +7:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 7:3/0/terrains_peering_bit/bottom_side = 0 7:3/0/terrains_peering_bit/bottom_left_corner = 0 7:3/0/terrains_peering_bit/left_side = 0 @@ -238,6 +310,9 @@ texture_region_size = Vector2i(32, 32) 9:3/0 = 0 9:3/0/terrain_set = 0 9:3/0/terrain = 0 +9:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:3/0/physics_layer_0/angular_velocity = 0.0 +9:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 9:3/0/terrains_peering_bit/right_side = 0 9:3/0/terrains_peering_bit/bottom_right_corner = 0 9:3/0/terrains_peering_bit/bottom_side = 0 @@ -246,6 +321,9 @@ texture_region_size = Vector2i(32, 32) 10:3/0 = 0 10:3/0/terrain_set = 0 10:3/0/terrain = 0 +10:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:3/0/physics_layer_0/angular_velocity = 0.0 +10:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 10:3/0/terrains_peering_bit/right_side = 0 10:3/0/terrains_peering_bit/bottom_right_corner = 0 10:3/0/terrains_peering_bit/bottom_side = 0 @@ -254,44 +332,71 @@ texture_region_size = Vector2i(32, 32) 12:3/0 = 0 12:3/0/terrain_set = 0 12:3/0/terrain = 0 +12:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:3/0/physics_layer_0/angular_velocity = 0.0 +12:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 12:3/0/terrains_peering_bit/right_side = 0 12:3/0/terrains_peering_bit/bottom_side = 0 12:3/0/terrains_peering_bit/top_side = 0 13:3/0 = 0 13:3/0/terrain_set = 0 13:3/0/terrain = 0 +13:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:3/0/physics_layer_0/angular_velocity = 0.0 +13:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 13:3/0/terrains_peering_bit/right_side = 0 13:3/0/terrains_peering_bit/bottom_side = 0 13:3/0/terrains_peering_bit/left_side = 0 15:3/0 = 0 15:3/0/terrain_set = 0 15:3/0/terrain = 0 +15:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:3/0/physics_layer_0/angular_velocity = 0.0 +15:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 15:3/0/terrains_peering_bit/right_side = 0 15:3/0/terrains_peering_bit/bottom_side = 0 16:3/0 = 0 16:3/0/terrain_set = 0 16:3/0/terrain = 0 +16:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) +16:3/0/physics_layer_0/angular_velocity = 0.0 +16:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 16:3/0/terrains_peering_bit/bottom_side = 0 16:3/0/terrains_peering_bit/left_side = 0 0:4/0 = 0 0:4/0/terrain_set = 0 0:4/0/terrain = 0 +0:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:4/0/physics_layer_0/angular_velocity = 0.0 +0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 0:4/0/terrains_peering_bit/right_side = 0 1:4/0 = 0 1:4/0/terrain_set = 0 1:4/0/terrain = 0 +1:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:4/0/physics_layer_0/angular_velocity = 0.0 +1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 1:4/0/terrains_peering_bit/right_side = 0 1:4/0/terrains_peering_bit/left_side = 0 2:4/0 = 0 2:4/0/terrain_set = 0 2:4/0/terrain = 0 +2:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +2:4/0/physics_layer_0/angular_velocity = 0.0 +2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 2:4/0/terrains_peering_bit/left_side = 0 4:4/0 = 0 4:4/0/terrain_set = 0 4:4/0/terrain = 0 +4:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +4:4/0/physics_layer_0/angular_velocity = 0.0 +4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 6:4/0 = 0 6:4/0/terrain_set = 0 6:4/0/terrain = 0 +6:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +6:4/0/physics_layer_0/angular_velocity = 0.0 +6:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 6:4/0/terrains_peering_bit/right_side = 0 6:4/0/terrains_peering_bit/bottom_right_corner = 0 6:4/0/terrains_peering_bit/bottom_side = 0 @@ -300,6 +405,9 @@ texture_region_size = Vector2i(32, 32) 7:4/0 = 0 7:4/0/terrain_set = 0 7:4/0/terrain = 0 +7:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +7:4/0/physics_layer_0/angular_velocity = 0.0 +7:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 7:4/0/terrains_peering_bit/bottom_side = 0 7:4/0/terrains_peering_bit/bottom_left_corner = 0 7:4/0/terrains_peering_bit/left_side = 0 @@ -308,6 +416,9 @@ texture_region_size = Vector2i(32, 32) 9:4/0 = 0 9:4/0/terrain_set = 0 9:4/0/terrain = 0 +9:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +9:4/0/physics_layer_0/angular_velocity = 0.0 +9:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 9:4/0/terrains_peering_bit/right_side = 0 9:4/0/terrains_peering_bit/left_side = 0 9:4/0/terrains_peering_bit/top_left_corner = 0 @@ -316,6 +427,9 @@ texture_region_size = Vector2i(32, 32) 10:4/0 = 0 10:4/0/terrain_set = 0 10:4/0/terrain = 0 +10:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +10:4/0/physics_layer_0/angular_velocity = 0.0 +10:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 10:4/0/terrains_peering_bit/right_side = 0 10:4/0/terrains_peering_bit/left_side = 0 10:4/0/terrains_peering_bit/top_left_corner = 0 @@ -324,28 +438,41 @@ texture_region_size = Vector2i(32, 32) 12:4/0 = 0 12:4/0/terrain_set = 0 12:4/0/terrain = 0 +12:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +12:4/0/physics_layer_0/angular_velocity = 0.0 +12:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 12:4/0/terrains_peering_bit/right_side = 0 12:4/0/terrains_peering_bit/left_side = 0 12:4/0/terrains_peering_bit/top_side = 0 13:4/0 = 0 13:4/0/terrain_set = 0 13:4/0/terrain = 0 +13:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +13:4/0/physics_layer_0/angular_velocity = 0.0 +13:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 13:4/0/terrains_peering_bit/bottom_side = 0 13:4/0/terrains_peering_bit/left_side = 0 13:4/0/terrains_peering_bit/top_side = 0 15:4/0 = 0 15:4/0/terrain_set = 0 15:4/0/terrain = 0 +15:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +15:4/0/physics_layer_0/angular_velocity = 0.0 +15:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 15:4/0/terrains_peering_bit/right_side = 0 15:4/0/terrains_peering_bit/top_side = 0 16:4/0 = 0 16:4/0/terrain_set = 0 16:4/0/terrain = 0 +16:4/0/physics_layer_0/linear_velocity = Vector2(0, 0) +16:4/0/physics_layer_0/angular_velocity = 0.0 +16:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) 16:4/0/terrains_peering_bit/left_side = 0 16:4/0/terrains_peering_bit/top_side = 0 [sub_resource type="TileSet" id="TileSet_47g5u"] tile_size = Vector2i(32, 32) +physics_layer_0/collision_layer = 1 terrain_set_0/mode = 0 terrain_set_0/terrain_0/name = "ground" terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1) @@ -356,6 +483,43 @@ sources/0 = SubResource("TileSetAtlasSource_xg6qs") [sub_resource type="CircleShape2D" id="CircleShape2D_x8qck"] radius = 60.2993 +[sub_resource type="Animation" id="Animation_n7r3j"] +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(51, 0)] +} + +[sub_resource type="Animation" id="Animation_t7ite"] +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="AnimationLibrary" id="AnimationLibrary_dcgrv"] +_data = { +"RESET": SubResource("Animation_t7ite"), +"move": SubResource("Animation_n7r3j") +} + [node name="Game" type="Node2D"] script = ExtResource("1_77wyw") @@ -393,5 +557,16 @@ 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_80wa1")] + +[node name="AnimationPlayer" type="AnimationPlayer" parent="Platform"] +libraries = { +"": SubResource("AnimationLibrary_dcgrv") +} +autoplay = "move" + +[node name="BoxTrap" type="Node2D" parent="."] +position = Vector2(276, -83) + [connection signal="areatrigger" from="AreaTrigger" to="." method="_on_area_2d_areatrigger"] [connection signal="body_entered" from="AreaTrigger" to="AreaTrigger" method="_on_body_entered"] diff --git a/scenes/platform.tscn b/scenes/platform.tscn new file mode 100644 index 0000000..bd1fefb --- /dev/null +++ b/scenes/platform.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://ci10o5e0xpxm8"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_l2jtx"] +size = Vector2(84, 12) + +[node name="AnimatableBody2D" type="AnimatableBody2D"] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_l2jtx") +one_way_collision = true diff --git a/scripts/gamecontroller.gd b/scripts/gamecontroller.gd index 0ad265d..8925358 100644 --- a/scripts/gamecontroller.gd +++ b/scripts/gamecontroller.gd @@ -1,5 +1,7 @@ extends Node2D +var myBox = preload("res://scenes/crate.tscn") +@onready var box_trap = $BoxTrap # Called when the node enters the scene tree for the first time. func _ready(): @@ -11,5 +13,16 @@ func _process(delta): pass -func _on_area_2d_areatrigger(effect, Object): - print("Game Controller sees the trigger") +func _on_area_2d_areatrigger(effect, body): + print("Game Controller sees the trigger "+effect ) + match effect: + "alert": + #do stuff + print("hi") + if body.is_in_group("player"): + for n in 3: + var box = myBox.instantiate() + add_child(box) + box.position = box_trap.position + "powerup": + print("you got power")