diff --git a/febfabgame/Assets/graphics/enemies/slime_green.png b/febfabgame/Assets/graphics/enemies/slime_green.png new file mode 100644 index 0000000..a21cb6f Binary files /dev/null and b/febfabgame/Assets/graphics/enemies/slime_green.png differ diff --git a/febfabgame/Assets/graphics/enemies/slime_green.png.import b/febfabgame/Assets/graphics/enemies/slime_green.png.import new file mode 100644 index 0000000..7bfc367 --- /dev/null +++ b/febfabgame/Assets/graphics/enemies/slime_green.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b4dxowflr1r1s" +path="res://.godot/imported/slime_green.png-ad997ec8d5988d25b3d3419588c7ae3e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/graphics/enemies/slime_green.png" +dest_files=["res://.godot/imported/slime_green.png-ad997ec8d5988d25b3d3419588c7ae3e.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/febfabgame/Assets/graphics/pickups/coin.png b/febfabgame/Assets/graphics/pickups/coin.png new file mode 100644 index 0000000..01ae33d Binary files /dev/null and b/febfabgame/Assets/graphics/pickups/coin.png differ diff --git a/febfabgame/Assets/graphics/pickups/coin.png.import b/febfabgame/Assets/graphics/pickups/coin.png.import new file mode 100644 index 0000000..eb3f4ef --- /dev/null +++ b/febfabgame/Assets/graphics/pickups/coin.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dd5qaa5cpnh2t" +path="res://.godot/imported/coin.png-9491dd42d1d379e18630e9fc9198f402.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/graphics/pickups/coin.png" +dest_files=["res://.godot/imported/coin.png-9491dd42d1d379e18630e9fc9198f402.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/febfabgame/Assets/graphics/player/hurt/Player Hurt 48x48.png b/febfabgame/Assets/graphics/player/hurt/Player Hurt 48x48.png new file mode 100644 index 0000000..57d8783 Binary files /dev/null and b/febfabgame/Assets/graphics/player/hurt/Player Hurt 48x48.png differ diff --git a/febfabgame/Assets/graphics/player/hurt/Player Hurt 48x48.png.import b/febfabgame/Assets/graphics/player/hurt/Player Hurt 48x48.png.import new file mode 100644 index 0000000..365a1fb --- /dev/null +++ b/febfabgame/Assets/graphics/player/hurt/Player Hurt 48x48.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b21la5hkk8w5l" +path="res://.godot/imported/Player Hurt 48x48.png-5a0a9e01cf994e3de27e6da83ae4f521.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/graphics/player/hurt/Player Hurt 48x48.png" +dest_files=["res://.godot/imported/Player Hurt 48x48.png-5a0a9e01cf994e3de27e6da83ae4f521.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/febfabgame/Scenes/coin.tscn b/febfabgame/Scenes/coin.tscn new file mode 100644 index 0000000..9a769aa --- /dev/null +++ b/febfabgame/Scenes/coin.tscn @@ -0,0 +1,113 @@ +[gd_scene load_steps=17 format=3 uid="uid://buyuw4dj3uovh"] + +[ext_resource type="Texture2D" uid="uid://dd5qaa5cpnh2t" path="res://Assets/graphics/pickups/coin.png" id="1_b0tmp"] +[ext_resource type="Script" path="res://Scripts/coin.gd" id="1_jh57p"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_pj6w8"] +atlas = ExtResource("1_b0tmp") +region = Rect2(0, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_j1j0f"] +atlas = ExtResource("1_b0tmp") +region = Rect2(16, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1mt3j"] +atlas = ExtResource("1_b0tmp") +region = Rect2(32, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gr4wc"] +atlas = ExtResource("1_b0tmp") +region = Rect2(48, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mpin7"] +atlas = ExtResource("1_b0tmp") +region = Rect2(64, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_b1gk7"] +atlas = ExtResource("1_b0tmp") +region = Rect2(80, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jqhsw"] +atlas = ExtResource("1_b0tmp") +region = Rect2(96, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_uaepw"] +atlas = ExtResource("1_b0tmp") +region = Rect2(112, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lluxh"] +atlas = ExtResource("1_b0tmp") +region = Rect2(128, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vrcvi"] +atlas = ExtResource("1_b0tmp") +region = Rect2(144, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fiujm"] +atlas = ExtResource("1_b0tmp") +region = Rect2(160, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xrd60"] +atlas = ExtResource("1_b0tmp") +region = Rect2(176, 0, 16, 16) + +[sub_resource type="SpriteFrames" id="SpriteFrames_pdwqp"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_pj6w8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_j1j0f") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1mt3j") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gr4wc") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mpin7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_b1gk7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jqhsw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_uaepw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lluxh") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vrcvi") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fiujm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xrd60") +}], +"loop": true, +"name": &"default", +"speed": 12.0 +}] + +[sub_resource type="CircleShape2D" id="CircleShape2D_g0ckv"] +radius = 4.0 + +[node name="Area2D" type="Area2D"] +script = ExtResource("1_jh57p") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +sprite_frames = SubResource("SpriteFrames_pdwqp") +autoplay = "default" +frame_progress = 0.228944 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("CircleShape2D_g0ckv") + +[connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/febfabgame/Scenes/feb_fab_game lv2.tscn b/febfabgame/Scenes/feb_fab_game lv2.tscn index 8aa0e46..7a3389a 100644 --- a/febfabgame/Scenes/feb_fab_game lv2.tscn +++ b/febfabgame/Scenes/feb_fab_game lv2.tscn @@ -457,17 +457,17 @@ shape = SubResource("RectangleShape2D_yfjal") [node name="Crates" type="Node2D" parent="."] [node name="Crate1" parent="Crates" instance=ExtResource("9_nc3jb")] -position = Vector2(604, 239) +position = Vector2(986, 267) rotation = -0.26268 script = ExtResource("10_ooq4e") [node name="Crate2" parent="Crates" instance=ExtResource("9_nc3jb")] -position = Vector2(340, 130) +position = Vector2(302, 509) rotation = 0.262166 script = ExtResource("10_ooq4e") [node name="Crate3" parent="Crates" instance=ExtResource("9_nc3jb")] -position = Vector2(849, 118) +position = Vector2(928, 133) rotation = -0.248451 script = ExtResource("10_ooq4e") diff --git a/febfabgame/Scenes/feb_fab_game lv3.tscn b/febfabgame/Scenes/feb_fab_game lv3.tscn new file mode 100644 index 0000000..e369568 --- /dev/null +++ b/febfabgame/Scenes/feb_fab_game lv3.tscn @@ -0,0 +1,495 @@ +[gd_scene load_steps=21 format=4 uid="uid://663q2oo8cvte"] + +[ext_resource type="Texture2D" uid="uid://b0qpo3wfi6qju" path="res://Assets/graphics/backgrounds/block.png" id="1_ci28m"] +[ext_resource type="Texture2D" uid="uid://cq4t2eebwx5mj" path="res://Assets/graphics/backgrounds/forestbackground.png" id="2_yaphm"] +[ext_resource type="Texture2D" uid="uid://j137m3ot6vm3" path="res://Assets/graphics/backgrounds/shrubs.png" id="3_0j8e5"] +[ext_resource type="Texture2D" uid="uid://c1k7osqmbur1d" path="res://Assets/graphics/backgrounds/rocks.png" id="4_h7p4p"] +[ext_resource type="Texture2D" uid="uid://fwqc3qyc3jss" path="res://Assets/graphics/terrains/Terrain (32x32).png" id="5_txjyq"] +[ext_resource type="Texture2D" uid="uid://dccf4tkybalhs" path="res://Assets/graphics/terrains/veg_32x32.png" id="6_dfcuq"] +[ext_resource type="Texture2D" uid="uid://utgxiv6xx1jb" path="res://Assets/graphics/terrains/mushroom.png" id="7_n5gw2"] +[ext_resource type="PackedScene" uid="uid://bad28kns14sve" path="res://Scenes/crate.tscn" id="8_cm015"] +[ext_resource type="Script" path="res://Scripts/crate.gd" id="9_n1rss"] +[ext_resource type="PackedScene" uid="uid://b0snboj7mbad5" path="res://Scenes/player.tscn" id="10_qs1yn"] +[ext_resource type="Script" path="res://Scripts/scene_manager.gd" id="11_7dhkr"] +[ext_resource type="PackedScene" uid="uid://d0ve3ds64sk3p" path="res://Scenes/trigger.tscn" id="12_nm3ll"] + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ky1en"] +texture = ExtResource("5_txjyq") +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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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 +1:0/0/terrains_peering_bit/bottom_left_corner = 0 +1:0/0/terrains_peering_bit/left_side = 0 +2:0/0 = 0 +2:0/0/terrain_set = 0 +2:0/0/terrain = 0 +2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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/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 +6:0/0/terrains_peering_bit/left_side = 0 +6:0/0/terrains_peering_bit/top_left_corner = 0 +6:0/0/terrains_peering_bit/top_side = 0 +6:0/0/terrains_peering_bit/top_right_corner = 0 +7:0/0 = 0 +7:0/0/terrain_set = 0 +7:0/0/terrain = 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 +7:0/0/terrains_peering_bit/left_side = 0 +7:0/0/terrains_peering_bit/top_left_corner = 0 +7:0/0/terrains_peering_bit/top_side = 0 +7:0/0/terrains_peering_bit/top_right_corner = 0 +9:0/0 = 0 +9:0/0/terrain_set = 0 +9:0/0/terrain = 0 +9:0/0/terrains_peering_bit/right_side = 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 +9:0/0/terrains_peering_bit/left_side = 0 +9:0/0/terrains_peering_bit/top_side = 0 +10:0/0 = 0 +10:0/0/terrain_set = 0 +10:0/0/terrain = 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 +10:0/0/terrains_peering_bit/left_side = 0 +10:0/0/terrains_peering_bit/top_left_corner = 0 +10:0/0/terrains_peering_bit/top_side = 0 +12:0/0 = 0 +12:0/0/terrain_set = 0 +12:0/0/terrain = 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 +12:0/0/terrains_peering_bit/left_side = 0 +12:0/0/terrains_peering_bit/top_side = 0 +13:0/0 = 0 +13:0/0/terrain_set = 0 +13:0/0/terrain = 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 +13:0/0/terrains_peering_bit/left_side = 0 +13:0/0/terrains_peering_bit/top_side = 0 +15:0/0 = 0 +15:0/0/terrain_set = 0 +15:0/0/terrain = 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 +15:0/0/terrains_peering_bit/top_side = 0 +0:1/0 = 0 +0:1/0/terrain_set = 0 +0:1/0/terrain = 0 +0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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 +0:1/0/terrains_peering_bit/top_side = 0 +0:1/0/terrains_peering_bit/top_right_corner = 0 +1:1/0 = 0 +2:1/0 = 0 +2:1/0/terrain_set = 0 +2:1/0/terrain = 0 +2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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 +2:1/0/terrains_peering_bit/top_left_corner = 0 +2:1/0/terrains_peering_bit/top_side = 0 +4:1/0 = 0 +4:1/0/terrain_set = 0 +4:1/0/terrain = 0 +4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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/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 +6:1/0/terrains_peering_bit/bottom_left_corner = 0 +6:1/0/terrains_peering_bit/left_side = 0 +6:1/0/terrains_peering_bit/top_left_corner = 0 +6:1/0/terrains_peering_bit/top_side = 0 +7:1/0 = 0 +7:1/0/terrain_set = 0 +7:1/0/terrain = 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 +7:1/0/terrains_peering_bit/bottom_left_corner = 0 +7:1/0/terrains_peering_bit/left_side = 0 +7:1/0/terrains_peering_bit/top_side = 0 +7:1/0/terrains_peering_bit/top_right_corner = 0 +9:1/0 = 0 +9:1/0/terrain_set = 0 +9:1/0/terrain = 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 +9:1/0/terrains_peering_bit/left_side = 0 +9:1/0/terrains_peering_bit/top_side = 0 +9:1/0/terrains_peering_bit/top_right_corner = 0 +10:1/0 = 0 +10:1/0/terrain_set = 0 +10:1/0/terrain = 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 +10:1/0/terrains_peering_bit/top_left_corner = 0 +10:1/0/terrains_peering_bit/top_side = 0 +10:1/0/terrains_peering_bit/top_right_corner = 0 +12:1/0 = 0 +12:1/0/terrain_set = 0 +12:1/0/terrain = 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 +12:1/0/terrains_peering_bit/top_side = 0 +12:1/0/terrains_peering_bit/top_right_corner = 0 +13:1/0 = 0 +13:1/0/terrain_set = 0 +13:1/0/terrain = 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 +13:1/0/terrains_peering_bit/top_left_corner = 0 +13:1/0/terrains_peering_bit/top_side = 0 +15:1/0 = 0 +15:1/0/terrain_set = 0 +15:1/0/terrain = 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 +15:1/0/terrains_peering_bit/left_side = 0 +15:1/0/terrains_peering_bit/top_side = 0 +15:1/0/terrains_peering_bit/top_right_corner = 0 +16:1/0 = 0 +16:1/0/terrain_set = 0 +16:1/0/terrain = 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 +16:1/0/terrains_peering_bit/left_side = 0 +16:1/0/terrains_peering_bit/top_left_corner = 0 +16:1/0/terrains_peering_bit/top_side = 0 +0:2/0 = 0 +0:2/0/terrain_set = 0 +0:2/0/terrain = 0 +0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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 +1:2/0/terrains_peering_bit/top_side = 0 +1:2/0/terrains_peering_bit/top_right_corner = 0 +2:2/0 = 0 +2:2/0/terrain_set = 0 +2:2/0/terrain = 0 +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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/terrains_peering_bit/right_side = 0 +6:3/0/terrains_peering_bit/bottom_side = 0 +6:3/0/terrains_peering_bit/top_side = 0 +6:3/0/terrains_peering_bit/top_right_corner = 0 +7:3/0 = 0 +7:3/0/terrain_set = 0 +7:3/0/terrain = 0 +7:3/0/terrains_peering_bit/bottom_side = 0 +7:3/0/terrains_peering_bit/left_side = 0 +7:3/0/terrains_peering_bit/top_left_corner = 0 +7:3/0/terrains_peering_bit/top_side = 0 +9:3/0 = 0 +9:3/0/terrain_set = 0 +9:3/0/terrain = 0 +9:3/0/terrains_peering_bit/right_side = 0 +9:3/0/terrains_peering_bit/bottom_side = 0 +9:3/0/terrains_peering_bit/bottom_left_corner = 0 +9:3/0/terrains_peering_bit/left_side = 0 +10:3/0 = 0 +10:3/0/terrain_set = 0 +10:3/0/terrain = 0 +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 +10:3/0/terrains_peering_bit/left_side = 0 +12:3/0 = 0 +12:3/0/terrain_set = 0 +12:3/0/terrain = 0 +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/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/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/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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 16, 16, 8.75, 16, -4.5, 16, -16, 16, -16, 9.25) +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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 8.25, 14, 12.5, 8.75, 16, -4.5, 16, -12, 13.25, -16, 9.25) +6:4/0 = 0 +6:4/0/terrain_set = 0 +6:4/0/terrain = 0 +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 +6:4/0/terrains_peering_bit/top_side = 0 +7:4/0 = 0 +7:4/0/terrain_set = 0 +7:4/0/terrain = 0 +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 +7:4/0/terrains_peering_bit/top_side = 0 +9:4/0 = 0 +9:4/0/terrain_set = 0 +9:4/0/terrain = 0 +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 +9:4/0/terrains_peering_bit/top_side = 0 +10:4/0 = 0 +10:4/0/terrain_set = 0 +10:4/0/terrain = 0 +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_side = 0 +10:4/0/terrains_peering_bit/top_right_corner = 0 +12:4/0 = 0 +12:4/0/terrain_set = 0 +12:4/0/terrain = 0 +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/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/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/terrains_peering_bit/left_side = 0 +16:4/0/terrains_peering_bit/top_side = 0 + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ihpgj"] +texture = ExtResource("6_dfcuq") +texture_region_size = Vector2i(32, 32) +0:0/0 = 0 +0:0/0/terrain_set = 0 +0:0/0/terrain = 1 + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_30kvu"] +texture = ExtResource("7_n5gw2") +texture_region_size = Vector2i(32, 32) +0:0/0 = 0 +0:0/0/terrain_set = 0 +0:0/0/terrain = 1 +0:0/0/terrains_peering_bit/bottom_side = 1 +0:1/0 = 0 +0:1/0/terrain_set = 0 +0:1/0/terrain = 1 +0:1/0/terrains_peering_bit/top_side = 1 + +[sub_resource type="TileSet" id="TileSet_r50ga"] +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) +terrain_set_0/terrain_1/name = "vegetation" +terrain_set_0/terrain_1/color = Color(0.5, 0.4375, 0.25, 1) +terrain_set_1/mode = 0 +sources/2 = SubResource("TileSetAtlasSource_ky1en") +sources/3 = SubResource("TileSetAtlasSource_ihpgj") +sources/4 = SubResource("TileSetAtlasSource_30kvu") + +[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_qkap3"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_yfjal"] +size = Vector2(65, 20) + +[sub_resource type="CircleShape2D" id="CircleShape2D_fgkk4"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ilkes"] +size = Vector2(20, 134) + +[node name="FebFabGame" type="Node2D"] + +[node name="sky" type="Parallax2D" parent="."] +repeat_size = Vector2(320, 180) +metadata/_edit_group_ = true + +[node name="Sprite2D" type="Sprite2D" parent="sky"] +position = Vector2(160, 90) +texture = ExtResource("1_ci28m") + +[node name="farbg" type="Parallax2D" parent="."] +scroll_scale = Vector2(0.25, 1) +repeat_size = Vector2(320, 0) +metadata/_edit_group_ = true + +[node name="Sprite2D" type="Sprite2D" parent="farbg"] +position = Vector2(160, 490) +texture = ExtResource("2_yaphm") + +[node name="midground" type="Parallax2D" parent="."] +scroll_scale = Vector2(0.5, 1) +repeat_size = Vector2(320, 0) +metadata/_edit_group_ = true + +[node name="Sprite2D" type="Sprite2D" parent="midground"] +position = Vector2(160, 500) +texture = ExtResource("3_0j8e5") + +[node name="foreground" type="Parallax2D" parent="."] +scroll_scale = Vector2(0.75, 1) +repeat_size = Vector2(320, 0) +metadata/_edit_group_ = true + +[node name="Sprite2D" type="Sprite2D" parent="foreground"] +position = Vector2(160, 500) +texture = ExtResource("4_h7p4p") + +[node name="TileMapLayer" type="TileMapLayer" parent="."] +texture_filter = 1 +tile_map_data = PackedByteArray("AAASABIAAgABAAAAAAARABIAAgABAAAAAAAQABIAAgABAAAAAAAPABIAAgABAAAAAAAOABIAAgABAAAAAAANABIAAgABAAAAAAAMABIAAgABAAAAAAALABIAAgABAAAAAAAKABIAAgABAAAAAAAJABIAAgABAAAAAAAIABIAAgABAAAAAAAHABIAAgABAAAAAAAGABIAAgABAAAAAAAFABIAAgABAAAAAAAEABIAAgAGAAEAAAAEABEAAgACAAEAAAAEABAAAgACAAAAAAADABAAAgAQAAEAAAADAA8AAgACAAAAAAACAA8AAgABAAAAAAABAA8AAgAGAAEAAAABAA4AAgACAAAAAAAAAA4AAgAAAAAAAAAAAA8AAgAAAAEAAAAAABAAAgAAAAEAAAAAABEAAgAHAAEAAAACABAAAgAGAAAAAAADABEAAgAHAAAAAAAAABIAAgAHAAAAAAADABIAAgAGAAAAAAAAABMAAgAGAAAAAAD//xMAAgAGAAAAAAD+/xMAAgAGAAAAAAD+/xIAAgAGAAAAAAD9/xIAAgAGAAAAAAD9/xEAAgAGAAEAAAD8/xEAAgAAAAEAAAD+/xEAAgABAAAAAAD//xEAAgABAAAAAAD//xIAAgAGAAAAAAADABMAAgAGAAAAAAAEABMAAgAGAAAAAAAFABMAAgAGAAAAAAAGABMAAgAGAAAAAAAHABMAAgAGAAAAAAAIABMAAgAGAAAAAAAJABMAAgAGAAAAAAAKABMAAgAGAAAAAAALABMAAgAGAAAAAAAMABMAAgAGAAAAAAANABMAAgAGAAAAAAAOABMAAgAGAAAAAAAPABMAAgAGAAAAAAAQABMAAgAGAAAAAAARABMAAgAGAAAAAAASABMAAgAGAAAAAAATABMAAgAGAAAAAAATABIAAgABAAAAAAAUABIAAgAHAAEAAAAUABEAAgAAAAEAAAAUABAAAgAAAAEAAAAVAA8AAgAKAAAAAAAUAA8AAgAAAAEAAAAUAA4AAgAQAAEAAAATAA4AAgAAAAIAAAATAA0AAgAAAAEAAAATAAwAAgAHAAAAAAASAAwAAgAKAAQAAAASAAsAAgAAAAAAAAATAAsAAgABAAAAAAAUAAsAAgACAAAAAAAUAAwAAgACAAEAAAAUAA0AAgACAAEAAAAVAA4AAgACAAAAAAAVABAAAgACAAEA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") +tile_set = SubResource("TileSet_r50ga") + +[node name="Floor" type="StaticBody2D" parent="."] +position = Vector2(613, 579) +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Floor"] +shape = SubResource("WorldBoundaryShape2D_qkap3") + +[node name="Level" type="Node2D" parent="."] + +[node name="Brick" type="StaticBody2D" parent="Level"] +position = Vector2(606, 379) +metadata/_edit_group_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Level/Brick"] +position = Vector2(-0.5, 0) +shape = SubResource("RectangleShape2D_yfjal") + +[node name="Crates" type="Node2D" parent="."] + +[node name="Crate1" parent="Crates" instance=ExtResource("8_cm015")] +position = Vector2(1006, 273) +rotation = -0.26268 +script = ExtResource("9_n1rss") + +[node name="Crate2" parent="Crates" instance=ExtResource("8_cm015")] +position = Vector2(904, 280) +rotation = 0.262166 +script = ExtResource("9_n1rss") + +[node name="Crate3" parent="Crates" instance=ExtResource("8_cm015")] +position = Vector2(919, 162) +rotation = -0.248451 +script = ExtResource("9_n1rss") + +[node name="CharacterBody2D" parent="." instance=ExtResource("10_qs1yn")] +position = Vector2(358, 306) + +[node name="SceneManager" type="Node" parent="."] +unique_name_in_owner = true +script = ExtResource("11_7dhkr") + +[node name="triggers" type="Node2D" parent="."] + +[node name="Trigger" parent="triggers" instance=ExtResource("12_nm3ll")] +effect = "destroy" + +[node name="CollisionShape2D" type="CollisionShape2D" parent="triggers/Trigger"] +shape = SubResource("CircleShape2D_fgkk4") +debug_color = Color(0.62821, 0.394472, 0.903221, 0.42) + +[node name="powerup" parent="triggers" instance=ExtResource("12_nm3ll")] +position = Vector2(949, 469) +effect = "powerup" + +[node name="CollisionShape2D" type="CollisionShape2D" parent="triggers/powerup"] +position = Vector2(4, -1) +shape = SubResource("RectangleShape2D_ilkes") +debug_color = Color(0.304464, 0.623664, 0.204875, 0.42) diff --git a/febfabgame/Scenes/feb_fab_game.tscn b/febfabgame/Scenes/feb_fab_game.tscn index 569b3ca..fd38f77 100644 --- a/febfabgame/Scenes/feb_fab_game.tscn +++ b/febfabgame/Scenes/feb_fab_game.tscn @@ -1,6 +1,5 @@ -[gd_scene load_steps=22 format=4 uid="uid://cpuc12n61qg6b"] +[gd_scene load_steps=23 format=4 uid="uid://cpuc12n61qg6b"] -[ext_resource type="Script" path="res://Scripts/gamecontroller.gd" id="1_amnm6"] [ext_resource type="Texture2D" uid="uid://fwqc3qyc3jss" path="res://Assets/graphics/terrains/Terrain (32x32).png" id="2_2rxht"] [ext_resource type="Texture2D" uid="uid://b0qpo3wfi6qju" path="res://Assets/graphics/backgrounds/block.png" id="2_d6us3"] [ext_resource type="PackedScene" uid="uid://d0ve3ds64sk3p" path="res://Scenes/trigger.tscn" id="2_k6dhr"] @@ -13,6 +12,8 @@ [ext_resource type="Texture2D" uid="uid://utgxiv6xx1jb" path="res://Assets/graphics/terrains/mushroom.png" id="4_u2yo2"] [ext_resource type="Script" path="res://Scripts/scene_manager.gd" id="5_4nsas"] [ext_resource type="Texture2D" uid="uid://c1k7osqmbur1d" path="res://Assets/graphics/backgrounds/rocks.png" id="5_umo5t"] +[ext_resource type="PackedScene" uid="uid://buyuw4dj3uovh" path="res://Scenes/coin.tscn" id="13_o1lsv"] +[ext_resource type="PackedScene" uid="uid://col8ryohnxcnw" path="res://Scenes/slime.tscn" id="14_dmc5d"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ky1en"] texture = ExtResource("2_2rxht") @@ -395,7 +396,6 @@ size = Vector2(65, 20) size = Vector2(20, 134) [node name="FebFabGame" type="Node2D"] -script = ExtResource("1_amnm6") [node name="sky" type="Parallax2D" parent="."] repeat_size = Vector2(320, 180) @@ -495,3 +495,22 @@ effect = "powerup" position = Vector2(4, -1) shape = SubResource("RectangleShape2D_ilkes") debug_color = Color(0.304464, 0.623664, 0.204875, 0.42) + +[node name="coins" type="Node2D" parent="."] + +[node name="Area2D" parent="coins" instance=ExtResource("13_o1lsv")] +position = Vector2(134, 413) + +[node name="Area2D2" parent="coins" instance=ExtResource("13_o1lsv")] +position = Vector2(296, 507) + +[node name="Area2D3" parent="coins" instance=ExtResource("13_o1lsv")] +position = Vector2(787, 417) + +[node name="badguys" type="Node2D" parent="."] + +[node name="Area2D" parent="badguys" instance=ExtResource("14_dmc5d")] +position = Vector2(561, 372) + +[node name="Area2D2" parent="badguys" instance=ExtResource("14_dmc5d")] +position = Vector2(293, 566) diff --git a/febfabgame/Scenes/player.tscn b/febfabgame/Scenes/player.tscn index 7aefdea..94d450c 100644 --- a/febfabgame/Scenes/player.tscn +++ b/febfabgame/Scenes/player.tscn @@ -1,12 +1,29 @@ -[gd_scene load_steps=28 format=3 uid="uid://b0snboj7mbad5"] +[gd_scene load_steps=33 format=3 uid="uid://b0snboj7mbad5"] [ext_resource type="Script" path="res://Scripts/Player.gd" id="1_mjl5w"] [ext_resource type="Texture2D" uid="uid://jnn6hcmfgyfo" path="res://Assets/graphics/player/idle/Player Idle 48x48.png" id="2_20p21"] +[ext_resource type="Texture2D" uid="uid://b21la5hkk8w5l" path="res://Assets/graphics/player/hurt/Player Hurt 48x48.png" id="2_xgiy8"] [ext_resource type="Texture2D" uid="uid://ciaht230dnmu3" path="res://Assets/graphics/player/run/player run 48x48.png" id="3_ergv2"] [ext_resource type="Texture2D" uid="uid://bv1oc2iwohejk" path="res://Assets/graphics/player/jump/player jump 48x48.png" id="3_riawr"] [sub_resource type="CircleShape2D" id="CircleShape2D_xiumq"] +[sub_resource type="AtlasTexture" id="AtlasTexture_b4hot"] +atlas = ExtResource("2_xgiy8") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_l6mti"] +atlas = ExtResource("2_xgiy8") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8fm43"] +atlas = ExtResource("2_xgiy8") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_momkp"] +atlas = ExtResource("2_xgiy8") +region = Rect2(144, 0, 48, 48) + [sub_resource type="AtlasTexture" id="AtlasTexture_u237n"] atlas = ExtResource("2_20p21") region = Rect2(0, 0, 48, 48) @@ -95,6 +112,23 @@ region = Rect2(336, 0, 48, 48) animations = [{ "frames": [{ "duration": 1.0, +"texture": SubResource("AtlasTexture_b4hot") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_l6mti") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8fm43") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_momkp") +}], +"loop": false, +"name": &"hurt", +"speed": 12.0 +}, { +"frames": [{ +"duration": 1.0, "texture": SubResource("AtlasTexture_u237n") }, { "duration": 1.0, @@ -197,7 +231,9 @@ texture_filter = 1 position = Vector2(2, -11) scale = Vector2(1.54734, 1.26736) sprite_frames = SubResource("SpriteFrames_tbufb") -animation = &"jump" -autoplay = "jump" +animation = &"hurt" +autoplay = "hurt" [node name="Camera2D" type="Camera2D" parent="."] + +[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animated_finished"] diff --git a/febfabgame/Scenes/slime.tscn b/febfabgame/Scenes/slime.tscn new file mode 100644 index 0000000..f3b3038 --- /dev/null +++ b/febfabgame/Scenes/slime.tscn @@ -0,0 +1,59 @@ +[gd_scene load_steps=9 format=3 uid="uid://col8ryohnxcnw"] + +[ext_resource type="Script" path="res://Scripts/slime.gd" id="1_btp0b"] +[ext_resource type="Texture2D" uid="uid://b4dxowflr1r1s" path="res://Assets/graphics/enemies/slime_green.png" id="2_aa1qj"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_dgplm"] +atlas = ExtResource("2_aa1qj") +region = Rect2(0, 24, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ufu1w"] +atlas = ExtResource("2_aa1qj") +region = Rect2(24, 24, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_r7fnm"] +atlas = ExtResource("2_aa1qj") +region = Rect2(48, 24, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_10fi1"] +atlas = ExtResource("2_aa1qj") +region = Rect2(72, 24, 24, 24) + +[sub_resource type="SpriteFrames" id="SpriteFrames_w4nm1"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_dgplm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ufu1w") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_r7fnm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_10fi1") +}], +"loop": true, +"name": &"idle", +"speed": 12.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_khbh8"] +size = Vector2(12, 13) + +[node name="Area2D" type="Area2D"] +script = ExtResource("1_btp0b") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +sprite_frames = SubResource("SpriteFrames_w4nm1") +animation = &"idle" +autoplay = "idle" +frame_progress = 0.192104 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0, 4.5) +shape = SubResource("RectangleShape2D_khbh8") + +[connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/febfabgame/Scripts/Player.gd b/febfabgame/Scripts/Player.gd index f3f5822..4b47978 100644 --- a/febfabgame/Scripts/Player.gd +++ b/febfabgame/Scripts/Player.gd @@ -17,85 +17,97 @@ var isJumping = false @onready var right_target: Node2D = $rightTarget @onready var left_target: Node2D = $leftTarget - +var animPlaying = "idle" +var living = true func _physics_process(delta: float) -> void: - # Add the gravity. - if not is_on_floor(): - velocity += get_gravity() * delta - else: - isJumping = false - - - - # Handle jump. - if Input.is_action_just_pressed("ui_accept") and is_on_floor(): - velocity.y = JUMP_VELOCITY - isJumping = true - playerGraphic.play("jump") - - # Get the input direction and handle the movement/deceleration. - # As good practice, you should replace UI actions with custom gameplay actions. - var direction := Input.get_axis("left", "right") - if Input.is_action_just_pressed("shove") && pushRightEnabled && faceLeft == false: - pushTarget.apply_central_impulse(Vector2(1,0)*PUSH_FORCE) - pushRightEnabled = false - if Input.is_action_just_pressed("shove") && pushLeftEnabled && faceLeft == true: - print("can actually push") - pushTarget.apply_central_impulse(Vector2(-1,0)*PUSH_FORCE) - pushLeftEnabled = false - # Shoot Attach - if Input.is_action_just_pressed("shoot"): - if faceLeft == false: - %SceneManager.makeBullet(right_target.global_transform, 700) - if faceLeft == true: - %SceneManager.makeBullet(left_target.global_transform, -700) - - if direction: - velocity.x = direction * SPEED - else: - velocity.x = move_toward(velocity.x, 0, SPEED) - if direction: - if not isJumping: - playerGraphic.play("run") - if direction ==0: - if not isJumping: - playerGraphic.play("idle") - - if direction <0: - faceLeft = true - playerGraphic.flip_h = true - if direction >0: - faceLeft = false - playerGraphic.flip_h = false + if living and not animPlaying == "hurt": + # Add the gravity. + if not is_on_floor(): + velocity += get_gravity() * delta + else: + isJumping = false + - move_and_slide() - if right_cast.is_colliding(): - print("something on my right") - var collider = right_cast.get_collider() - if collider is Node: - if collider is RigidBody2D: - print("shove this crate") - #record that we can shove right - pushRightEnabled = true - #record what object to shove - pushTarget = collider + # Handle jump. + if Input.is_action_just_pressed("ui_accept") and is_on_floor(): + velocity.y = JUMP_VELOCITY + isJumping = true + playerGraphic.play("jump") + + # Get the input direction and handle the movement/deceleration. + # As good practice, you should replace UI actions with custom gameplay actions. + var direction := Input.get_axis("left", "right") + if Input.is_action_just_pressed("shove") && pushRightEnabled && faceLeft == false: + pushTarget.apply_central_impulse(Vector2(1,0)*PUSH_FORCE) + pushRightEnabled = false + if Input.is_action_just_pressed("shove") && pushLeftEnabled && faceLeft == true: + print("can actually push") + pushTarget.apply_central_impulse(Vector2(-1,0)*PUSH_FORCE) + pushLeftEnabled = false + # Shoot Attach + if Input.is_action_just_pressed("shoot"): + if faceLeft == false: + %SceneManager.makeBullet(right_target.global_transform, 700) + if faceLeft == true: + %SceneManager.makeBullet(left_target.global_transform, -700) + + if direction: + velocity.x = direction * SPEED + else: + velocity.x = move_toward(velocity.x, 0, SPEED) + if direction: + if not isJumping: + playerGraphic.play("run") + if direction ==0: + if not isJumping: + playerGraphic.play("idle") + + if direction <0: + faceLeft = true + playerGraphic.flip_h = true + if direction >0: + faceLeft = false + playerGraphic.flip_h = false - if left_cast.is_colliding(): - print("something on my left") - var collider = left_cast.get_collider() - if collider is Node: - if collider is RigidBody2D: - print("shove this crate") - #record that we can shove left - pushLeftEnabled = true - #record what object to shove - pushTarget = collider - - - - for i in get_slide_collision_count(): - var c = get_slide_collision(i) - if c.get_collider() is RigidBody2D: - c.get_collider().apply_central_impulse(-c.get_normal() * 50) + + move_and_slide() + if right_cast.is_colliding(): + print("something on my right") + var collider = right_cast.get_collider() + if collider is Node: + if collider is RigidBody2D: + print("shove this crate") + #record that we can shove right + pushRightEnabled = true + #record what object to shove + pushTarget = collider + + if left_cast.is_colliding(): + print("something on my left") + var collider = left_cast.get_collider() + if collider is Node: + if collider is RigidBody2D: + print("shove this crate") + #record that we can shove left + pushLeftEnabled = true + #record what object to shove + pushTarget = collider + + + + for i in get_slide_collision_count(): + var c = get_slide_collision(i) + if c.get_collider() is RigidBody2D: + c.get_collider().apply_central_impulse(-c.get_normal() * 50) + +func hurtPlayer(health): + print("Player takes damage, health remaining::"+str(health)) + animPlaying = "hurt" + playerGraphic.play(animPlaying) + + +func _on_animated_finished() -> void: + if animPlaying == "hurt": + animPlaying=="idle" diff --git a/febfabgame/Scripts/coin.gd b/febfabgame/Scripts/coin.gd new file mode 100644 index 0000000..99405ca --- /dev/null +++ b/febfabgame/Scripts/coin.gd @@ -0,0 +1,7 @@ +class_name Coin extends Area2D + +signal coinCollectedSignal(body, coin) + +func _on_body_entered(body: Node2D) -> void: + print("pointCollected") + coinCollectedSignal.emit(body, self) diff --git a/febfabgame/Scripts/gamecontroller.gd b/febfabgame/Scripts/gamecontroller.gd index cd28dd8..b8278a9 100644 --- a/febfabgame/Scripts/gamecontroller.gd +++ b/febfabgame/Scripts/gamecontroller.gd @@ -3,12 +3,46 @@ class_name GameController extends Node2D # Game Data var totalCrates = 4 var cratesDestroyed = 0 +var coinsCollected = 0 +var totalCoinsAvailable = 0 +var enemies = 0 + +signal destroySignal(body) +signal LevelCompleteSignal(level) +signal playerHurtSignal(healthRemaining) + +#Level Info +var timer:= Timer.new() +var levels = ["res://Scenes/feb_fab_game.tscn","res://Scenes/feb_fab_game lv2.tscn","res://Scenes/feb_fab_game lv3.tscn"] +var timers = [20,15,25] +var currentLevel = 0 +var countdown=0 + +var player:Resource +var slime:Resource # Called when the node enters the scene tree for the first time. func _ready() -> void: - pass # Replace with function body. - + player = load("res://Scripts/res/playerStats.tres") + slime = load("res://Scripts/res/slimeStats.tres") + + countdown = timers[currentLevel] + add_child(timer) + timer.wait_time = 1 + timer.one_shot = false + timer.connect("timeout", secondCounter) + timer.start() +func reset(): + countdown = timers[currentLevel] + +func secondCounter(): + #print("tick") + countdown -=1 + if countdown <=0: + print("LOSER") + LevelCompleteSignal.emit(levels[currentLevel]) + # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: pass @@ -20,7 +54,8 @@ func _on_trigger_area_trigger(effect, body) -> void: "destroy": #write code to destroy if body is Crate: - %SceneManager.destroy(body) + #%SceneManager.destroy(body) + destroySignal.emit(body) cratesDestroyed +=1 "powerup": #write code to powerup @@ -34,10 +69,41 @@ func bulletHit(body): print("game controller knows bullet hit") if body is Crate: print("you've hit a crate") - cratesDestroyed +=1 - %SceneManager.destroy(body) + totalCrates -=1 + #%SceneManager.destroy(body) + destroySignal.emit(body) print("crates Remaining :: "+str(totalCrates - cratesDestroyed)) + if totalCrates <=0: + print("WIN") + currentLevel +=1 + if currentLevel >= levels.size(): + currentLevel = 0 + LevelCompleteSignal.emit(levels[currentLevel]) func numberOfCrates(value): totalCrates = value print("Game Controller know scrates "+str(totalCrates)) + +func numberOfCoins(value): + totalCoinsAvailable = value + +func coinCollected(body, coin): + print("GC knows coin collected") + if body is Player: + #increase coins collected count + coinsCollected +=1 + print("total coins =" + str(coinsCollected)) + destroySignal.emit(coin) + +func playerDamage(body, badguy): + if body is Player: + print("GC knows player taking damage") + print("player health "+str(player.health)+"takes damage "+str(slime.meleeDamage)) + player.health -= slime.meleeDamage + if player.health > 0: + playerHurtSignal.emit(player.health) + else: + print("dead") + +func numberOfBadguys(value): + enemies = value diff --git a/febfabgame/Scripts/res/characterStats.gd b/febfabgame/Scripts/res/characterStats.gd new file mode 100644 index 0000000..753d6a7 --- /dev/null +++ b/febfabgame/Scripts/res/characterStats.gd @@ -0,0 +1,8 @@ +class_name CharacterStats extends Resource + +@export var max_health:int = 100 +@export var starting_health:int = 100 +@export var health:int = 100 + +@export var meleeDamage:int = 10 +@export var rangeDamage:int = 8 diff --git a/febfabgame/Scripts/res/playerStats.tres b/febfabgame/Scripts/res/playerStats.tres new file mode 100644 index 0000000..ffb3510 --- /dev/null +++ b/febfabgame/Scripts/res/playerStats.tres @@ -0,0 +1,11 @@ +[gd_resource type="Resource" script_class="CharacterStats" load_steps=2 format=3 uid="uid://dho7d11hshiq5"] + +[ext_resource type="Script" path="res://Scripts/res/characterStats.gd" id="1_kp6r2"] + +[resource] +script = ExtResource("1_kp6r2") +max_health = 100 +starting_health = 100 +health = 100 +meleeDamage = 10 +rangeDamage = 8 diff --git a/febfabgame/Scripts/res/slimeStats.tres b/febfabgame/Scripts/res/slimeStats.tres new file mode 100644 index 0000000..ac56295 --- /dev/null +++ b/febfabgame/Scripts/res/slimeStats.tres @@ -0,0 +1,11 @@ +[gd_resource type="Resource" script_class="CharacterStats" load_steps=2 format=3 uid="uid://c1w83maxwn2nd"] + +[ext_resource type="Script" path="res://Scripts/res/characterStats.gd" id="1_agwwm"] + +[resource] +script = ExtResource("1_agwwm") +max_health = 50 +starting_health = 50 +health = 50 +meleeDamage = 30 +rangeDamage = 0 diff --git a/febfabgame/Scripts/scene_manager.gd b/febfabgame/Scripts/scene_manager.gd index c0dda85..c1a4fe7 100644 --- a/febfabgame/Scripts/scene_manager.gd +++ b/febfabgame/Scripts/scene_manager.gd @@ -1,7 +1,12 @@ extends Node -@onready var gameController: GameController = $".." +#@onready var gameController: GameController = $".." @onready var crates: Node2D = $"../Crates" @onready var triggers: Node2D = $"../triggers" +@onready var coins: Node2D = $"../coins" +@onready var badguys: Node2D = $"../badguys" +@onready var player: Player = $"../CharacterBody2D" + + var bulletsFiredTotal = 0 var bulletsMadeTotal = 0 @@ -33,7 +38,8 @@ func makeBullet(position, speed): func bulletHit(bullet, body): print("tell the game controller a bullet hit smthn") - gameController.bulletHit(body) + #gameController.bulletHit(body) + Gamecontroller.bulletHit(body) bullet.setSpeed(0) bullet.position = Vector2(-100,-100) @@ -46,14 +52,45 @@ func buildLevel(): for obj in crates.get_children(): if obj is Crate: totalCrates +=1 - gameController.numberOfCrates(totalCrates) + #gameController.numberOfCrates(totalCrates) + Gamecontroller.numberOfCrates(totalCrates) + + #how many coints? + var totalCoins =0 + if coins: + for obj in coins.get_children(): + if obj is Coin: + totalCoins +=1 + obj.coinCollectedSignal.connect(Gamecontroller.coinCollected) + Gamecontroller.numberOfCoins(totalCoins) + + #how many bad guys + var totalBadguys =0 + if badguys: + for obj in badguys.get_children(): + if obj is Slime: + totalBadguys +=1 + obj.playerDamagSignal.connect(Gamecontroller.playerDamage) + Gamecontroller.numberOfBadguys(totalBadguys) #wire up the triggers for obj in triggers.get_children(): if obj is Trigger: #wire up to GC - obj.areaTrigger.connect(gameController._on_trigger_area_trigger) + #obj.areaTrigger.connect(gameController._on_trigger_area_trigger) + obj.areaTrigger.connect(Gamecontroller._on_trigger_area_trigger) + + #Listen to gameController + Gamecontroller.destroySignal.connect(destroy) + Gamecontroller.LevelCompleteSignal.connect(loadLevel) + Gamecontroller.playerHurtSignal.connect(playerHurt) + +func loadLevel(level): + get_tree().change_scene_to_file(level) func _ready() -> void: buildLevel() + Gamecontroller.reset() +func playerHurt(health): + player.hurtPlayer(health) diff --git a/febfabgame/Scripts/slime.gd b/febfabgame/Scripts/slime.gd new file mode 100644 index 0000000..12442b0 --- /dev/null +++ b/febfabgame/Scripts/slime.gd @@ -0,0 +1,8 @@ +class_name Slime extends Area2D + +signal playerDamagSignal + + +func _on_body_entered(body: Node2D) -> void: + playerDamagSignal.emit(body, self) + print("bad guy yum yum") diff --git a/febfabgame/project.godot b/febfabgame/project.godot index 8ffa2b2..780bf48 100644 --- a/febfabgame/project.godot +++ b/febfabgame/project.godot @@ -15,6 +15,10 @@ run/main_scene="res://Scenes/feb_fab_game.tscn" config/features=PackedStringArray("4.3", "Forward Plus") config/icon="res://icon.svg" +[autoload] + +Gamecontroller="*res://Scripts/gamecontroller.gd" + [display] window/size/viewport_width=320