diff --git a/graphics/animations/player_idle/Player Idle 48x48.png.import b/graphics/animations/player_idle/Player Idle 48x48.png.import index 89be3df..67546c9 100644 --- a/graphics/animations/player_idle/Player Idle 48x48.png.import +++ b/graphics/animations/player_idle/Player Idle 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Player Idle 48x48.png-febc6ee73b16c6ae56feb25 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/animations/player_jump/player jump 48x48.png.import b/graphics/animations/player_jump/player jump 48x48.png.import index 0065ff7..914725d 100644 --- a/graphics/animations/player_jump/player jump 48x48.png.import +++ b/graphics/animations/player_jump/player jump 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player jump 48x48.png-53153cc022c0f5f1a72bef8 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/animations/player_jump/player new jump 48x48.png.import b/graphics/animations/player_jump/player new jump 48x48.png.import index de9be7b..7d06955 100644 --- a/graphics/animations/player_jump/player new jump 48x48.png.import +++ b/graphics/animations/player_jump/player new jump 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player new jump 48x48.png-085528a4cee6917e773 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/animations/player_land/player land 48x48.png.import b/graphics/animations/player_land/player land 48x48.png.import index ecc6680..4f3fcf0 100644 --- a/graphics/animations/player_land/player land 48x48.png.import +++ b/graphics/animations/player_land/player land 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player land 48x48.png-73bf83889efcd0c346ed730 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/animations/player_punch/Player Punch 64x64(1).png b/graphics/animations/player_punch/Player Punch 64x64(1).png new file mode 100644 index 0000000..c9a4660 Binary files /dev/null and b/graphics/animations/player_punch/Player Punch 64x64(1).png differ diff --git a/graphics/animations/player_punch/Player Punch 64x64(1).png.import b/graphics/animations/player_punch/Player Punch 64x64(1).png.import new file mode 100644 index 0000000..54e35f4 --- /dev/null +++ b/graphics/animations/player_punch/Player Punch 64x64(1).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bnnj3lw3souky" +path="res://.godot/imported/Player Punch 64x64(1).png-30d66d61ef3a1f371d6375dad7a62029.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/animations/player_punch/Player Punch 64x64(1).png" +dest_files=["res://.godot/imported/Player Punch 64x64(1).png-30d66d61ef3a1f371d6375dad7a62029.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/graphics/animations/player_run/player run 48x48.png.import b/graphics/animations/player_run/player run 48x48.png.import index 83fd611..dd2077d 100644 --- a/graphics/animations/player_run/player run 48x48.png.import +++ b/graphics/animations/player_run/player run 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player run 48x48.png-e4bb17293a9ce0c0c03376a7 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/animations/player_shoot/Player Running Shooting 48x48.png.import b/graphics/animations/player_shoot/Player Running Shooting 48x48.png.import index e8f6962..5334a01 100644 --- a/graphics/animations/player_shoot/Player Running Shooting 48x48.png.import +++ b/graphics/animations/player_shoot/Player Running Shooting 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Player Running Shooting 48x48.png-3d2df69d2a4 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/animations/player_shoot/player shoot 2H 48x48.png.import b/graphics/animations/player_shoot/player shoot 2H 48x48.png.import index acc152d..f0a4deb 100644 --- a/graphics/animations/player_shoot/player shoot 2H 48x48.png.import +++ b/graphics/animations/player_shoot/player shoot 2H 48x48.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player shoot 2H 48x48.png-6d3782d73196ec488a7 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/backgrounds/25-10-17-sky-background-godot-course-.png.import b/graphics/backgrounds/25-10-17-sky-background-godot-course-.png.import index 4678567..60668ce 100644 --- a/graphics/backgrounds/25-10-17-sky-background-godot-course-.png.import +++ b/graphics/backgrounds/25-10-17-sky-background-godot-course-.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/25-10-17-sky-background-godot-course-.png-685 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/backgrounds/25-10-17-trees-background-godot-course-v1.png.import b/graphics/backgrounds/25-10-17-trees-background-godot-course-v1.png.import index 3d02293..9999ab1 100644 --- a/graphics/backgrounds/25-10-17-trees-background-godot-course-v1.png.import +++ b/graphics/backgrounds/25-10-17-trees-background-godot-course-v1.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/25-10-17-trees-background-godot-course-v1.png compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/backgrounds/forestbackground.png.import b/graphics/backgrounds/forestbackground.png.import index 88ff60c..3a99dc8 100644 --- a/graphics/backgrounds/forestbackground.png.import +++ b/graphics/backgrounds/forestbackground.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/forestbackground.png-c62d472b3b61aefff531c569 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/effects/14.png.import b/graphics/effects/14.png.import index 38017d9..26f4d98 100644 --- a/graphics/effects/14.png.import +++ b/graphics/effects/14.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/14.png-b80bda9481eb03b9296615b658f23b86.ctex" compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/effects/explosion.png.import b/graphics/effects/explosion.png.import index 6fc2947..8cd9613 100644 --- a/graphics/effects/explosion.png.import +++ b/graphics/effects/explosion.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/explosion.png-67838f4909472368e8b1165eafa79d8 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/effects/orb_red.png.import b/graphics/effects/orb_red.png.import index 7d5eabe..680c1f0 100644 --- a/graphics/effects/orb_red.png.import +++ b/graphics/effects/orb_red.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/orb_red.png-96d2144e68a7a46da9f571d0443165d8. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/enemies/slime_green(1).png b/graphics/enemies/slime_green(1).png new file mode 100644 index 0000000..a21cb6f Binary files /dev/null and b/graphics/enemies/slime_green(1).png differ diff --git a/graphics/enemies/slime_green(1).png.import b/graphics/enemies/slime_green(1).png.import new file mode 100644 index 0000000..da659be --- /dev/null +++ b/graphics/enemies/slime_green(1).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://wgf50h6hbeib" +path="res://.godot/imported/slime_green(1).png-681a56605c941b0b260c890dc1e66a86.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/enemies/slime_green(1).png" +dest_files=["res://.godot/imported/slime_green(1).png-681a56605c941b0b260c890dc1e66a86.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/graphics/objects/25-10-27-small-crate.png b/graphics/objects/25-10-27-small-crate.png new file mode 100644 index 0000000..b9040a8 Binary files /dev/null and b/graphics/objects/25-10-27-small-crate.png differ diff --git a/graphics/objects/25-10-27-small-crate.png.import b/graphics/objects/25-10-27-small-crate.png.import new file mode 100644 index 0000000..34440bc --- /dev/null +++ b/graphics/objects/25-10-27-small-crate.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d1tnil82cldxk" +path="res://.godot/imported/25-10-27-small-crate.png-2ac8da16d97759b258fcf96245f3d88c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/objects/25-10-27-small-crate.png" +dest_files=["res://.godot/imported/25-10-27-small-crate.png-2ac8da16d97759b258fcf96245f3d88c.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/graphics/objects/mushroom_32x64.png b/graphics/objects/mushroom_32x64.png new file mode 100644 index 0000000..957e816 Binary files /dev/null and b/graphics/objects/mushroom_32x64.png differ diff --git a/graphics/objects/mushroom_32x64.png.import b/graphics/objects/mushroom_32x64.png.import new file mode 100644 index 0000000..082e10d --- /dev/null +++ b/graphics/objects/mushroom_32x64.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ctrmx80fc52bt" +path="res://.godot/imported/mushroom_32x64.png-ae0508fa0fd752d4aa1446b33c7066d4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/objects/mushroom_32x64.png" +dest_files=["res://.godot/imported/mushroom_32x64.png-ae0508fa0fd752d4aa1446b33c7066d4.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/graphics/objects/veg_32x32.png b/graphics/objects/veg_32x32.png new file mode 100644 index 0000000..4e09fa9 Binary files /dev/null and b/graphics/objects/veg_32x32.png differ diff --git a/graphics/objects/veg_32x32.png.import b/graphics/objects/veg_32x32.png.import new file mode 100644 index 0000000..9a7b2a7 --- /dev/null +++ b/graphics/objects/veg_32x32.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bpf0sbb3o6rch" +path="res://.godot/imported/veg_32x32.png-742a28d4fd61b9f915a41209e1c74506.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/objects/veg_32x32.png" +dest_files=["res://.godot/imported/veg_32x32.png-742a28d4fd61b9f915a41209e1c74506.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/graphics/pickups/coin(1).png b/graphics/pickups/coin(1).png new file mode 100644 index 0000000..01ae33d Binary files /dev/null and b/graphics/pickups/coin(1).png differ diff --git a/graphics/pickups/coin(1).png.import b/graphics/pickups/coin(1).png.import new file mode 100644 index 0000000..893111f --- /dev/null +++ b/graphics/pickups/coin(1).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b3i7e40h88wh0" +path="res://.godot/imported/coin(1).png-19d802c455c83c490b6727491bcbe9e7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/pickups/coin(1).png" +dest_files=["res://.godot/imported/coin(1).png-19d802c455c83c490b6727491bcbe9e7.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/graphics/tiles/25-10-18-godot-course-Terrain (32x32).png.import b/graphics/tiles/25-10-18-godot-course-Terrain (32x32).png.import index 3989eca..49aee0d 100644 --- a/graphics/tiles/25-10-18-godot-course-Terrain (32x32).png.import +++ b/graphics/tiles/25-10-18-godot-course-Terrain (32x32).png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/25-10-18-godot-course-Terrain (32x32).png-1ec compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/tiles/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png.import b/graphics/tiles/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png.import index 524613e..09da4fb 100644 --- a/graphics/tiles/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png.import +++ b/graphics/tiles/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/25-10-26-godot-course-Terrain (32x32)-color-e compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/graphics/tiles/crate-100-custom.png.import b/graphics/tiles/crate-100-custom.png.import index a455552..b78e042 100644 --- a/graphics/tiles/crate-100-custom.png.import +++ b/graphics/tiles/crate-100-custom.png.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/crate-100-custom.png-5420ee27cb0ee861df6e7629 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/icon.svg.import b/icon.svg.import index 6cd956b..80ea586 100644 --- a/icon.svg.import +++ b/icon.svg.import @@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.cte compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -27,10 +25,6 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/project.godot b/project.godot index d3b8ed9..9a396d5 100644 --- a/project.godot +++ b/project.godot @@ -13,15 +13,15 @@ config_version=5 config/name="September Game AB" config/tags=PackedStringArray("2d", "lesson", "platformer") run/main_scene="uid://cueixogtk70go" -config/features=PackedStringArray("4.5", "Forward Plus") +config/features=PackedStringArray("4.4", "Forward Plus") config/icon="res://icon.svg" [display] -window/size/viewport_width=640 -window/size/viewport_height=360 -window/size/window_width_override=1280 -window/size/window_height_override=720 +window/size/viewport_width=320 +window/size/viewport_height=180 +window/size/window_width_override=640 +window/size/window_height_override=360 window/stretch/mode="viewport" [file_customization] @@ -53,29 +53,22 @@ move_right={ } jump={ "deadzone": 0.2, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null) -, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null) +"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null) ] } shove={ "deadzone": 0.2, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":122,"location":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null) -, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"script":null) +"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":3,"pressure":0.0,"pressed":true,"script":null) ] } shoot={ "deadzone": 0.2, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":102,"location":0,"echo":false,"script":null) -, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":true,"script":null) +"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":true,"script":null) ] } throw={ "deadzone": 0.2, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":84,"key_label":0,"unicode":116,"location":0,"echo":false,"script":null) -, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":3,"pressure":0.0,"pressed":true,"script":null) +"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":4,"pressure":0.0,"pressed":true,"script":null) ] } diff --git a/scenes/coin.tscn b/scenes/coin.tscn new file mode 100644 index 0000000..8d61480 --- /dev/null +++ b/scenes/coin.tscn @@ -0,0 +1,114 @@ +[gd_scene load_steps=17 format=3 uid="uid://31idmjadvk3t"] + +[ext_resource type="Script" uid="uid://dpcuif8u6kqj5" path="res://scripts/coin.gd" id="1_i64fm"] +[ext_resource type="Texture2D" uid="uid://b3i7e40h88wh0" path="res://graphics/pickups/coin(1).png" id="1_rwqht"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_i64fm"] +atlas = ExtResource("1_rwqht") +region = Rect2(0, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_11l1o"] +atlas = ExtResource("1_rwqht") +region = Rect2(16, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_d14el"] +atlas = ExtResource("1_rwqht") +region = Rect2(32, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1ikuy"] +atlas = ExtResource("1_rwqht") +region = Rect2(48, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wnlwo"] +atlas = ExtResource("1_rwqht") +region = Rect2(64, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jig8b"] +atlas = ExtResource("1_rwqht") +region = Rect2(80, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xmuha"] +atlas = ExtResource("1_rwqht") +region = Rect2(96, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kfxoj"] +atlas = ExtResource("1_rwqht") +region = Rect2(112, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jsmju"] +atlas = ExtResource("1_rwqht") +region = Rect2(128, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_s0mny"] +atlas = ExtResource("1_rwqht") +region = Rect2(144, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_7cc30"] +atlas = ExtResource("1_rwqht") +region = Rect2(160, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rojmm"] +atlas = ExtResource("1_rwqht") +region = Rect2(176, 0, 16, 16) + +[sub_resource type="SpriteFrames" id="SpriteFrames_ls27i"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_i64fm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_11l1o") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_d14el") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1ikuy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_wnlwo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jig8b") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xmuha") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kfxoj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jsmju") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_s0mny") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_7cc30") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rojmm") +}], +"loop": true, +"name": &"idle", +"speed": 10.0 +}] + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_rwqht"] +radius = 4.0 +height = 10.0 + +[node name="Coin" type="Area2D"] +script = ExtResource("1_i64fm") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +sprite_frames = SubResource("SpriteFrames_ls27i") +animation = &"idle" +autoplay = "idle" +frame_progress = 0.521528 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("CapsuleShape2D_rwqht") + +[connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/scenes/crate.tscn b/scenes/crate.tscn index b4a4c88..eaeba98 100644 --- a/scenes/crate.tscn +++ b/scenes/crate.tscn @@ -11,9 +11,9 @@ collision_mask = 15 metadata/_edit_group_ = true [node name="Sprite2D" type="Sprite2D" parent="."] -position = Vector2(9.536743e-07, 1.9073486e-06) +position = Vector2(9.53674e-07, 1.90735e-06) texture = ExtResource("1_b66cd") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("RectangleShape2D_uwrxv") -debug_color = Color(0.8745098, 0.23137255, 0.654902, 0.078431375) +debug_color = Color(0.87451, 0.231373, 0.654902, 0.0784314) diff --git a/scenes/game.tscn b/scenes/game.tscn index 5731833..27ce56a 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -1,11 +1,15 @@ -[gd_scene load_steps=16 format=4 uid="uid://cueixogtk70go"] +[gd_scene load_steps=22 format=4 uid="uid://cueixogtk70go"] [ext_resource type="Script" uid="uid://d0ca3jbhe8le3" path="res://scripts/game_controller.gd" id="1_lbhrr"] -[ext_resource type="PackedScene" uid="uid://dnarbab7jjqmk" path="res://scenes/crate.tscn" id="1_uwrxv"] [ext_resource type="Script" uid="uid://b84pdw14l6gb6" path="res://scripts/scene_manager.gd" id="2_iywne"] [ext_resource type="PackedScene" uid="uid://2pp1gtlflav8" path="res://scenes/trigger.tscn" id="2_yqjtg"] [ext_resource type="PackedScene" uid="uid://d3y1iqmpknpyo" path="res://scenes/player.tscn" id="3_lnu2h"] [ext_resource type="Texture2D" uid="uid://dkco6bp2yelei" path="res://graphics/tiles/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png" id="3_u5sy4"] +[ext_resource type="Texture2D" uid="uid://bpf0sbb3o6rch" path="res://graphics/objects/veg_32x32.png" id="4_gee14"] +[ext_resource type="Texture2D" uid="uid://ctrmx80fc52bt" path="res://graphics/objects/mushroom_32x64.png" id="5_0tnpc"] +[ext_resource type="PackedScene" uid="uid://yr1iqtid2ihb" path="res://scenes/small_crate.tscn" id="7_u5sy4"] +[ext_resource type="PackedScene" uid="uid://31idmjadvk3t" path="res://scenes/coin.tscn" id="9_0tnpc"] +[ext_resource type="PackedScene" uid="uid://bts74sqcd7k7h" path="res://scenes/slimer.tscn" id="10_vtaks"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"] texture = ExtResource("3_u5sy4") @@ -225,7 +229,7 @@ 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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, -16, -16, -16, 7.96577, -13.0639, 12.7452, -9.24029, 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 @@ -241,14 +245,14 @@ 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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 7.96577, 13.0639, 12.7452, 9.24029, 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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, -16, -16, -16, 7.96577, -13.0639, 12.7452, -9.24029, 16, 7.64714, 16, 13.3825, 12.7452, 16, 7.64714) 4:2/0/terrains_peering_bit/top_side = 0 6:3/0 = 0 6:3/0/terrain_set = 0 @@ -311,7 +315,7 @@ texture_region_size = Vector2i(32, 32) 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, 16, -16, 16) +0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -7.64714, 16, -13.3825, 12.7452, -16, 7.64714) 0:4/0/terrains_peering_bit/right_side = 0 1:4/0 = 0 1:4/0/terrain_set = 0 @@ -322,12 +326,12 @@ texture_region_size = Vector2i(32, 32) 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, 16, -16, 16) +2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, -16, -16, -16, 16, 7.64714, 16, 13.3825, 12.7452, 16, 7.64714) 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, 16, -16, 16) +4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, -16, -16, -16, 7.96577, -13.0639, 12.7452, -9.24029, 16, 7.64714, 16, 13.3825, 12.7452, 16, 7.64714) 6:4/0 = 0 6:4/0/terrain_set = 0 6:4/0/terrain = 0 @@ -377,16 +381,34 @@ texture_region_size = Vector2i(32, 32) 15:4/0 = 0 15:4/0/terrain_set = 0 15:4/0/terrain = 0 -15:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +15:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(16, -16, -16, -16, -16, 7.96577, -13.0639, 12.7452, -9.24029, 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/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16) +16:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 7.96577, 13.0639, 12.7452, 9.24029, 16, -16, 16) 16:4/0/terrains_peering_bit/left_side = 0 16:4/0/terrains_peering_bit/top_side = 0 +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_0tnpc"] +texture = ExtResource("4_gee14") +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_vtaks"] +texture = ExtResource("5_0tnpc") +texture_region_size = Vector2i(32, 32) +0:0/0 = 0 +0:0/0/terrain_set = 0 +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_gee14"] tile_size = Vector2i(32, 32) physics_layer_0/collision_layer = 2 @@ -394,11 +416,15 @@ physics_layer_0/collision_mask = 13 terrain_set_0/mode = 0 terrain_set_0/terrain_0/name = "Main Terrain" 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) sources/0 = SubResource("TileSetAtlasSource_gee14") +sources/1 = SubResource("TileSetAtlasSource_0tnpc") +sources/2 = SubResource("TileSetAtlasSource_vtaks") [sub_resource type="Gradient" id="Gradient_iywne"] -offsets = PackedFloat32Array(0.20666666, 0.66, 0.96666664) -colors = PackedColorArray(0, 0, 0, 1, 0.19215687, 0.1882353, 0.22745098, 1, 0.27058825, 0.23529412, 0.36862746, 1) +offsets = PackedFloat32Array(0.206667, 0.66, 0.966667) +colors = PackedColorArray(0, 0, 0, 1, 0.192157, 0.188235, 0.227451, 1, 0.270588, 0.235294, 0.368627, 1) [sub_resource type="FastNoiseLite" id="FastNoiseLite_p57ef"] noise_type = 2 @@ -406,23 +432,23 @@ cellular_return_type = 0 domain_warp_enabled = true [sub_resource type="NoiseTexture2D" id="NoiseTexture2D_u5sy4"] -noise = SubResource("FastNoiseLite_p57ef") -color_ramp = SubResource("Gradient_iywne") -seamless = true in_3d_space = true +seamless = true +color_ramp = SubResource("Gradient_iywne") +noise = SubResource("FastNoiseLite_p57ef") [sub_resource type="Gradient" id="Gradient_p57ef"] -offsets = PackedFloat32Array(0.5133333, 0.8466667, 0.9266667) -colors = PackedColorArray(0, 0, 0, 0, 0.5525, 0.85, 0.58224994, 0.36078432, 0.99233335, 1, 0.53999996, 0.27058825) +offsets = PackedFloat32Array(0.513333, 0.846667, 0.926667) +colors = PackedColorArray(0, 0, 0, 0, 0.5525, 0.85, 0.58225, 0.360784, 0.992333, 1, 0.54, 0.270588) [sub_resource type="FastNoiseLite" id="FastNoiseLite_u5sy4"] noise_type = 5 frequency = 0.02 [sub_resource type="NoiseTexture2D" id="NoiseTexture2D_iywne"] -noise = SubResource("FastNoiseLite_u5sy4") -color_ramp = SubResource("Gradient_p57ef") seamless = true +color_ramp = SubResource("Gradient_p57ef") +noise = SubResource("FastNoiseLite_u5sy4") [sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"] @@ -434,16 +460,15 @@ unique_name_in_owner = true script = ExtResource("2_iywne") [node name="TileMapLayer" type="TileMapLayer" parent="."] -z_index = 10 position = Vector2(0, 1) -tile_map_data = PackedByteArray("AADy/wMAAAABAAEAAADy/wQAAAABAAIAAADz/wQAAAABAAIAAADz/wMAAAABAAEAAAD0/wMAAAABAAEAAAD0/wQAAAABAAIAAADx/wQAAAAAAAIAAADx/wMAAAAAAAEAAAD4/wMAAAABAAAAAAD4/wQAAAABAAIAAAD5/wQAAAABAAIAAAD6/wQAAAABAAIAAAD7/wQAAAABAAIAAAD8/wQAAAABAAIAAAD9/wQAAAABAAIAAAD+/wQAAAAHAAAAAAD+/wMAAAABAAAAAAD9/wMAAAABAAAAAAD8/wMAAAABAAAAAAD7/wMAAAABAAAAAAD6/wMAAAABAAAAAAD5/wMAAAABAAAAAAABAAMAAAABAAAAAAABAAQAAAABAAEAAAABAAUAAAABAAIAAAACAAUAAAABAAIAAAADAAUAAAABAAIAAAAEAAUAAAABAAIAAAAEAAQAAAAGAAEAAAAEAAMAAAACAAAAAAADAAMAAAABAAAAAAACAAMAAAABAAAAAAACAAQAAAABAAEAAAADAAQAAAABAAEAAAD3/wMAAAABAAAAAAD2/wMAAAAGAAEAAAD1/wMAAAABAAEAAAD1/wQAAAABAAIAAAD2/wQAAAABAAIAAAD3/wQAAAABAAIAAAAKAAIAAAABAAAAAAAJAAIAAAAAAAAAAAAJAAMAAAAAAAEAAAAMAAEAAAABAAAAAAAMAAIAAAABAAEAAAAMAAMAAAABAAEAAAAMAAQAAAABAAEAAAANAAQAAAABAAEAAAANAAUAAAABAAIAAAAOAAUAAAABAAIAAAAPAAUAAAABAAIAAAAMAAUAAAABAAIAAAANAAEAAAABAAAAAAAOAAEAAAABAAAAAAANAAIAAAABAAEAAAANAAMAAAABAAEAAAAOAAQAAAABAAEAAAAPAAQAAAABAAEAAAAPAAMAAAABAAEAAAAPAAIAAAAGAAEAAAAPAAEAAAACAAAAAAAOAAIAAAABAAEAAAAOAAMAAAABAAEAAAARAAIAAAABAAAAAAARAAMAAAABAAEAAAARAAQAAAABAAEAAAARAAUAAAABAAIAAAASAAUAAAABAAIAAAATAAUAAAABAAIAAAAUAAUAAAABAAIAAAAVAAUAAAABAAIAAAAWAAUAAAABAAIAAAAWAAQAAAABAAEAAAAWAAMAAAAGAAEAAAAVAAMAAAABAAEAAAAVAAIAAAABAAAAAAAUAAIAAAABAAAAAAATAAIAAAABAAAAAAASAAIAAAABAAAAAAASAAMAAAABAAEAAAASAAQAAAABAAEAAAATAAQAAAABAAEAAAAUAAQAAAABAAEAAAAUAAMAAAABAAEAAAATAAMAAAABAAEAAAAVAAQAAAABAAEAAAAWAAIAAAACAAAAAAD4//7/AAABAAQAAAD5//7/AAAKAAMAAAD6//7/AAAHAAEAAAD7//7/AAACAAEAAAD9//3/AAAKAAQAAAD+//3/AAABAAIAAAD///3/AAABAAIAAAAAAP3/AAABAAIAAAAAAPz/AAABAAAAAAD+//z/AAABAAAAAAD///z/AAABAAAAAAACAP3/AAACAAQAAAABAP3/AAAJAAQAAAD5////AAAAAAIAAAD6////AAABAAIAAAD7////AAACAAIAAADx////AAAAAAAAAADy////AAABAAAAAADz////AAACAAAAAADx/wAAAAAAAAEAAADx/wEAAAAAAAEAAADy/wEAAAABAAEAAADz/wEAAAAGAAEAAADz/wAAAAACAAEAAADy/wAAAAABAAEAAADx/wIAAAAAAAEAAADy/wIAAAABAAEAAADz/wIAAAABAAEAAAD0/wIAAAABAAEAAAD1/wIAAAABAAEAAAD2/wIAAAACAAEAAAD3//7/AAAAAAQAAAD6//3/AAAAAAAAAAD7//3/AAAJAAMAAAABAPz/AAACAAAAAAD9//z/AAAAAAAAAAD8//3/AAABAAQAAAAHAAQAAAABAAAAAAAGAAQAAAABAAAAAAAFAAQAAAABAAAAAAALAAIAAAAHAAEAAAAQAAIAAAABAAAAAAAQAAMAAAABAAEAAAAQAAQAAAABAAEAAAAQAAUAAAABAAIAAAALAAMAAAABAAEAAAAKAAMAAAABAAEAAAAKAAQAAAABAAEAAAAKAAUAAAABAAIAAAAJAAUAAAABAAIAAAAJAAQAAAAHAAEAAAAIAAQAAAABAAAAAAAGAAUAAAABAAIAAAAFAAUAAAABAAIAAAAHAAUAAAABAAIAAAAIAAUAAAABAAIAAAALAAUAAAABAAIAAAALAAQAAAABAAEAAAAAAAQAAAABAAEAAAD//wQAAAABAAEAAAD+/wUAAAAAAAIAAAD//wUAAAABAAIAAAAAAAUAAAABAAIAAAD//wMAAAABAAAAAAAAAAMAAAABAAAAAAALAAEAAAAAAAAAAAD0/wEAAAABAAAAAAD1/wEAAAABAAAAAAALAPv/AAAAAAAAAAALAPz/AAAAAAEAAAALAP3/AAAAAAIAAAAMAPz/AAABAAEAAAANAPz/AAABAAEAAAAOAPz/AAABAAEAAAAOAPv/AAABAAAAAAANAPv/AAABAAAAAAAMAPv/AAABAAAAAAAMAP3/AAABAAIAAAANAP3/AAABAAIAAAAOAP3/AAABAAIAAAAPAPz/AAACAAEAAAAPAPv/AAACAAAAAAAPAP3/AAACAAIAAAAYAAMAAAACAAAAAAAXAAMAAAABAAAAAAAXAAQAAAABAAEAAAAXAAUAAAABAAIAAAAYAAUAAAACAAIAAAAYAAQAAAACAAEAAAAGAP3/AAAAAAQAAAAHAP3/AAACAAQAAADx//3/AAAAAAIAAADy//3/AAABAAIAAADz//3/AAACAAIAAADz//z/AAACAAAAAADy//z/AAABAAAAAADx//z/AAAAAAAAAAD2/wEAAAACAAAAAAA=") +tile_map_data = PackedByteArray("AADy/wMAAAABAAEAAADy/wQAAAABAAIAAADz/wQAAAABAAIAAADz/wMAAAABAAEAAAD0/wMAAAABAAEAAAD0/wQAAAABAAIAAADx/wQAAAAAAAIAAADx/wMAAAAAAAEAAAD4/wMAAAABAAAAAAD4/wQAAAABAAIAAAD5/wQAAAABAAIAAAD6/wQAAAABAAIAAAD7/wQAAAABAAIAAAD8/wQAAAABAAIAAAD9/wQAAAABAAIAAAD+/wQAAAAHAAAAAAD+/wMAAAABAAAAAAD9/wMAAAABAAAAAAD8/wMAAAABAAAAAAD7/wMAAAABAAAAAAD6/wMAAAABAAAAAAD5/wMAAAABAAAAAAABAAMAAAABAAAAAAABAAQAAAABAAEAAAABAAUAAAABAAIAAAACAAUAAAABAAIAAAADAAUAAAABAAIAAAAEAAUAAAABAAIAAAAEAAQAAAAGAAEAAAAEAAMAAAACAAAAAAADAAMAAAABAAAAAAACAAMAAAABAAAAAAACAAQAAAABAAEAAAADAAQAAAABAAEAAAD3/wMAAAABAAAAAAD2/wMAAAAGAAEAAAD1/wMAAAABAAEAAAD1/wQAAAABAAIAAAD2/wQAAAABAAIAAAD3/wQAAAABAAIAAAAKAAIAAAABAAAAAAAJAAIAAAAAAAAAAAAJAAMAAAAAAAEAAAAMAAEAAAABAAAAAAAMAAIAAAABAAEAAAAMAAMAAAABAAEAAAAMAAQAAAABAAEAAAANAAQAAAABAAEAAAANAAUAAAABAAIAAAAOAAUAAAABAAIAAAAPAAUAAAABAAIAAAAMAAUAAAABAAIAAAANAAEAAAABAAAAAAAOAAEAAAABAAAAAAANAAIAAAABAAEAAAANAAMAAAABAAEAAAAOAAQAAAABAAEAAAAPAAQAAAABAAEAAAAPAAMAAAABAAEAAAAPAAIAAAAGAAEAAAAPAAEAAAACAAAAAAAOAAIAAAABAAEAAAAOAAMAAAABAAEAAAARAAIAAAABAAAAAAARAAMAAAABAAEAAAARAAQAAAABAAEAAAARAAUAAAABAAIAAAASAAUAAAABAAIAAAATAAUAAAABAAIAAAAUAAUAAAABAAIAAAAVAAUAAAABAAIAAAAWAAUAAAABAAIAAAAWAAQAAAABAAEAAAAWAAMAAAAGAAEAAAAVAAMAAAABAAEAAAAVAAIAAAABAAAAAAAUAAIAAAABAAAAAAATAAIAAAABAAAAAAASAAIAAAABAAAAAAASAAMAAAABAAEAAAASAAQAAAABAAEAAAATAAQAAAABAAEAAAAUAAQAAAABAAEAAAAUAAMAAAABAAEAAAATAAMAAAABAAEAAAAVAAQAAAABAAEAAAAWAAIAAAACAAAAAAD4//7/AAABAAQAAAD5//7/AAAKAAMAAAD6//7/AAAHAAEAAAD7//7/AAACAAEAAAD9//3/AAAKAAQAAAD+//3/AAABAAIAAAD///3/AAABAAIAAAAAAP3/AAABAAIAAAAAAPz/AAABAAAAAAD+//z/AAABAAAAAAD///z/AAABAAAAAAACAP3/AAACAAQAAAABAP3/AAAJAAQAAAD5////AAAAAAIAAAD6////AAABAAIAAAD7////AAACAAIAAADx////AAAAAAAAAADy////AAABAAAAAADz////AAACAAAAAADx/wAAAAAAAAEAAADx/wEAAAAAAAEAAADy/wEAAAABAAEAAADz/wEAAAAGAAEAAADz/wAAAAACAAEAAADy/wAAAAABAAEAAADx/wIAAAAAAAEAAADy/wIAAAABAAEAAADz/wIAAAABAAEAAAD0/wIAAAABAAEAAAD1/wIAAAABAAEAAAD2/wIAAAACAAEAAAD3//7/AAAAAAQAAAD6//3/AAAAAAAAAAD7//3/AAAJAAMAAAABAPz/AAACAAAAAAD9//z/AAAAAAAAAAD8//3/AAABAAQAAAAHAAQAAAABAAAAAAAGAAQAAAABAAAAAAAFAAQAAAABAAAAAAALAAIAAAAHAAEAAAAQAAIAAAABAAAAAAAQAAMAAAABAAEAAAAQAAQAAAABAAEAAAAQAAUAAAABAAIAAAALAAMAAAABAAEAAAAKAAMAAAABAAEAAAAKAAQAAAABAAEAAAAKAAUAAAABAAIAAAAJAAUAAAABAAIAAAAJAAQAAAAHAAEAAAAIAAQAAAABAAAAAAAGAAUAAAABAAIAAAAFAAUAAAABAAIAAAAHAAUAAAABAAIAAAAIAAUAAAABAAIAAAALAAUAAAABAAIAAAALAAQAAAABAAEAAAAAAAQAAAABAAEAAAD//wQAAAABAAEAAAD+/wUAAAAAAAIAAAD//wUAAAABAAIAAAAAAAUAAAABAAIAAAD//wMAAAABAAAAAAAAAAMAAAABAAAAAAALAAEAAAAAAAAAAAD0/wEAAAABAAAAAAD1/wEAAAABAAAAAAALAPv/AAAAAAAAAAALAPz/AAAAAAEAAAALAP3/AAAAAAIAAAAMAPz/AAABAAEAAAANAPz/AAABAAEAAAAOAPz/AAABAAEAAAAOAPv/AAABAAAAAAANAPv/AAABAAAAAAAMAPv/AAABAAAAAAAMAP3/AAABAAIAAAANAP3/AAABAAIAAAAOAP3/AAABAAIAAAAPAPz/AAACAAEAAAAPAPv/AAACAAAAAAAPAP3/AAACAAIAAAAYAAMAAAACAAAAAAAXAAMAAAABAAAAAAAXAAQAAAABAAEAAAAXAAUAAAABAAIAAAAYAAUAAAACAAIAAAAYAAQAAAACAAEAAAAGAP3/AAAAAAQAAAAHAP3/AAACAAQAAADx//3/AAAAAAIAAADy//3/AAABAAIAAADz//3/AAACAAIAAADz//z/AAACAAAAAADy//z/AAABAAAAAADx//z/AAAAAAAAAAD2/wEAAAACAAAAAAD9/wIAAQAAAAAAAAD//wIAAQAAAAAAAAAFAAMAAQAAAAAAAAAIAAMAAQAAAAAAAAAJAAEAAQAAAAAAAAANAAAAAQAAAAAAAAD4/wIAAQAAAAAAAAD1/wAAAQAAAAAAAAD4//3/AQAAAAAAAAD8//z/AQAAAAAAAAACAPz/AQAAAAAAAAAGAPz/AQAAAAAAAAAXAAIAAQAAAAAAAAAHAAMAAgAAAAEAAAAHAAIAAgAAAAAAAAAOAAAAAgAAAAEAAAAOAP//AgAAAAAAAAASAAEAAgAAAAEAAAASAAAAAgAAAAAAAAAAAAIAAgAAAAEAAAAAAAEAAgAAAAAAAAD5/wIAAgAAAAEAAAD5/wEAAgAAAAAAAAALAPr/AgAAAAEAAAALAPn/AgAAAAAAAAD+//v/AgAAAAEAAAD+//r/AgAAAAAAAAAAAPv/AQAAAAAAAADx//v/AQAAAAAAAADy//v/AgAAAAEAAADy//r/AgAAAAAAAAD5//3/AgAAAAEAAAD5//z/AgAAAAAAAAD7//z/AgAAAAEAAAD7//v/AgAAAAAAAAD0/wAAAgAAAAEAAAD0////AgAAAAAAAAAHAPz/AgAAAAEAAAAHAPv/AgAAAAAAAAA=") tile_set = SubResource("TileSet_gee14") [node name="Background" type="Parallax2D" parent="."] z_index = -100 scroll_scale = Vector2(0.5, 0.5) repeat_size = Vector2(512, 512) -repeat_times = 100 +repeat_times = 3 metadata/_edit_lock_ = true metadata/_edit_group_ = true @@ -453,8 +478,8 @@ texture = SubResource("NoiseTexture2D_u5sy4") [node name="Foreground" type="Parallax2D" parent="."] z_index = 10 repeat_size = Vector2(512, 512) -autoscroll = Vector2(-20, 0) -repeat_times = 100 +autoscroll = Vector2(-10, 0) +repeat_times = 4 metadata/_edit_group_ = true metadata/_edit_lock_ = true @@ -473,26 +498,70 @@ metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="WorldBoundary"] shape = SubResource("WorldBoundaryShape2D_8cj0n") -debug_color = Color(0, 0.50980395, 0.003921569, 1) +debug_color = Color(0, 0.509804, 0.00392157, 1) -[node name="Trigger" parent="." instance=ExtResource("2_yqjtg")] +[node name="Triggers" type="Node" parent="."] + +[node name="Trigger" parent="Triggers" instance=ExtResource("2_yqjtg")] position = Vector2(104, 47) -scale = Vector2(0.48551935, 0.33269948) +scale = Vector2(0.485519, 0.332699) -[node name="Trigger2" parent="." instance=ExtResource("2_yqjtg")] -position = Vector2(532.00006, 62) -scale = Vector2(0.5942757, 0.5465749) +[node name="Trigger2" parent="Triggers" instance=ExtResource("2_yqjtg")] +position = Vector2(532, 62) +scale = Vector2(0.594276, 0.546575) intent = "powerup" -[node name="LargeCrate" parent="." groups=["explodable", "pushable"] instance=ExtResource("1_uwrxv")] -position = Vector2(-10, -211) +[node name="Crates" type="Node" parent="."] -[node name="LargeCrate2" parent="." groups=["explodable", "pushable"] instance=ExtResource("1_uwrxv")] -position = Vector2(436, -220) +[node name="SmallCrate" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_u5sy4")] +z_index = 10 -[node name="LargeCrate3" parent="." groups=["explodable", "pushable"] instance=ExtResource("1_uwrxv")] -position = Vector2(669, -2) +[node name="SmallCrate2" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_u5sy4")] +z_index = 10 +position = Vector2(229, -140) + +[node name="SmallCrate3" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_u5sy4")] +z_index = 10 +position = Vector2(431, -222) + +[node name="SmallCrate4" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_u5sy4")] +z_index = 10 +position = Vector2(-7, -210) + +[node name="Coins" type="Node" parent="."] + +[node name="Coin" parent="Coins" instance=ExtResource("9_0tnpc")] +z_index = 5 +position = Vector2(-49, 84) + +[node name="Coin2" parent="Coins" instance=ExtResource("9_0tnpc")] +z_index = 5 +position = Vector2(-266, -76) + +[node name="Coin3" parent="Coins" instance=ExtResource("9_0tnpc")] +z_index = 5 +position = Vector2(-18, -140) + +[node name="Coin4" parent="Coins" instance=ExtResource("9_0tnpc")] +z_index = 5 +position = Vector2(203, -105) + +[node name="Coin5" parent="Coins" instance=ExtResource("9_0tnpc")] +z_index = 5 +position = Vector2(381, -169) + +[node name="Coin6" parent="Coins" instance=ExtResource("9_0tnpc")] +z_index = 5 +position = Vector2(402, 21) + +[node name="Enemies" type="Node" parent="."] + +[node name="Slimer" parent="Enemies" instance=ExtResource("10_vtaks")] +position = Vector2(-123, 85) + +[node name="Slimer2" parent="Enemies" instance=ExtResource("10_vtaks")] +position = Vector2(53, 86) [connection signal="body_entered" from="WorldBoundary" to="SceneManager" method="_on_world_boundary_body_entered"] -[connection signal="trigger_fired" from="Trigger" to="." method="_on_trigger_fired"] -[connection signal="trigger_fired" from="Trigger2" to="." method="_on_trigger_fired"] +[connection signal="trigger_fired" from="Triggers/Trigger" to="." method="_on_trigger_fired"] +[connection signal="trigger_fired" from="Triggers/Trigger2" to="." method="_on_trigger_fired"] diff --git a/scenes/player.tscn b/scenes/player.tscn index d0a1724..1cfa640 100644 --- a/scenes/player.tscn +++ b/scenes/player.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=47 format=3 uid="uid://d3y1iqmpknpyo"] +[gd_scene load_steps=56 format=3 uid="uid://d3y1iqmpknpyo"] [ext_resource type="Script" uid="uid://d3hp5rjoph7hg" path="res://scripts/player.gd" id="1_3vyb7"] [ext_resource type="Texture2D" uid="uid://dr3rp5hv7rexv" path="res://graphics/animations/player_idle/Player Idle 48x48.png" id="2_g2els"] [ext_resource type="Texture2D" uid="uid://uxdt2cgxicmt" path="res://graphics/animations/player_jump/player jump 48x48.png" id="3_dqkch"] +[ext_resource type="Texture2D" uid="uid://bnnj3lw3souky" path="res://graphics/animations/player_punch/Player Punch 64x64(1).png" id="4_fjrip"] [ext_resource type="Texture2D" uid="uid://bgp8oow6hgh5o" path="res://graphics/animations/player_run/player run 48x48.png" id="4_qlg0r"] [ext_resource type="Texture2D" uid="uid://dadvc8tsvmkb6" path="res://graphics/animations/player_shoot/Player Running Shooting 48x48.png" id="5_tuyoq"] [ext_resource type="Texture2D" uid="uid://crll0t2wjtsly" path="res://graphics/animations/player_shoot/player shoot 2H 48x48.png" id="6_fjrip"] @@ -59,6 +60,38 @@ region = Rect2(432, 0, 48, 48) atlas = ExtResource("3_dqkch") region = Rect2(0, 0, 48, 48) +[sub_resource type="AtlasTexture" id="AtlasTexture_2dvfe"] +atlas = ExtResource("4_fjrip") +region = Rect2(0, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_giy8y"] +atlas = ExtResource("4_fjrip") +region = Rect2(64, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fdfoy"] +atlas = ExtResource("4_fjrip") +region = Rect2(128, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hhpqf"] +atlas = ExtResource("4_fjrip") +region = Rect2(192, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_g5jhy"] +atlas = ExtResource("4_fjrip") +region = Rect2(256, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_holxr"] +atlas = ExtResource("4_fjrip") +region = Rect2(320, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mx1m4"] +atlas = ExtResource("4_fjrip") +region = Rect2(384, 0, 64, 64) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4gjji"] +atlas = ExtResource("4_fjrip") +region = Rect2(448, 0, 64, 64) + [sub_resource type="AtlasTexture" id="AtlasTexture_a8ls1"] atlas = ExtResource("4_qlg0r") region = Rect2(0, 0, 48, 48) @@ -218,6 +251,35 @@ animations = [{ }, { "frames": [{ "duration": 1.0, +"texture": SubResource("AtlasTexture_2dvfe") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_giy8y") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fdfoy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hhpqf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_g5jhy") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_holxr") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_mx1m4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4gjji") +}], +"loop": false, +"name": &"punch", +"speed": 15.0 +}, { +"frames": [{ +"duration": 1.0, "texture": SubResource("AtlasTexture_a8ls1") }, { "duration": 1.0, @@ -317,7 +379,7 @@ metadata/_edit_group_ = true [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CapsuleShape2D_3vyb7") -debug_color = Color(0.52156866, 0.57254905, 0, 1) +debug_color = Color(0.521569, 0.572549, 0, 1) [node name="RightCast" type="RayCast2D" parent="."] target_position = Vector2(50, 0) @@ -335,8 +397,18 @@ position = Vector2(-16, -7) [node name="PlayerSprite" type="AnimatedSprite2D" parent="."] sprite_frames = SubResource("SpriteFrames_3vyb7") -animation = &"shoot_run" +animation = &"punch" autoplay = "idle" +frame = 7 +frame_progress = 1.0 [node name="Camera2D" type="Camera2D" parent="."] offset = Vector2(0, -50) + +[node name="DebugInfo" type="CanvasLayer" parent="."] + +[node name="StateLabel" type="Label" parent="DebugInfo"] +unique_name_in_owner = true +offset_right = 40.0 +offset_bottom = 23.0 +text = "Current State: " diff --git a/scenes/slimer.tscn b/scenes/slimer.tscn new file mode 100644 index 0000000..db9524b --- /dev/null +++ b/scenes/slimer.tscn @@ -0,0 +1,58 @@ +[gd_scene load_steps=9 format=3 uid="uid://bts74sqcd7k7h"] + +[ext_resource type="Texture2D" uid="uid://wgf50h6hbeib" path="res://graphics/enemies/slime_green(1).png" id="1_02r3y"] +[ext_resource type="Script" uid="uid://bcxorf6dwnwbv" path="res://scripts/slimer.gd" id="1_4oill"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_4oill"] +atlas = ExtResource("1_02r3y") +region = Rect2(0, 24, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8ecsm"] +atlas = ExtResource("1_02r3y") +region = Rect2(24, 24, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_swrbd"] +atlas = ExtResource("1_02r3y") +region = Rect2(48, 24, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_slvpl"] +atlas = ExtResource("1_02r3y") +region = Rect2(72, 24, 24, 24) + +[sub_resource type="SpriteFrames" id="SpriteFrames_negjt"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_4oill") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_8ecsm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_swrbd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_slvpl") +}], +"loop": true, +"name": &"idle", +"speed": 6.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_02r3y"] +size = Vector2(14, 15) + +[node name="Slimer" type="Area2D"] +script = ExtResource("1_4oill") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +sprite_frames = SubResource("SpriteFrames_negjt") +animation = &"idle" +autoplay = "idle" +frame_progress = 0.901815 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0, 4.5) +shape = SubResource("RectangleShape2D_02r3y") + +[connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/scenes/small_crate.tscn b/scenes/small_crate.tscn new file mode 100644 index 0000000..bfd69e5 --- /dev/null +++ b/scenes/small_crate.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=3 uid="uid://yr1iqtid2ihb"] + +[ext_resource type="Texture2D" uid="uid://d1tnil82cldxk" path="res://graphics/objects/25-10-27-small-crate.png" id="2_8vkwr"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_hy8m8"] +size = Vector2(46, 48) + +[node name="SmallCrate" type="RigidBody2D"] +collision_layer = 4 +collision_mask = 15 +metadata/_edit_group_ = true + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("2_8vkwr") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_hy8m8") diff --git a/scripts/coin.gd b/scripts/coin.gd new file mode 100644 index 0000000..ba9c068 --- /dev/null +++ b/scripts/coin.gd @@ -0,0 +1,9 @@ +class_name Coin +extends Area2D + +signal coin_collected(body, coin) + +func _on_body_entered(body: Node2D) -> void: + print_debug("body connected with coin") + if body is Player: + coin_collected.emit(body, self) diff --git a/scripts/coin.gd.uid b/scripts/coin.gd.uid new file mode 100644 index 0000000..7a1a480 --- /dev/null +++ b/scripts/coin.gd.uid @@ -0,0 +1 @@ +uid://dpcuif8u6kqj5 diff --git a/scripts/game_controller.gd b/scripts/game_controller.gd index 71a2c34..9588de8 100644 --- a/scripts/game_controller.gd +++ b/scripts/game_controller.gd @@ -1,5 +1,7 @@ extends Node2D +var coins_collected : int = 0 +var total_coins : int = 0 func _on_trigger_fired(intent: Variant, body: PhysicsBody2D) -> void: print("Game controller knows %s trigger fired " % intent) @@ -10,3 +12,21 @@ func _on_trigger_fired(intent: Variant, body: PhysicsBody2D) -> void: body.queue_free() "powerup": print("Power this thing up!") + +func on_coin_collected(_body, coin) -> void: + print_debug("GC knows coin collected") + coins_collected += 1 + print_debug("Coins collected: %s" % str(coins_collected)) + print_debug("There are %s coins remaining" % str(total_coins - coins_collected)) + coin.queue_free() + if coins_collected >= total_coins: + print_debug("You win!") + await get_tree().create_timer(1.0).timeout + get_tree().call_deferred("reload_current_scene") + +func on_player_slimed(body, slime) -> void: + print_debug("GC knows player slimed") + +func set_total_coins(value) -> void: + total_coins = value + print_debug("There are %s coins in the level" % str(total_coins)) diff --git a/scripts/player.gd b/scripts/player.gd index 42bf3aa..572bc16 100644 --- a/scripts/player.gd +++ b/scripts/player.gd @@ -1,4 +1,5 @@ -class_name Player extends CharacterBody2D +class_name Player +extends CharacterBody2D ## Character controller. ## TODO: fix bullet cooldown timer @@ -6,7 +7,7 @@ const SPEED = 200.0 const JUMP_VELOCITY = -500.0 enum FaceDirection{LEFT, RIGHT} -enum State{IDLE, WALK, JUMP, FALLING, SHOOT_STILL, SHOOT_RUN} +enum State{IDLE, WALK, JUMP, FALLING, SHOOT_STILL, SHOOT_RUN, SHOVE} @export var BUMP_POWER := 50 @export var SHOVE_POWER := 300 @@ -41,6 +42,7 @@ func _physics_process(delta: float) -> void: handle_collisions() update_state() update_animation() + update_debug() func handle_input() -> void: @@ -60,14 +62,18 @@ func handle_input() -> void: facing = FaceDirection.RIGHT # Handle shoving. - if Input.is_action_just_pressed("shove") and push_enabled == true: - var shove_direction : int - match facing: - FaceDirection.RIGHT: - shove_direction = 1 - FaceDirection.LEFT: - shove_direction = -1 - push_target.apply_central_impulse(Vector2(shove_direction, 0) * SHOVE_POWER) + if Input.is_action_just_pressed("shove"): + print_debug("Shoving!") + if push_enabled == true: + var shove_direction : int + match facing: + FaceDirection.RIGHT: + shove_direction = 1 + FaceDirection.LEFT: + shove_direction = -1 + print_debug("Shoving %s" % push_target.name) + current_state = State.SHOVE + push_target.apply_central_impulse(Vector2(shove_direction, 0) * SHOVE_POWER) # Handle shooting if Input.is_action_just_pressed("shoot"): @@ -177,6 +183,11 @@ func update_state() -> void: await player_sprite.animation_finished current_state = State.WALK + # Player shoving + State.SHOVE: + await player_sprite.animation_finished + current_state = State.IDLE + func update_animation() -> void: match facing: FaceDirection.LEFT: @@ -196,3 +207,8 @@ func update_animation() -> void: player_sprite.play("shoot_still") State.SHOOT_RUN: player_sprite.play("shoot_run") + State.SHOVE: + player_sprite.play("punch") + +func update_debug(): + %StateLabel.text = "Current state: %s" % current_state diff --git a/scripts/scene_manager.gd b/scripts/scene_manager.gd index ae645d1..2244a83 100644 --- a/scripts/scene_manager.gd +++ b/scripts/scene_manager.gd @@ -7,6 +7,26 @@ var bullet_array = [] var total_allowed_bullets : int = 7 @onready var game: Node2D = $".." +@onready var coins: Node = $"../Coins" +@onready var enemies: Node = $"../Enemies" + +func _ready() -> void: + build_level() + +func build_level() -> void: + var total_coins : int = 0 + if coins: + for coin in coins.get_children(): + if coin is Coin: + total_coins += 1 + coin.coin_collected.connect(game.on_coin_collected) + game.set_total_coins(total_coins) + var total_enemies : int = 0 + if enemies: + for enemy in enemies.get_children(): + if enemy is Slimer: + total_enemies += 1 + enemy.player_slimed.connect(game.on_player_slimed) func make_bullet(_bullet_position, _bullet_speed) -> void: print("make a bullet; put it in the world") @@ -32,7 +52,6 @@ func bullet_factory() -> Bullet: bullet_array.push_front(my_bullet) return my_bullet - func _on_world_boundary_body_entered(body: Node2D) -> void: if body is Player: var current_scene = get_tree() diff --git a/scripts/slimer.gd b/scripts/slimer.gd new file mode 100644 index 0000000..6ff0887 --- /dev/null +++ b/scripts/slimer.gd @@ -0,0 +1,9 @@ +class_name Slimer +extends Area2D + +signal player_slimed(body, slime) + +func _on_body_entered(body: Node2D) -> void: + if body is Player: + print_debug("Player hit Slimer") + player_slimed.emit(body, self) diff --git a/scripts/slimer.gd.uid b/scripts/slimer.gd.uid new file mode 100644 index 0000000..c56e618 --- /dev/null +++ b/scripts/slimer.gd.uid @@ -0,0 +1 @@ +uid://bcxorf6dwnwbv