Compare commits

..

2 Commits

92 changed files with 328 additions and 1335 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b27fd4xvrp2ov"
path="res://.godot/imported/Player Jab 48x48.png-209b6dee05f38c9c501270260f1e13ae.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/animations/Player Jab 48x48.png"
dest_files=["res://.godot/imported/Player Jab 48x48.png-209b6dee05f38c9c501270260f1e13ae.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dcrb23f006glc"
path="res://.godot/imported/Player Death 64x64.png-3ced7a0547a0c82d5e3c6c2e7688b326.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/animations/player_death/Player Death 64x64.png"
dest_files=["res://.godot/imported/Player Death 64x64.png-3ced7a0547a0c82d5e3c6c2e7688b326.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cr8wqcakbcjnl"
path="res://.godot/imported/Player Hurt 48x48.png-1f9c49d10d4f7d0c9be2c8d01bd8b83e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/animations/player_hurt/Player Hurt 48x48.png"
dest_files=["res://.godot/imported/Player Hurt 48x48.png-1f9c49d10d4f7d0c9be2c8d01bd8b83e.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dj6melug42fpq"
path="res://.godot/imported/25-11-12-procedural-explosion.png-4ce7904e6dcb9961c205e0cc508612b7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/backgrounds/25-11-12-procedural-explosion.png"
dest_files=["res://.godot/imported/25-11-12-procedural-explosion.png-4ce7904e6dcb9961c205e0cc508612b7.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ctj6a3d3nxuwm"
path="res://.godot/imported/25-11-12-procedural-tree-lospec.png-73e5860701b216b9b13079fed1a6bfb5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/backgrounds/25-11-12-procedural-tree-lospec.png"
dest_files=["res://.godot/imported/25-11-12-procedural-tree-lospec.png-73e5860701b216b9b13079fed1a6bfb5.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bwubigf4fgyo8"
path="res://.godot/imported/02.png-89cf67da19c7359965ab5dceddda9fc3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/effects/02.png"
dest_files=["res://.godot/imported/02.png-89cf67da19c7359965ab5dceddda9fc3.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 966 B

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cdu6dt7clh5o2"
path="res://.godot/imported/25-11-12-pdm-endesga-32-0.png-9d9e40a72c70685bea59a928e1224f72.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/enemies/25-11-12-pdm-endesga-32-0.png"
dest_files=["res://.godot/imported/25-11-12-pdm-endesga-32-0.png-9d9e40a72c70685bea59a928e1224f72.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dpq20rryss8we"
path="res://.godot/imported/25-11-12-pdm-endesga-32-0_scaled_3x_pngcrushed.png-9b0f0ae891242f89e08f9d32efa8ec5a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/enemies/25-11-12-pdm-endesga-32-0_scaled_3x_pngcrushed.png"
dest_files=["res://.godot/imported/25-11-12-pdm-endesga-32-0_scaled_3x_pngcrushed.png-9b0f0ae891242f89e08f9d32efa8ec5a.ctex"]
[params]
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
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
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dr3rp5hv7rexv"
path="res://.godot/imported/Player Idle 48x48.png-ce364c251291af8d74a9d090870933db.ctex"
path="res://.godot/imported/Player Idle 48x48.png-381e508f88edf25243cab356c0fbe31c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/animations/player_idle/Player Idle 48x48.png"
dest_files=["res://.godot/imported/Player Idle 48x48.png-ce364c251291af8d74a9d090870933db.ctex"]
source_file="res://graphics/animations/Player Idle 48x48.png"
dest_files=["res://.godot/imported/Player Idle 48x48.png-381e508f88edf25243cab356c0fbe31c.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bnnj3lw3souky"
path="res://.godot/imported/Player Punch 64x64(1).png-21e9b35df29fd6c8a7a80d12959ef6f1.ctex"
path="res://.godot/imported/Player Punch 64x64(1).png-49ed0f463d46ab2b5187d2030394d84a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/animations/player_punch/Player Punch 64x64(1).png"
dest_files=["res://.godot/imported/Player Punch 64x64(1).png-21e9b35df29fd6c8a7a80d12959ef6f1.ctex"]
source_file="res://graphics/animations/Player Punch 64x64(1).png"
dest_files=["res://.godot/imported/Player Punch 64x64(1).png-49ed0f463d46ab2b5187d2030394d84a.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dadvc8tsvmkb6"
path="res://.godot/imported/Player Running Shooting 48x48.png-68f72d81718d4b85ab3a5c6086bbc4ac.ctex"
path="res://.godot/imported/Player Running Shooting 48x48.png-1a559df7db6d3e522b49a674319d83ae.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/animations/player_shoot/Player Running Shooting 48x48.png"
dest_files=["res://.godot/imported/Player Running Shooting 48x48.png-68f72d81718d4b85ab3a5c6086bbc4ac.ctex"]
source_file="res://graphics/animations/Player Running Shooting 48x48.png"
dest_files=["res://.godot/imported/Player Running Shooting 48x48.png-1a559df7db6d3e522b49a674319d83ae.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 1021 B

After

Width:  |  Height:  |  Size: 1021 B

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://uxdt2cgxicmt"
path="res://.godot/imported/player jump 48x48.png-860e6d4e475038c941b8060a67a2fe2c.ctex"
path="res://.godot/imported/player jump 48x48.png-ac06435e7566ccee5ff27def894632a8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/animations/player_jump/player jump 48x48.png"
dest_files=["res://.godot/imported/player jump 48x48.png-860e6d4e475038c941b8060a67a2fe2c.ctex"]
source_file="res://graphics/animations/player jump 48x48.png"
dest_files=["res://.godot/imported/player jump 48x48.png-ac06435e7566ccee5ff27def894632a8.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://8esdepvbc2c6"
path="res://.godot/imported/player land 48x48.png-e731ec47c86ee7e3aba956810beee3d3.ctex"
path="res://.godot/imported/player land 48x48.png-5b66cd46c74a28df58237c3a87d5d801.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/animations/player_land/player land 48x48.png"
dest_files=["res://.godot/imported/player land 48x48.png-e731ec47c86ee7e3aba956810beee3d3.ctex"]
source_file="res://graphics/animations/player land 48x48.png"
dest_files=["res://.godot/imported/player land 48x48.png-5b66cd46c74a28df58237c3a87d5d801.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cmng5hu2bk4v6"
path="res://.godot/imported/player new jump 48x48.png-9576695c05f6dc27164583cbb76bf6b6.ctex"
path="res://.godot/imported/player new jump 48x48.png-53322daf9a7ca2b5c05dd0fca1413903.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/animations/player_jump/player new jump 48x48.png"
dest_files=["res://.godot/imported/player new jump 48x48.png-9576695c05f6dc27164583cbb76bf6b6.ctex"]
source_file="res://graphics/animations/player new jump 48x48.png"
dest_files=["res://.godot/imported/player new jump 48x48.png-53322daf9a7ca2b5c05dd0fca1413903.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bgp8oow6hgh5o"
path="res://.godot/imported/player run 48x48.png-11b1fb3ada55354e6bf57b808f569dbf.ctex"
path="res://.godot/imported/player run 48x48.png-1c1aa897dbd179bd3eaa4182702eff10.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/animations/player_run/player run 48x48.png"
dest_files=["res://.godot/imported/player run 48x48.png-11b1fb3ada55354e6bf57b808f569dbf.ctex"]
source_file="res://graphics/animations/player run 48x48.png"
dest_files=["res://.godot/imported/player run 48x48.png-1c1aa897dbd179bd3eaa4182702eff10.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://crll0t2wjtsly"
path="res://.godot/imported/player shoot 2H 48x48.png-f44ee215894e9efb0ebe089c14b9f0c6.ctex"
path="res://.godot/imported/player shoot 2H 48x48.png-0d9f1ff6c2c832dd5172f205c1c94a24.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/animations/player_shoot/player shoot 2H 48x48.png"
dest_files=["res://.godot/imported/player shoot 2H 48x48.png-f44ee215894e9efb0ebe089c14b9f0c6.ctex"]
source_file="res://graphics/animations/player shoot 2H 48x48.png"
dest_files=["res://.godot/imported/player shoot 2H 48x48.png-0d9f1ff6c2c832dd5172f205c1c94a24.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 345 B

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cxhbqd7yunb5o"
path="res://.godot/imported/25-10-17-sky-background-godot-course-.png-eaa5202c6ae16384f3b1b249edc79b83.ctex"
path="res://.godot/imported/25-10-17-sky-background-godot-course-.png-685fa7996ddecb251040f01e513b1230.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/backgrounds/25-10-17-sky-background-godot-course-.png"
dest_files=["res://.godot/imported/25-10-17-sky-background-godot-course-.png-eaa5202c6ae16384f3b1b249edc79b83.ctex"]
source_file="res://graphics/backgrounds/25-10-17-sky-background-godot-course-.png"
dest_files=["res://.godot/imported/25-10-17-sky-background-godot-course-.png-685fa7996ddecb251040f01e513b1230.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://kos0kjk46ooe"
path="res://.godot/imported/25-10-17-trees-background-godot-course-v1.png-86a3f2fed3952417fbf9b831338c8b07.ctex"
path="res://.godot/imported/25-10-17-trees-background-godot-course-v1.png-e24962b00bc87724fb0949f83ef73b02.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/backgrounds/25-10-17-trees-background-godot-course-v1.png"
dest_files=["res://.godot/imported/25-10-17-trees-background-godot-course-v1.png-86a3f2fed3952417fbf9b831338c8b07.ctex"]
source_file="res://graphics/backgrounds/25-10-17-trees-background-godot-course-v1.png"
dest_files=["res://.godot/imported/25-10-17-trees-background-godot-course-v1.png-e24962b00bc87724fb0949f83ef73b02.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bxx6s82ck7kch"
path="res://.godot/imported/forestbackground.png-f84b590d20143b6e2c8a82165c029463.ctex"
path="res://.godot/imported/forestbackground.png-c62d472b3b61aefff531c569ed496c04.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/backgrounds/forestbackground.png"
dest_files=["res://.godot/imported/forestbackground.png-f84b590d20143b6e2c8a82165c029463.ctex"]
source_file="res://graphics/backgrounds/forestbackground.png"
dest_files=["res://.godot/imported/forestbackground.png-c62d472b3b61aefff531c569ed496c04.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://rejfd2gqjk7w"
path="res://.godot/imported/14.png-a19bb542931254ce1789d15b7e2b57a0.ctex"
path="res://.godot/imported/bullet.png-997b4cba14ff93efa21eb83dfc31cdfe.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/effects/14.png"
dest_files=["res://.godot/imported/14.png-a19bb542931254ce1789d15b7e2b57a0.ctex"]
source_file="res://graphics/effects/bullet.png"
dest_files=["res://.godot/imported/bullet.png-997b4cba14ff93efa21eb83dfc31cdfe.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dnhgsb5qqmrmr"
path="res://.godot/imported/explosion.png-74059f1463ea3a3c344e1493e2e54c7a.ctex"
path="res://.godot/imported/explosion.png-67838f4909472368e8b1165eafa79d8a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/effects/explosion.png"
dest_files=["res://.godot/imported/explosion.png-74059f1463ea3a3c344e1493e2e54c7a.ctex"]
source_file="res://graphics/effects/explosion.png"
dest_files=["res://.godot/imported/explosion.png-67838f4909472368e8b1165eafa79d8a.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 384 B

After

Width:  |  Height:  |  Size: 384 B

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://b8g3n1anbx0j"
path="res://.godot/imported/orb_red.png-c4b55d2a0c0b918a628a3d6c2f938a7a.ctex"
path="res://.godot/imported/orb_red.png-96d2144e68a7a46da9f571d0443165d8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/effects/orb_red.png"
dest_files=["res://.godot/imported/orb_red.png-c4b55d2a0c0b918a628a3d6c2f938a7a.ctex"]
source_file="res://graphics/effects/orb_red.png"
dest_files=["res://.godot/imported/orb_red.png-96d2144e68a7a46da9f571d0443165d8.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 908 B

After

Width:  |  Height:  |  Size: 908 B

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://wgf50h6hbeib"
path="res://.godot/imported/slime_green(1).png-498dde7686bcfa571faf15d7e1143a1d.ctex"
path="res://.godot/imported/slime_green.png-5465ec1b559c454faabc599e0b746844.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/enemies/slime_green(1).png"
dest_files=["res://.godot/imported/slime_green(1).png-498dde7686bcfa571faf15d7e1143a1d.ctex"]
source_file="res://graphics/enemies/slime_green.png"
dest_files=["res://.godot/imported/slime_green.png-5465ec1b559c454faabc599e0b746844.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 686 B

After

Width:  |  Height:  |  Size: 686 B

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://d1tnil82cldxk"
path="res://.godot/imported/25-10-27-small-crate.png-c2a6b3f0b5dba0666d23950c2f72fb4d.ctex"
path="res://.godot/imported/25-10-27-small-crate.png-2ac8da16d97759b258fcf96245f3d88c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/objects/25-10-27-small-crate.png"
dest_files=["res://.godot/imported/25-10-27-small-crate.png-c2a6b3f0b5dba0666d23950c2f72fb4d.ctex"]
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]

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://7jy7xuy24fug"
path="res://.godot/imported/crate-100-custom.png-58001ae2c569374c77eb17b4d3a5451c.ctex"
path="res://.godot/imported/crate-100-custom.png-c94c99c951701ff4b74d28ec204bb2e5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/tiles/crate-100-custom.png"
dest_files=["res://.godot/imported/crate-100-custom.png-58001ae2c569374c77eb17b4d3a5451c.ctex"]
source_file="res://graphics/objects/crate-100-custom.png"
dest_files=["res://.godot/imported/crate-100-custom.png-c94c99c951701ff4b74d28ec204bb2e5.ctex"]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://ctrmx80fc52bt"
path="res://.godot/imported/mushroom_32x64.png-7731b65b1dc54e5863304a957e8ec2b4.ctex"
path="res://.godot/imported/mushroom_32x64.png-ae0508fa0fd752d4aa1446b33c7066d4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/objects/mushroom_32x64.png"
dest_files=["res://.godot/imported/mushroom_32x64.png-7731b65b1dc54e5863304a957e8ec2b4.ctex"]
source_file="res://graphics/objects/mushroom_32x64.png"
dest_files=["res://.godot/imported/mushroom_32x64.png-ae0508fa0fd752d4aa1446b33c7066d4.ctex"]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bpf0sbb3o6rch"
path="res://.godot/imported/veg_32x32.png-f210a94dadf52a8e7bdd0836116d4949.ctex"
path="res://.godot/imported/veg_32x32.png-742a28d4fd61b9f915a41209e1c74506.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/objects/veg_32x32.png"
dest_files=["res://.godot/imported/veg_32x32.png-f210a94dadf52a8e7bdd0836116d4949.ctex"]
source_file="res://graphics/objects/veg_32x32.png"
dest_files=["res://.godot/imported/veg_32x32.png-742a28d4fd61b9f915a41209e1c74506.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 500 B

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://b3i7e40h88wh0"
path="res://.godot/imported/coin(1).png-4e17ac56b4a7efad58e8429a46970c4b.ctex"
path="res://.godot/imported/coin.png-b04a16f8896ddd41f884de642ba05be4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/pickups/coin(1).png"
dest_files=["res://.godot/imported/coin(1).png-4e17ac56b4a7efad58e8429a46970c4b.ctex"]
source_file="res://graphics/pickups/coin.png"
dest_files=["res://.godot/imported/coin.png-b04a16f8896ddd41f884de642ba05be4.ctex"]
[params]

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cf3dxavo2u8yg"
path="res://.godot/imported/25-10-18-godot-course-Terrain (32x32).png-08aa6c4b4e90f7173ebf8ae7542815de.ctex"
path="res://.godot/imported/25-10-18-godot-course-Terrain (32x32).png-1eca331acd097d05bf84af75ec5522af.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/tiles/25-10-18-godot-course-Terrain (32x32).png"
dest_files=["res://.godot/imported/25-10-18-godot-course-Terrain (32x32).png-08aa6c4b4e90f7173ebf8ae7542815de.ctex"]
source_file="res://graphics/tiles/25-10-18-godot-course-Terrain (32x32).png"
dest_files=["res://.godot/imported/25-10-18-godot-course-Terrain (32x32).png-1eca331acd097d05bf84af75ec5522af.ctex"]
[params]

View File

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dkco6bp2yelei"
path="res://.godot/imported/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png-c54060a49ca0aab57967ba22422c82ca.ctex"
path="res://.godot/imported/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png-a7f4ab763f4d056bc60508fae2c91a2e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/tiles/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png"
dest_files=["res://.godot/imported/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png-c54060a49ca0aab57967ba22422c82ca.ctex"]
source_file="res://graphics/tiles/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png"
dest_files=["res://.godot/imported/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png-a7f4ab763f4d056bc60508fae2c91a2e.ctex"]
[params]

View File

@ -22,28 +22,21 @@ GameController="*res://scripts/game_controller.gd"
[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]
folder_colors={
"res://assets/": "red",
"res://assets/graphics/": "green",
"res://resources/": "orange",
"res://scenes/": "gray",
"res://scenes/levels/": "teal",
"res://scripts/": "purple"
"res://graphics/": "green",
"res://resources/": "yellow",
"res://scenes/": "pink",
"res://scripts/": "orange"
}
[global_group]
Destructable="Objects in the environment that can be destroyed"
Movable="Objects in the environment that can be moved"
[input]
move_left={
@ -65,35 +58,21 @@ move_right={
jump={
"deadzone": 0.2,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"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":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
]
}
punch={
shove={
"deadzone": 0.2,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":true,"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":4194306,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
shoot={
"deadzone": 0.2,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":true,"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":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
]
}
throw={
"deadzone": 0.2,
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":3,"pressure":0.0,"pressed":true,"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":84,"key_label":0,"unicode":116,"location":0,"echo":false,"script":null)
]
}
save={
"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":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
]
}
load={
"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":76,"key_label":0,"unicode":108,"location":0,"echo":false,"script":null)
]
}
@ -103,7 +82,6 @@ load={
2d_physics/layer_2="environment"
2d_physics/layer_3="objects"
2d_physics/layer_4="weapons"
2d_physics/layer_5="enemies"
[rendering]

View File

@ -1,23 +0,0 @@
[gd_resource type="Resource" script_class="SaveObject" load_steps=2 format=3]
[ext_resource type="Script" path="res://resources/save_object.gd" id="1_nw6bo"]
[resource]
script = ExtResource("1_nw6bo")
game_save = {
"coins_data": [Transform2D(1, 0, 0, 1, -49, 84)],
"crates_data": [Transform2D(1, -3.03574e-08, 3.03574e-08, 1, -7.00035, -150.7), Transform2D(1, 2.63991e-08, -2.63991e-08, 1, 431, -182.7), Transform2D(1, -4.29147e-06, 4.29147e-06, 1, 229, -118.896), Transform2D(1, -1.26875e-09, 1.26875e-09, 1, -86.7, 73.3)],
"enemies_data": [{
"damage": 13,
"health": 50,
"position": Transform2D(1, 0, 0, 1, 628.596, 86)
}, {
"damage": 11,
"health": 50,
"position": Transform2D(1, 0, 0, 1, 452.595, 85)
}],
"player_data": {
"health": 100,
"position": Transform2D(1, 0, 0, 1, -239.358, -79.0662)
}
}

View File

@ -1,23 +0,0 @@
[gd_resource type="Resource" script_class="SaveObject" load_steps=2 format=3 uid="uid://de8xlgedtvofp"]
[ext_resource type="Script" uid="uid://dvx254gud8f6o" path="res://resources/save_object.gd" id="1_vh4bs"]
[resource]
script = ExtResource("1_vh4bs")
game_save = {
"coins_data": [Transform2D(1, 0, 0, 1, -266, -76), Transform2D(1, 0, 0, 1, -49, 84)],
"crates_data": [Transform2D(1, 3.37456e-08, -3.37456e-08, 1, -433, -150.7), Transform2D(1, -1.92227e-08, 1.92227e-08, 1, 623, 41.3), Transform2D(1, -2.35872e-08, 2.35872e-08, 1, 226, 105.3), Transform2D(1, 1.78338e-08, -1.78338e-08, 1, -146, -118.7)],
"enemies_data": [{
"damage": 8,
"health": 50,
"position": Transform2D(1, 0, 0, 1, 814.679, 86)
}, {
"damage": 13,
"health": 50,
"position": Transform2D(1, 0, 0, 1, 638.677, 85)
}],
"player_data": {
"health": 100,
"position": Transform2D(1, 0, 0, 1, 209.472, -111.066)
}
}

View File

@ -1,17 +0,0 @@
shader_type canvas_item;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec4 existing_color = texture(TEXTURE, UV);
vec3 grayscale_color = vec3((existing_color.r + existing_color.g + existing_color.b)/3.0);
COLOR.rgb = grayscale_color;
COLOR.a = existing_color.a;
}
//void light() {
// // Called for every pixel for every light affecting the CanvasItem.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@ -1 +0,0 @@
uid://cscv7pfpe58i3

View File

@ -1,20 +0,0 @@
shader_type canvas_item;
uniform sampler2D gradient_texture;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec4 existing_color = texture(TEXTURE, UV);
float grayscale_value = (existing_color.r + existing_color.g + existing_color.b)/3.0;
vec4 new_color = texture(gradient_texture, vec2(grayscale_value));
COLOR.rgb = new_color.rgb;
COLOR.a = existing_color.a;
}
//void light() {
// // Called for every pixel for every light affecting the CanvasItem.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@ -1 +0,0 @@
uid://dy7od6pkkn6xp

View File

@ -1,4 +0,0 @@
class_name SaveObject
extends Resource
@export var game_save : Dictionary = {}

View File

@ -1 +0,0 @@
uid://dvx254gud8f6o

View File

@ -1,10 +1,10 @@
[gd_scene load_steps=4 format=3 uid="uid://cyy6jr7mxu0jl"]
[ext_resource type="Script" uid="uid://cb874g2gkrukb" path="res://scripts/bullet.gd" id="1_mkf8s"]
[ext_resource type="Texture2D" uid="uid://bwubigf4fgyo8" path="res://assets/graphics/effects/02.png" id="2_y25gk"]
[ext_resource type="Texture2D" uid="uid://rejfd2gqjk7w" path="res://graphics/effects/bullet.png" id="2_y25gk"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_h1aey"]
size = Vector2(4, 2)
size = Vector2(16, 20)
[node name="Bullet" type="Area2D"]
z_index = 100
@ -13,7 +13,9 @@ collision_mask = 22
script = ExtResource("1_mkf8s")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-1, 0)
shape = SubResource("RectangleShape2D_h1aey")
debug_color = Color(1, 0, 0, 1)
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.1, 0.1)

View File

@ -1,7 +1,7 @@
[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://assets/graphics/pickups/coin(1).png" id="1_rwqht"]
[ext_resource type="Texture2D" uid="uid://b3i7e40h88wh0" path="res://graphics/pickups/coin.png" id="1_rwqht"]
[sub_resource type="AtlasTexture" id="AtlasTexture_i64fm"]
atlas = ExtResource("1_rwqht")

19
scenes/crate.tscn Normal file
View File

@ -0,0 +1,19 @@
[gd_scene load_steps=3 format=3 uid="uid://dnarbab7jjqmk"]
[ext_resource type="Texture2D" uid="uid://7jy7xuy24fug" path="res://graphics/objects/crate-100-custom.png" id="1_b66cd"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uwrxv"]
size = Vector2(100, 100)
[node name="LargeCrate" type="RigidBody2D"]
collision_layer = 4
collision_mask = 15
metadata/_edit_group_ = true
[node name="Sprite2D" type="Sprite2D" parent="."]
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.87451, 0.231373, 0.654902, 0.0784314)

View File

@ -1,15 +1,13 @@
[gd_scene load_steps=23 format=4 uid="uid://cueixogtk70go"]
[gd_scene load_steps=21 format=4 uid="uid://cueixogtk70go"]
[ext_resource type="Script" uid="uid://djv8gud535in5" path="res://scripts/level.gd" id="1_excbq"]
[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://assets/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://assets/graphics/objects/veg_32x32.png" id="4_gee14"]
[ext_resource type="Texture2D" uid="uid://ctrmx80fc52bt" path="res://assets/graphics/objects/mushroom_32x64.png" id="5_0tnpc"]
[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://bcybxyumd2qwf" path="res://scenes/ui.tscn" id="10_2y5yt"]
[ext_resource type="PackedScene" uid="uid://bts74sqcd7k7h" path="res://scenes/slimer.tscn" id="10_vtaks"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"]
@ -413,7 +411,7 @@ texture_region_size = Vector2i(32, 32)
[sub_resource type="TileSet" id="TileSet_gee14"]
tile_size = Vector2i(32, 32)
physics_layer_0/collision_layer = 2
physics_layer_0/collision_mask = 29
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)
@ -453,8 +451,7 @@ seamless = true
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"]
[node name="Level1" type="Node2D"]
script = ExtResource("1_excbq")
[node name="Game" type="Node2D"]
[node name="SceneManager" type="Node2D" parent="."]
unique_name_in_owner = true
@ -512,21 +509,20 @@ position = Vector2(532, 62)
scale = Vector2(0.594276, 0.546575)
intent = "powerup"
[node name="Crates" type="Node" parent="." groups=["explodable", "punchable"]]
[node name="Crates" type="Node" parent="."]
[node name="SmallCrate" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_u5sy4")]
[node name="SmallCrate" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_u5sy4")]
z_index = 10
position = Vector2(-86, 25)
[node name="SmallCrate2" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_u5sy4")]
[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", "punchable"] instance=ExtResource("7_u5sy4")]
[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", "punchable"] instance=ExtResource("7_u5sy4")]
[node name="SmallCrate4" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_u5sy4")]
z_index = 10
position = Vector2(-7, -210)
@ -536,21 +532,13 @@ position = Vector2(-7, -210)
z_index = 5
position = Vector2(-49, 84)
[node name="Coin2" parent="Coins" instance=ExtResource("9_0tnpc")]
z_index = 5
position = Vector2(-317, 18)
[node name="Enemies" type="Node" parent="."]
[node name="Slimer" parent="Enemies" instance=ExtResource("10_vtaks")]
position = Vector2(-139, 69)
position = Vector2(-123, 85)
[node name="Slimer2" parent="Enemies" instance=ExtResource("10_vtaks")]
position = Vector2(28, 69)
[node name="UILayer" type="CanvasLayer" parent="."]
[node name="UI" parent="UILayer" instance=ExtResource("10_2y5yt")]
position = Vector2(53, 86)
[connection signal="body_entered" from="WorldBoundary" to="SceneManager" method="_on_world_boundary_body_entered"]
[connection signal="trigger_fired" from="Triggers/Trigger" to="." method="_on_trigger_fired"]

View File

@ -1,81 +1,12 @@
[gd_scene load_steps=46 format=3 uid="uid://x8y4fkj6fc2e"]
[gd_scene load_steps=38 format=3 uid="uid://x8y4fkj6fc2e"]
[ext_resource type="Script" uid="uid://cevjj6wpr5f8f" path="res://scripts/grenade.gd" id="1_cvyik"]
[ext_resource type="Texture2D" uid="uid://b8g3n1anbx0j" path="res://assets/graphics/effects/orb_red.png" id="2_wxtds"]
[ext_resource type="Texture2D" uid="uid://dnhgsb5qqmrmr" path="res://assets/graphics/effects/explosion.png" id="3_vhiwl"]
[ext_resource type="Texture2D" uid="uid://b8g3n1anbx0j" path="res://graphics/effects/orb_red.png" id="2_wxtds"]
[ext_resource type="Texture2D" uid="uid://dnhgsb5qqmrmr" path="res://graphics/effects/explosion.png" id="3_vhiwl"]
[sub_resource type="CircleShape2D" id="CircleShape2D_1xt3t"]
radius = 12.0
[sub_resource type="Shader" id="Shader_vhiwl"]
code = "shader_type canvas_item;
uniform sampler2D gradient_texture;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec4 existing_color = texture(TEXTURE, UV);
float grayscale_value = (existing_color.r + existing_color.g + existing_color.b)/3.0;
vec4 new_color = texture(gradient_texture, vec2(grayscale_value));
COLOR.rgb = new_color.rgb;
COLOR.a = existing_color.a;
}
//void light() {
// // Called for every pixel for every light affecting the CanvasItem.
// // Uncomment to replace the default light processing function with this one.
//}
"
[sub_resource type="Gradient" id="Gradient_76ndk"]
interpolation_mode = 1
offsets = PackedFloat32Array(0.146875, 0.265625, 0.384375)
colors = PackedColorArray(0.19215687, 0.1882353, 0.22745098, 1, 0.9607843, 0.85490197, 0.6509804, 1, 1, 1, 1, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_snp8f"]
gradient = SubResource("Gradient_76ndk")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_t0o0f"]
shader = SubResource("Shader_vhiwl")
shader_parameter/gradient_texture = SubResource("GradientTexture2D_snp8f")
[sub_resource type="Shader" id="Shader_76ndk"]
code = "shader_type canvas_item;
uniform sampler2D gradient_texture;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec4 existing_color = texture(TEXTURE, UV);
float grayscale_value = (existing_color.r + existing_color.g + existing_color.b)/3.0;
vec4 new_color = texture(gradient_texture, vec2(grayscale_value));
COLOR.rgb = new_color.rgb;
COLOR.a = existing_color.a;
}
//void light() {
// // Called for every pixel for every light affecting the CanvasItem.
// // Uncomment to replace the default light processing function with this one.
//}
"
[sub_resource type="Gradient" id="Gradient_snp8f"]
offsets = PackedFloat32Array(0.153125, 0.390625, 0.503125, 0.640625)
colors = PackedColorArray(0.19215687, 0.1882353, 0.22745098, 1, 0.2627451, 0.27450982, 0.4509804, 1, 0.99215686, 0.99607843, 0.53333336, 1, 1, 1, 1, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_t0o0f"]
gradient = SubResource("Gradient_snp8f")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_adlig"]
shader = SubResource("Shader_76ndk")
shader_parameter/gradient_texture = SubResource("GradientTexture2D_t0o0f")
[sub_resource type="AtlasTexture" id="AtlasTexture_6xeml"]
atlas = ExtResource("3_vhiwl")
region = Rect2(448, 192, 64, 64)
@ -316,20 +247,16 @@ contact_monitor = true
max_contacts_reported = 2
script = ExtResource("1_cvyik")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("2_wxtds")
offset = Vector2(0.37, 0.39)
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_1xt3t")
debug_color = Color(0.7488965, 0.6246863, 1.92523e-07, 1)
[node name="Sprite2D" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_t0o0f")
texture = ExtResource("2_wxtds")
offset = Vector2(0.37, 0.39)
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
material = SubResource("ShaderMaterial_adlig")
sprite_frames = SubResource("SpriteFrames_1exwd")
animation = &"explode"
frame = 31
frame_progress = 1.0
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View File

@ -1,20 +1,14 @@
[gd_scene load_steps=27 format=4 uid="uid://y34miorfoath"]
[gd_scene load_steps=21 format=4 uid="uid://y34miorfoath"]
[ext_resource type="Script" uid="uid://b84pdw14l6gb6" path="res://scripts/scene_manager.gd" id="1_6cvei"]
[ext_resource type="Script" uid="uid://djv8gud535in5" path="res://scripts/level.gd" id="1_nt80m"]
[ext_resource type="Shader" uid="uid://cscv7pfpe58i3" path="res://resources/level_2.gdshader" id="2_hey2k"]
[ext_resource type="Texture2D" uid="uid://dkco6bp2yelei" path="res://assets/graphics/tiles/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png" id="2_que50"]
[ext_resource type="Texture2D" uid="uid://bpf0sbb3o6rch" path="res://assets/graphics/objects/veg_32x32.png" id="3_hey2k"]
[ext_resource type="Texture2D" uid="uid://ctrmx80fc52bt" path="res://assets/graphics/objects/mushroom_32x64.png" id="4_172wr"]
[ext_resource type="Texture2D" uid="uid://dkco6bp2yelei" path="res://graphics/tiles/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png" id="2_que50"]
[ext_resource type="Texture2D" uid="uid://bpf0sbb3o6rch" path="res://graphics/objects/veg_32x32.png" id="3_hey2k"]
[ext_resource type="Texture2D" uid="uid://ctrmx80fc52bt" path="res://graphics/objects/mushroom_32x64.png" id="4_172wr"]
[ext_resource type="PackedScene" uid="uid://d3y1iqmpknpyo" path="res://scenes/player.tscn" id="5_g2hoc"]
[ext_resource type="PackedScene" uid="uid://2pp1gtlflav8" path="res://scenes/trigger.tscn" id="6_fldb1"]
[ext_resource type="PackedScene" uid="uid://yr1iqtid2ihb" path="res://scenes/small_crate.tscn" id="7_guvtl"]
[ext_resource type="PackedScene" uid="uid://31idmjadvk3t" path="res://scenes/coin.tscn" id="8_igmy8"]
[ext_resource type="PackedScene" uid="uid://bts74sqcd7k7h" path="res://scenes/slimer.tscn" id="9_wdtqu"]
[ext_resource type="PackedScene" uid="uid://bcybxyumd2qwf" path="res://scenes/ui.tscn" id="12_brxtv"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_172wr"]
shader = ExtResource("2_hey2k")
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"]
texture = ExtResource("2_que50")
@ -427,9 +421,6 @@ sources/0 = SubResource("TileSetAtlasSource_gee14")
sources/1 = SubResource("TileSetAtlasSource_0tnpc")
sources/2 = SubResource("TileSetAtlasSource_vtaks")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_que50"]
shader = ExtResource("2_hey2k")
[sub_resource type="Gradient" id="Gradient_iywne"]
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)
@ -445,9 +436,6 @@ color_ramp = SubResource("Gradient_iywne")
seamless = true
in_3d_space = true
[sub_resource type="ShaderMaterial" id="ShaderMaterial_hey2k"]
shader = ExtResource("2_hey2k")
[sub_resource type="Gradient" id="Gradient_p57ef"]
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)
@ -463,15 +451,13 @@ seamless = true
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"]
[node name="Level2" type="Node2D"]
script = ExtResource("1_nt80m")
[node name="Game" type="Node2D"]
[node name="SceneManager" type="Node2D" parent="."]
unique_name_in_owner = true
script = ExtResource("1_6cvei")
[node name="TileMapLayer" type="TileMapLayer" parent="."]
material = SubResource("ShaderMaterial_172wr")
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/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")
@ -485,7 +471,6 @@ metadata/_edit_lock_ = true
metadata/_edit_group_ = true
[node name="BackgroundSprite" type="Sprite2D" parent="Background"]
material = SubResource("ShaderMaterial_que50")
texture = SubResource("NoiseTexture2D_u5sy4")
[node name="Foreground" type="Parallax2D" parent="."]
@ -497,7 +482,6 @@ metadata/_edit_group_ = true
metadata/_edit_lock_ = true
[node name="ForegroundSprite" type="Sprite2D" parent="Foreground"]
material = SubResource("ShaderMaterial_hey2k")
texture = SubResource("NoiseTexture2D_iywne")
[node name="Player" parent="." instance=ExtResource("5_g2hoc")]
@ -525,21 +509,21 @@ position = Vector2(532, 62)
scale = Vector2(0.594276, 0.546575)
intent = "powerup"
[node name="Crates" type="Node" parent="." groups=["explodable", "punchable"]]
[node name="Crates" type="Node" parent="."]
[node name="SmallCrate" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_guvtl")]
[node name="SmallCrate" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_guvtl")]
z_index = 10
position = Vector2(-146, -162)
[node name="SmallCrate2" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_guvtl")]
[node name="SmallCrate2" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_guvtl")]
z_index = 10
position = Vector2(226, 60)
[node name="SmallCrate3" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_guvtl")]
[node name="SmallCrate3" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_guvtl")]
z_index = 10
position = Vector2(623, 7)
[node name="SmallCrate4" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_guvtl")]
[node name="SmallCrate4" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_guvtl")]
z_index = 10
position = Vector2(-433, -201)
@ -560,17 +544,10 @@ position = Vector2(-18, -140)
[node name="Enemies" type="Node" parent="."]
[node name="Slimer" parent="Enemies" instance=ExtResource("9_wdtqu")]
position = Vector2(-141, 68)
position = Vector2(-123, 85)
[node name="Slimer2" parent="Enemies" instance=ExtResource("9_wdtqu")]
position = Vector2(410, 4)
[node name="Slimer3" parent="Enemies" instance=ExtResource("9_wdtqu")]
position = Vector2(-18, -156)
[node name="UILayer" type="CanvasLayer" parent="."]
[node name="UI" parent="UILayer" instance=ExtResource("12_brxtv")]
position = Vector2(53, 86)
[connection signal="body_entered" from="WorldBoundary" to="SceneManager" method="_on_world_boundary_body_entered"]
[connection signal="trigger_fired" from="Triggers/Trigger" to="." method="_on_trigger_fired"]

View File

@ -1,29 +1,14 @@
[gd_scene load_steps=32 format=4 uid="uid://csmari5rsi31l"]
[gd_scene load_steps=21 format=4 uid="uid://csmari5rsi31l"]
[ext_resource type="Script" uid="uid://b84pdw14l6gb6" path="res://scripts/scene_manager.gd" id="1_ha73p"]
[ext_resource type="Script" uid="uid://djv8gud535in5" path="res://scripts/level.gd" id="1_n6eey"]
[ext_resource type="Shader" uid="uid://dy7od6pkkn6xp" path="res://resources/level_3.gdshader" id="2_56dhn"]
[ext_resource type="Texture2D" uid="uid://dkco6bp2yelei" path="res://assets/graphics/tiles/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png" id="2_vcx5n"]
[ext_resource type="Texture2D" uid="uid://bpf0sbb3o6rch" path="res://assets/graphics/objects/veg_32x32.png" id="3_56dhn"]
[ext_resource type="Texture2D" uid="uid://ctrmx80fc52bt" path="res://assets/graphics/objects/mushroom_32x64.png" id="4_ax3dk"]
[ext_resource type="Texture2D" uid="uid://dkco6bp2yelei" path="res://graphics/tiles/25-10-26-godot-course-Terrain (32x32)-color-exchange-1.png" id="2_vcx5n"]
[ext_resource type="Texture2D" uid="uid://bpf0sbb3o6rch" path="res://graphics/objects/veg_32x32.png" id="3_56dhn"]
[ext_resource type="Texture2D" uid="uid://ctrmx80fc52bt" path="res://graphics/objects/mushroom_32x64.png" id="4_ax3dk"]
[ext_resource type="PackedScene" uid="uid://d3y1iqmpknpyo" path="res://scenes/player.tscn" id="5_q2dsb"]
[ext_resource type="PackedScene" uid="uid://2pp1gtlflav8" path="res://scenes/trigger.tscn" id="6_p3r0x"]
[ext_resource type="PackedScene" uid="uid://yr1iqtid2ihb" path="res://scenes/small_crate.tscn" id="7_5xqnf"]
[ext_resource type="PackedScene" uid="uid://31idmjadvk3t" path="res://scenes/coin.tscn" id="8_una4e"]
[ext_resource type="PackedScene" uid="uid://bts74sqcd7k7h" path="res://scenes/slimer.tscn" id="9_ema3p"]
[ext_resource type="PackedScene" uid="uid://bcybxyumd2qwf" path="res://scenes/ui.tscn" id="12_qi5uv"]
[sub_resource type="Gradient" id="Gradient_vcx5n"]
interpolation_mode = 1
offsets = PackedFloat32Array(0.1625, 0.34375, 0.56875, 0.6625, 0.775)
colors = PackedColorArray(0.2028, 0.182, 0.26, 1, 0.3705, 0.57, 0.473575, 1, 0.1953, 0.535815, 0.63, 1, 0.51, 0.3468, 0.46648, 1, 0.664863, 0.67, 0.3618, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_56dhn"]
gradient = SubResource("Gradient_vcx5n")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ax3dk"]
shader = ExtResource("2_56dhn")
shader_parameter/gradient_texture = SubResource("GradientTexture2D_56dhn")
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"]
texture = ExtResource("2_vcx5n")
@ -436,42 +421,6 @@ sources/0 = SubResource("TileSetAtlasSource_gee14")
sources/1 = SubResource("TileSetAtlasSource_0tnpc")
sources/2 = SubResource("TileSetAtlasSource_vtaks")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_vcx5n"]
[sub_resource type="Shader" id="Shader_56dhn"]
code = "shader_type canvas_item;
uniform sampler2D gradient_texture;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec4 existing_color = texture(TEXTURE, UV);
float grayscale_value = (existing_color.r + existing_color.g + existing_color.b)/3.0;
vec4 new_color = texture(gradient_texture, vec2(grayscale_value));
COLOR.rgb = new_color.rgb;
COLOR.a = existing_color.a;
}
//void light() {
// // Called for every pixel for every light affecting the CanvasItem.
// // Uncomment to replace the default light processing function with this one.
//}
"
[sub_resource type="Gradient" id="Gradient_56dhn"]
offsets = PackedFloat32Array(0.14375, 0.6125)
colors = PackedColorArray(0.192157, 0.188235, 0.227451, 1, 0.960784, 0.854902, 0.65098, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_ax3dk"]
gradient = SubResource("Gradient_56dhn")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_q2dsb"]
shader = SubResource("Shader_56dhn")
shader_parameter/gradient_texture = SubResource("GradientTexture2D_ax3dk")
[sub_resource type="Gradient" id="Gradient_iywne"]
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)
@ -502,22 +451,19 @@ seamless = true
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"]
[node name="Level3" type="Node2D"]
script = ExtResource("1_n6eey")
[node name="Game" type="Node2D"]
[node name="SceneManager" type="Node2D" parent="."]
unique_name_in_owner = true
script = ExtResource("1_ha73p")
[node name="TileMapLayer" type="TileMapLayer" parent="."]
material = SubResource("ShaderMaterial_ax3dk")
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/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
material = SubResource("ShaderMaterial_vcx5n")
scroll_scale = Vector2(0.5, 0.5)
repeat_size = Vector2(512, 512)
repeat_times = 3
@ -525,7 +471,6 @@ metadata/_edit_lock_ = true
metadata/_edit_group_ = true
[node name="BackgroundSprite" type="Sprite2D" parent="Background"]
material = SubResource("ShaderMaterial_q2dsb")
texture = SubResource("NoiseTexture2D_u5sy4")
[node name="Foreground" type="Parallax2D" parent="."]
@ -564,20 +509,20 @@ position = Vector2(532, 62)
scale = Vector2(0.594276, 0.546575)
intent = "powerup"
[node name="Crates" type="Node" parent="." groups=["explodable", "punchable"]]
[node name="Crates" type="Node" parent="."]
[node name="SmallCrate" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_5xqnf")]
[node name="SmallCrate" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_5xqnf")]
z_index = 10
[node name="SmallCrate2" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_5xqnf")]
[node name="SmallCrate2" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_5xqnf")]
z_index = 10
position = Vector2(216, 52)
[node name="SmallCrate3" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_5xqnf")]
[node name="SmallCrate3" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_5xqnf")]
z_index = 10
position = Vector2(-253, 10)
[node name="SmallCrate4" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_5xqnf")]
[node name="SmallCrate4" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("7_5xqnf")]
z_index = 10
position = Vector2(-82, -5)
@ -610,20 +555,10 @@ position = Vector2(402, 21)
[node name="Enemies" type="Node" parent="."]
[node name="Slimer" parent="Enemies" instance=ExtResource("9_ema3p")]
position = Vector2(-131, 69)
position = Vector2(-123, 85)
[node name="Slimer2" parent="Enemies" instance=ExtResource("9_ema3p")]
position = Vector2(377, 4)
[node name="Slimer3" parent="Enemies" instance=ExtResource("9_ema3p")]
position = Vector2(428, -187)
[node name="Slimer4" parent="Enemies" instance=ExtResource("9_ema3p")]
position = Vector2(-35, -156)
[node name="UILayer" type="CanvasLayer" parent="."]
[node name="UI" parent="UILayer" instance=ExtResource("12_qi5uv")]
position = Vector2(53, 86)
[connection signal="body_entered" from="WorldBoundary" to="SceneManager" method="_on_world_boundary_body_entered"]
[connection signal="trigger_fired" from="Triggers/Trigger" to="." method="_on_trigger_fired"]

View File

@ -1,116 +1,22 @@
[gd_scene load_steps=76 format=3 uid="uid://d3y1iqmpknpyo"]
[gd_scene load_steps=57 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://assets/graphics/animations/player_idle/Player Idle 48x48.png" id="2_g2els"]
[ext_resource type="Texture2D" uid="uid://dcrb23f006glc" path="res://assets/graphics/animations/player_death/Player Death 64x64.png" id="2_ur7pv"]
[ext_resource type="Texture2D" uid="uid://uxdt2cgxicmt" path="res://assets/graphics/animations/player_jump/player jump 48x48.png" id="3_dqkch"]
[ext_resource type="Texture2D" uid="uid://cr8wqcakbcjnl" path="res://assets/graphics/animations/player_hurt/Player Hurt 48x48.png" id="3_smehm"]
[ext_resource type="Texture2D" uid="uid://b27fd4xvrp2ov" path="res://assets/graphics/animations/Player Jab 48x48.png" id="4_fjrip"]
[ext_resource type="Texture2D" uid="uid://bgp8oow6hgh5o" path="res://assets/graphics/animations/player_run/player run 48x48.png" id="4_qlg0r"]
[ext_resource type="Texture2D" uid="uid://dadvc8tsvmkb6" path="res://assets/graphics/animations/player_shoot/Player Running Shooting 48x48.png" id="5_tuyoq"]
[ext_resource type="Texture2D" uid="uid://crll0t2wjtsly" path="res://assets/graphics/animations/player_shoot/player shoot 2H 48x48.png" id="6_fjrip"]
[ext_resource type="Texture2D" uid="uid://dr3rp5hv7rexv" path="res://graphics/animations/Player Idle 48x48.png" id="2_g2els"]
[ext_resource type="Texture2D" uid="uid://uxdt2cgxicmt" path="res://graphics/animations/player jump 48x48.png" id="3_dqkch"]
[ext_resource type="Texture2D" uid="uid://bnnj3lw3souky" path="res://graphics/animations/Player Punch 64x64(1).png" id="4_fjrip"]
[ext_resource type="Texture2D" uid="uid://bgp8oow6hgh5o" path="res://graphics/animations/player run 48x48.png" id="4_qlg0r"]
[ext_resource type="Texture2D" uid="uid://dadvc8tsvmkb6" path="res://graphics/animations/Player Running Shooting 48x48.png" id="5_tuyoq"]
[ext_resource type="Texture2D" uid="uid://crll0t2wjtsly" path="res://graphics/animations/player shoot 2H 48x48.png" id="6_fjrip"]
[ext_resource type="Script" uid="uid://bo1v353uh33hx" path="res://scenes/state_machine.gd" id="8_smehm"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_3vyb7"]
radius = 6.0
height = 32.0
[sub_resource type="Shader" id="Shader_fjrip"]
code = "shader_type canvas_item;
uniform sampler2D gradient_texture;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec4 existing_color = texture(TEXTURE, UV);
float grayscale_value = (existing_color.r + existing_color.g + existing_color.b)/3.0;
vec4 new_color = texture(gradient_texture, vec2(grayscale_value));
COLOR.rgb = new_color.rgb;
COLOR.a = existing_color.a;
}
//void light() {
// // Called for every pixel for every light affecting the CanvasItem.
// // Uncomment to replace the default light processing function with this one.
//}
"
[sub_resource type="Gradient" id="Gradient_smehm"]
interpolation_mode = 1
offsets = PackedFloat32Array(0.2, 0.39375, 0.66875)
colors = PackedColorArray(0.1476, 0.31398, 0.36, 1, 0.372549, 0.784314, 0.901961, 1, 0.992157, 0.996078, 0.533333, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_ur7pv"]
gradient = SubResource("Gradient_smehm")
fill = 1
repeat = 1
[sub_resource type="ShaderMaterial" id="ShaderMaterial_y4r1p"]
shader = SubResource("Shader_fjrip")
shader_parameter/gradient_texture = SubResource("GradientTexture2D_ur7pv")
[sub_resource type="AtlasTexture" id="AtlasTexture_lxlsd"]
atlas = ExtResource("2_ur7pv")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_ha2mi"]
atlas = ExtResource("2_ur7pv")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_apa73"]
atlas = ExtResource("2_ur7pv")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_74r1k"]
atlas = ExtResource("2_ur7pv")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_8svfe"]
atlas = ExtResource("2_ur7pv")
region = Rect2(192, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_2a3c5"]
atlas = ExtResource("2_ur7pv")
region = Rect2(240, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_42b1b"]
atlas = ExtResource("2_ur7pv")
region = Rect2(288, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_h7ic4"]
atlas = ExtResource("2_ur7pv")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_au7lq"]
atlas = ExtResource("2_ur7pv")
region = Rect2(384, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_nubpm"]
atlas = ExtResource("2_ur7pv")
region = Rect2(432, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_oprun"]
atlas = ExtResource("3_dqkch")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_j2b1d"]
atlas = ExtResource("3_smehm")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_cs1tg"]
atlas = ExtResource("3_smehm")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_2gdjj"]
atlas = ExtResource("3_smehm")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_sc3ue"]
atlas = ExtResource("3_smehm")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
atlas = ExtResource("2_g2els")
region = Rect2(0, 0, 48, 48)
@ -157,43 +63,35 @@ region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_2dvfe"]
atlas = ExtResource("4_fjrip")
region = Rect2(0, 0, 48, 48)
region = Rect2(0, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_giy8y"]
atlas = ExtResource("4_fjrip")
region = Rect2(48, 0, 48, 48)
region = Rect2(64, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_fdfoy"]
atlas = ExtResource("4_fjrip")
region = Rect2(96, 0, 48, 48)
region = Rect2(128, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_hhpqf"]
atlas = ExtResource("4_fjrip")
region = Rect2(144, 0, 48, 48)
region = Rect2(192, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_g5jhy"]
atlas = ExtResource("4_fjrip")
region = Rect2(192, 0, 48, 48)
region = Rect2(256, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_holxr"]
atlas = ExtResource("4_fjrip")
region = Rect2(240, 0, 48, 48)
region = Rect2(320, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_mx1m4"]
atlas = ExtResource("4_fjrip")
region = Rect2(288, 0, 48, 48)
region = Rect2(384, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_4gjji"]
atlas = ExtResource("4_fjrip")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_u2ulf"]
atlas = ExtResource("4_fjrip")
region = Rect2(384, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_6e8lb"]
atlas = ExtResource("4_fjrip")
region = Rect2(432, 0, 48, 48)
region = Rect2(448, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_a8ls1"]
atlas = ExtResource("4_qlg0r")
@ -227,6 +125,10 @@ region = Rect2(288, 0, 48, 48)
atlas = ExtResource("4_qlg0r")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_f1ej7"]
atlas = ExtResource("5_tuyoq")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_l71n6"]
atlas = ExtResource("5_tuyoq")
region = Rect2(48, 0, 48, 48)
@ -255,10 +157,6 @@ region = Rect2(288, 0, 48, 48)
atlas = ExtResource("5_tuyoq")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_f1ej7"]
atlas = ExtResource("5_tuyoq")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_wnwbv"]
atlas = ExtResource("6_fjrip")
region = Rect2(0, 0, 48, 48)
@ -291,45 +189,18 @@ region = Rect2(288, 0, 48, 48)
atlas = ExtResource("6_fjrip")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_j2b1d"]
atlas = ExtResource("6_fjrip")
region = Rect2(384, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_cs1tg"]
atlas = ExtResource("6_fjrip")
region = Rect2(432, 0, 48, 48)
[sub_resource type="SpriteFrames" id="SpriteFrames_3vyb7"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_lxlsd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ha2mi")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_apa73")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_74r1k")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8svfe")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2a3c5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_42b1b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_h7ic4")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_au7lq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_nubpm")
}],
"loop": false,
"name": &"die",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_oprun")
}],
"loop": true,
@ -338,23 +209,6 @@ animations = [{
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_j2b1d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_cs1tg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2gdjj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_sc3ue")
}],
"loop": false,
"name": &"hurt",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qhqgy")
}, {
"duration": 1.0,
@ -420,12 +274,6 @@ animations = [{
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4gjji")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_u2ulf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6e8lb")
}],
"loop": false,
"name": &"punch",
@ -462,6 +310,9 @@ animations = [{
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_f1ej7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_l71n6")
}, {
"duration": 1.0,
@ -481,9 +332,6 @@ animations = [{
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wqfne")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f1ej7")
}],
"loop": false,
"name": &"shoot_run",
@ -513,6 +361,12 @@ animations = [{
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_t4otl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_j2b1d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_cs1tg")
}],
"loop": false,
"name": &"shoot_still",
@ -528,6 +382,16 @@ metadata/_edit_group_ = true
shape = SubResource("CapsuleShape2D_3vyb7")
debug_color = Color(0.521569, 0.572549, 0, 1)
[node name="PlayerSprite" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_3vyb7")
animation = &"punch"
autoplay = "idle"
frame = 7
frame_progress = 1.0
[node name="StateMachine" type="Node" parent="."]
script = ExtResource("8_smehm")
[node name="RightCast" type="RayCast2D" parent="."]
target_position = Vector2(50, 0)
collision_mask = 6
@ -542,26 +406,13 @@ position = Vector2(16, -7)
[node name="LeftSpawn" type="Marker2D" parent="."]
position = Vector2(-16, -7)
[node name="PlayerSprite" type="AnimatedSprite2D" parent="."]
material = SubResource("ShaderMaterial_y4r1p")
sprite_frames = SubResource("SpriteFrames_3vyb7")
animation = &"die"
autoplay = "idle"
frame = 9
frame_progress = 1.0
[node name="Camera2D" type="Camera2D" parent="."]
offset = Vector2(0, -50)
position_smoothing_enabled = true
[node name="DebugInfo" type="CanvasLayer" parent="."]
[node name="StateLabel" type="Label" parent="DebugInfo"]
unique_name_in_owner = true
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -23.0
offset_right = 113.0
grow_vertical = 0
offset_right = 40.0
offset_bottom = 23.0
text = "Current State: "

View File

@ -1,28 +1,31 @@
[gd_scene load_steps=9 format=3 uid="uid://bts74sqcd7k7h"]
[ext_resource type="Texture2D" uid="uid://wgf50h6hbeib" path="res://graphics/enemies/slime_green.png" id="1_02r3y"]
[ext_resource type="Script" uid="uid://bcxorf6dwnwbv" path="res://scripts/slimer.gd" id="1_4oill"]
[ext_resource type="Texture2D" uid="uid://dpq20rryss8we" path="res://assets/graphics/enemies/25-11-12-pdm-endesga-32-0_scaled_3x_pngcrushed.png" id="2_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("2_4oill")
region = Rect2(0, 144, 48, 72)
atlas = ExtResource("1_02r3y")
region = Rect2(24, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_swrbd"]
atlas = ExtResource("2_4oill")
region = Rect2(48, 144, 48, 72)
atlas = ExtResource("1_02r3y")
region = Rect2(48, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_slvpl"]
atlas = ExtResource("2_4oill")
region = Rect2(96, 144, 48, 72)
[sub_resource type="AtlasTexture" id="AtlasTexture_negjt"]
atlas = ExtResource("2_4oill")
region = Rect2(144, 144, 48, 72)
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,
@ -30,50 +33,42 @@ animations = [{
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_slvpl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_negjt")
}],
"loop": true,
"name": &"walk",
"name": &"idle",
"speed": 6.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_02r3y"]
size = Vector2(42, 57)
size = Vector2(14, 15)
[node name="Slimer" type="Area2D"]
collision_layer = 16
collision_mask = 15
script = ExtResource("1_4oill")
speed = 100
[node name="SlimeSprite" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -7)
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_negjt")
animation = &"walk"
autoplay = "walk"
frame_progress = 0.5956298
animation = &"idle"
autoplay = "idle"
frame_progress = 0.901815
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 4.5)
shape = SubResource("RectangleShape2D_02r3y")
[node name="RightCast" type="RayCast2D" parent="."]
target_position = Vector2(22, 0)
collision_mask = 2
target_position = Vector2(20, 0)
[node name="LeftCast" type="RayCast2D" parent="."]
target_position = Vector2(-22, 0)
collision_mask = 2
target_position = Vector2(-20, 0)
[node name="RightDownCast" type="RayCast2D" parent="."]
position = Vector2(21, 0)
target_position = Vector2(0, 37)
collision_mask = 2
position = Vector2(7, 0)
target_position = Vector2(0, 20)
[node name="LeftDownCast" type="RayCast2D" parent="."]
position = Vector2(-21, 0)
target_position = Vector2(0, 37)
collision_mask = 2
position = Vector2(-7, 0)
target_position = Vector2(0, 20)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://yr1iqtid2ihb"]
[ext_resource type="Texture2D" uid="uid://d1tnil82cldxk" path="res://assets/graphics/objects/25-10-27-small-crate.png" id="2_8vkwr"]
[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)

12
scenes/state_machine.gd Normal file
View File

@ -0,0 +1,12 @@
class_name StateMachine
extends Node
## Node-based Finite State Machine (FSM) for the player
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass

View File

@ -0,0 +1 @@
uid://bo1v353uh33hx

View File

@ -1,47 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://bcybxyumd2qwf"]
[ext_resource type="Script" uid="uid://bpyw8duggqhke" path="res://scripts/ui.gd" id="1_nt7q6"]
[node name="UI" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_nt7q6")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
grow_horizontal = 2
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="HealthLabel" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer"]
layout_mode = 2
text = "Health"
[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="TimerLabel" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer2"]
layout_mode = 2
text = "Timer"
horizontal_alignment = 1
[node name="MarginContainer3" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="CoinsLabel" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer3"]
layout_mode = 2
text = "Coins"
horizontal_alignment = 2

View File

@ -1,46 +1,25 @@
extends Node2D
## Autoload GameController object for handling game logic
## Signals
# Save/load
signal game_loaded(stashed_data)
signal game_saved(level, time_remaining, player_health, enemies_dictionary)
# Player health
signal player_damaged(health, max_health)
signal player_death
# Other
signal coin_collected(coins_remaining)
signal destroyed(body)
signal level_changed(level)
signal timer_updated(time_remaining)
## Member variables
# Coins
var coins_collected : int = 0
var total_coins : int = 0
# Levels
var level_names : Array = DirAccess.open("res://scenes/levels").get_files()
var levels : Array
var current_level = 0
# Save/load
var stash_data : Dictionary = {}
# Timers
var timers = [30, 30, 30]
var levels = ["res://scenes/game.tscn", "res://scenes/level_2.tscn", "res://scenes/level_3.tscn"]
var timers = [10, 15, 20]
var time_available : int = 0
var current_level = 0
var timer = Timer.new()
# Characters
## Signals
signal level_changed(level)
signal destroyed(body)
signal player_damaged(health, max_health)
signal player_death
var enemy_stats : CharacterStats
var player_stats : CharacterStats
var enemies_dict : Dictionary = {}
var player_current_health : int = 0
func _ready() -> void:
# test file loading from folder
print_debug("Raw level names: " + str(level_names))
for level_name in level_names:
var level_path = "res://scenes/levels/" + level_name
levels.append(level_path)
print_debug("Adjusted level names: " + str(levels))
# load in characters
enemy_stats = load("res://resources/slime_stats.tres")
player_stats = load("res://resources/player_stats.tres")
@ -51,27 +30,30 @@ func _ready() -> void:
timer.connect("timeout", second_counter)
timer.start()
func _process(_delta: float) -> void:
if Input.is_action_just_pressed("save"):
save_game()
pass
if Input.is_action_just_pressed("load"):
load_game()
pass
func second_counter() -> void:
time_available -= 1
if time_available <= 0:
print_debug("You ran out of time! Emitting level_changed signal")
#get_tree().call_deferred("change_scene_to_file", levels[current_level])
#await get_tree().create_timer(1.0).timeout
level_changed.emit(levels[current_level])
func reset() -> void:
print_debug("Resetting the level")
enemies_dict.clear()
player_current_health = player_stats["starting_health"]
time_available = timers[current_level]
print_debug("You have %s seconds to find all the coins" % str(time_available))
func second_counter() -> void:
time_available -= 1
timer_updated.emit(time_available)
if time_available <= 0:
print_debug("You ran out of time! Emitting level_changed signal")
level_changed.emit(levels[current_level])
func _on_trigger_fired(intent: Variant, body: PhysicsBody2D) -> void:
print("Game controller knows %s trigger fired " % intent)
match intent:
"destroy":
print("Destroy this thing!")
if body is RigidBody2D:
destroyed.emit(body)
"powerup":
print("Power this thing up!")
func on_coin_collected(_body, coin) -> void:
print_debug("GC knows coin collected")
@ -81,14 +63,15 @@ func on_coin_collected(_body, coin) -> void:
destroyed.emit(coin)
func set_total_coins(value) -> void:
coin_collected.emit(value)
print_debug("Setting coin total to %s" % str(value))
if value == 0:
print_debug("You beat Level %s!" % levels[current_level])
# You won!
current_level += 1
if current_level >= levels.size():
current_level = 0
#await get_tree().create_timer(1.0).timeout
level_changed.emit(levels[current_level])
#total_coins = value
print_debug("There are %s coins in the level" % str(value))
func on_player_slimed(_body, slime) -> void:
@ -103,20 +86,13 @@ func on_player_slimed(_body, slime) -> void:
player_damaged.emit(player_current_health, player_stats.starting_health)
print_debug("Player Health: " + str(player_current_health) + " of " + str(player_stats.starting_health))
func handle_player_death() -> void:
level_changed.emit(levels[current_level])
func add_enemy_to_level(enemy, _stat = null) -> void:
func add_enemy_to_level(enemy) -> void:
print_debug("GC adding %s to level" % enemy.name)
var rand_damage : int = randi() % 10
var this_enemy_stats : Dictionary = {
"health": enemy_stats.health,
"damage": enemy_stats.melee_damage + rand_damage
}
if _stat:
this_enemy_stats.health = _stat.health
this_enemy_stats.damage = _stat.damage
print_debug("This enemy's health is %s and its damage is %s" % [this_enemy_stats.health, this_enemy_stats.damage])
enemies_dict[enemy] = this_enemy_stats
func bullet_damage(thing_damaged, _bullet) -> void:
@ -133,34 +109,3 @@ func bullet_damage(thing_damaged, _bullet) -> void:
func remove_enemy_from_level(enemy) -> void:
enemies_dict.erase(enemy)
func save_game() -> void:
game_saved.emit(current_level, time_available, player_current_health, enemies_dict)
func load_game() -> void:
if ResourceLoader.exists("res://resources/level" + str(current_level) + "_game_save_stats.tres"):
var saved_game : SaveObject = load("res://resources/level" + str(current_level) + "_game_save_stats.tres")
enemies_dict.clear()
stash_data = saved_game.game_save
game_loaded.emit(stash_data)
func stash_game(stash) -> void:
print_debug("Stashing game state")
stash_data = stash
var stash_object = SaveObject.new()
stash_object.game_save = stash
ResourceSaver.save(stash_object, "res://resources/level" + str(current_level) + "_game_save_stats.tres")
func set_player_health(value: int) -> void:
print_debug("Setting player health to %s" % str(value))
player_current_health = value
#func _on_trigger_fired(intent: Variant, body: PhysicsBody2D) -> void:
#print("Game controller knows %s trigger fired "change_scene % intent)
#match intent:
#"destroy":
#print("Destroy this thing!")
#if body is RigidBody2D:
#destroyed.emit(body)
#"powerup":
#print("Power this thing up!")

View File

@ -1,21 +0,0 @@
class_name Level
extends Node2D
## Documentation comments
## Signals
## Enums
## Constants
## @export variables
## Regular variables
## @onready variables
## Overridden built-in virtual methods
#func _init() -> void:
#func _enter_tree() -> void:
#func _ready() -> void:
#func _process(delta: float) -> void:
#func _physics_process(delta: float) -> void:
## Remaining virtual methods
## Overridden custom methods
## Remaining methods
## Subclasses

View File

@ -1 +0,0 @@
uid://djv8gud535in5

View File

@ -1,40 +1,24 @@
class_name Player
extends CharacterBody2D
## Character controller.
##
## Controls the player character in this 2D side-scrolling platformer
## TODO: fix bullet cooldown timer
signal player_died
const SPEED = 200.0
const JUMP_VELOCITY = -500.0
enum FaceDirection {
LEFT,
RIGHT
}
enum State {
IDLE,
RUN,
JUMP,
FALL,
SHOOT_STILL,
SHOOT_RUN,
PUNCH,
HURT,
DIE
}
enum FaceDirection{LEFT, RIGHT}
enum State{IDLE, WALK, JUMP, FALLING, SHOOT_STILL, SHOOT_RUN, SHOVE}
const JUMP_VELOCITY := -500.0 ## Power applied for jumping
const SPEED := 200.0 ## (Max) movement speed
@export var BUMP_POWER := 50 ## Power from bumping into objects
@export var PUNCH_POWER := 300 ## Power from shoving objects
@export var BUMP_POWER := 50
@export var SHOVE_POWER := 300
@export var ACCELERATION := 10 ## Amount of "slide-y-ness" in side-to-side-movement
@export var HARD_GRAVITY := 2 ## Factor applied during FALL state
@export var HARD_GRAVITY := 2
var current_state: State = State.IDLE ## Player state for FSM
var facing : FaceDirection = FaceDirection.RIGHT ## Facing direction for animation orientation
var direction : float = 0.0
var punch_target : RigidBody2D
var punch_enabled : bool = false
var current_state: State = State.IDLE
var facing : FaceDirection = FaceDirection.RIGHT
var direction : float = 0.0
var push_target : RigidBody2D
var push_enabled : bool = false
var jump_buffer_timer : Timer
var shoot_cooldown_timer : Timer
@ -46,28 +30,20 @@ var shoot_cooldown_timer : Timer
func _ready() -> void:
jump_buffer_timer = Timer.new()
jump_buffer_timer.one_shot = true
add_child(jump_buffer_timer)
shoot_cooldown_timer = Timer.new()
shoot_cooldown_timer.one_shot = true
add_child(shoot_cooldown_timer)
func _physics_process(delta: float) -> void:
if current_state != State.HURT and current_state != State.DIE:
handle_input()
move_and_slide()
handle_input()
handle_movement(delta)
move_and_slide()
handle_collisions()
update_state()
update_animation()
update_debug()
func handle_damage(_health, _max_health) -> void:
current_state = State.HURT
func handle_death() -> void:
current_state = State.DIE
func handle_input() -> void:
# Handle jumping.
@ -86,19 +62,18 @@ func handle_input() -> void:
facing = FaceDirection.RIGHT
# Handle shoving.
if Input.is_action_just_pressed("punch"):
print_debug("Trying to punch")
if punch_enabled == true:
print_debug("Punching enabled")
var punch_direction : int
if Input.is_action_just_pressed("shove"):
print_debug("Shoving!")
if push_enabled == true:
var shove_direction : int
match facing:
FaceDirection.RIGHT:
punch_direction = 1
shove_direction = 1
FaceDirection.LEFT:
punch_direction = -1
print_debug("Punching %s" % punch_target.name)
current_state = State.PUNCH
punch_target.apply_central_impulse(Vector2(punch_direction, 0) * PUNCH_POWER)
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"):
@ -107,22 +82,28 @@ func handle_input() -> void:
current_state = State.SHOOT_RUN
else:
current_state = State.SHOOT_STILL
print("pew-pew")
match facing:
FaceDirection.RIGHT:
%SceneManager.make_bullet(right_spawn.global_transform, 700)
print("shoot right")
FaceDirection.LEFT:
%SceneManager.make_bullet(left_spawn.global_transform, -700)
print("shoot left")
shoot_cooldown_timer.start(0.2)
else:
print("can't shoot right now because there are %s seconds left in the cooldown timer" % shoot_cooldown_timer.time_left)
# Handle throwing grenades
if Input.is_action_just_pressed("throw"):
print("grenade!")
match facing:
FaceDirection.RIGHT:
%SceneManager.make_grenade(right_spawn.global_transform, 1.0)
print("throwing right")
FaceDirection.LEFT:
%SceneManager.make_grenade(left_spawn.global_transform, -1.0)
print("throwing left")
func handle_movement(delta) -> void:
# Left-right movement. Use acceleration for smoothing
@ -137,10 +118,10 @@ func handle_movement(delta) -> void:
# Character is jumping; apply normal gravity
velocity += get_gravity() * delta
if velocity.y > 0:
current_state = State.FALL
current_state = State.FALLING
else:
# Character falling; apply hard gravity
current_state = State.FALL
current_state = State.FALLING
velocity += get_gravity() * HARD_GRAVITY * delta
func handle_collisions() -> void:
@ -151,51 +132,46 @@ func handle_collisions() -> void:
c.get_collider().apply_central_impulse(-c.get_normal() * BUMP_POWER)
if right_cast.is_colliding() and facing == FaceDirection.RIGHT:
#print_debug("Colliding with something to the right")
var collider = right_cast.get_collider()
#print_debug("Colliding with %s " % collider.name)
if collider is Node and collider is RigidBody2D and collider.is_in_group("punchable"):
#print_debug("We have a punch target")
punch_target = collider
punch_enabled = true
# check if this is OK
if collider is Node and collider is RigidBody2D and collider.is_in_group("pushable"):
push_target = collider
push_enabled = true
if left_cast.is_colliding() and facing == FaceDirection.LEFT:
#print_debug("Colliding with something to the left")
var collider = left_cast.get_collider()
#print_debug("Colliding with %s " % collider.name)
if collider is Node and collider is RigidBody2D and collider.is_in_group("punchable"):
print_debug("We have a punch target")
punch_target = collider
punch_enabled = true
if collider is Node and collider is RigidBody2D and collider.is_in_group("pushable"):
push_target = collider
push_enabled = true
if not right_cast.is_colliding() and not left_cast.is_colliding():
punch_enabled = false
push_enabled = false
func update_state() -> void:
match current_state:
# If player is moving left or right
State.IDLE when velocity.x !=0:
current_state = State.RUN
current_state = State.WALK
# If player stops walking, or starts falling
State.RUN:
State.WALK:
# If not moving left or right
if velocity.x == 0:
current_state = State.IDLE
# If falling
if not is_on_floor() and velocity.y > 0:
current_state = State.FALL
current_state = State.FALLING
# When jump peaks, we start to fall
State.JUMP when velocity.y > 0:
current_state = State.FALL
current_state = State.FALLING
# Player lands, either still or moving
State.FALL when is_on_floor():
State.FALLING when is_on_floor():
if velocity.x == 0:
current_state = State.IDLE
else:
current_state = State.RUN
current_state = State.WALK
# Player shooting
State.SHOOT_STILL:
@ -205,21 +181,13 @@ func update_state() -> void:
# Player shooting while moving
State.SHOOT_RUN:
await player_sprite.animation_finished
current_state = State.RUN
current_state = State.WALK
# Player shoving
State.PUNCH:
State.SHOVE:
await player_sprite.animation_finished
current_state = State.IDLE
State.HURT:
await player_sprite.animation_finished
current_state = State.IDLE
State.DIE:
await player_sprite.animation_finished
player_died.emit()
func update_animation() -> void:
match facing:
FaceDirection.LEFT:
@ -229,22 +197,18 @@ func update_animation() -> void:
match current_state:
State.IDLE:
player_sprite.play("idle")
State.RUN:
State.WALK:
player_sprite.play("run")
State.JUMP:
player_sprite.play("jump")
State.FALL:
State.FALLING:
player_sprite.play("fall")
State.SHOOT_STILL:
player_sprite.play("shoot_still")
State.SHOOT_RUN:
player_sprite.play("shoot_run")
State.PUNCH:
State.SHOVE:
player_sprite.play("punch")
State.HURT:
player_sprite.play("hurt")
State.DIE:
player_sprite.play("die")
func update_debug():
%StateLabel.text = "Current state: %s" % State.keys()[current_state]
%StateLabel.text = "Current state: %s" % current_state

View File

@ -1,56 +1,34 @@
class_name SceneManager
extends Node2D
## Handles adding and removing scenes, building levels
var bullet = preload("res://scenes/bullet.tscn")
var coin_scene = preload("res://scenes/coin.tscn")
var crate_scene = preload("res://scenes/small_crate.tscn")
var enemy_scene = preload("res://scenes/slimer.tscn")
var grenade = preload("res://scenes/grenade.tscn")
var bullet_array = []
var total_allowed_bullets : int = 7
@onready var coins: Node = $"../Coins"
@onready var crates: Node = $"../Crates"
@onready var enemies: Node = $"../Enemies"
@onready var player: Player = $"../Player"
@onready var ui: UI = $"../UILayer/UI"
func _ready() -> void:
GameController.reset()
build_level()
func _on_world_boundary_body_entered(body: Node2D) -> void:
if body is Player:
var current_scene = get_tree()
current_scene.call_deferred("reload_current_scene")
func build_level() -> void:
if coins:
update_coins()
var _total_enemies : int = 0
if enemies:
update_enemies()
# Wire up signals
# GameController
# Wire up signals from GameController
GameController.level_changed.connect(change_scene)
GameController.destroyed.connect(destroy)
GameController.game_saved.connect(on_game_saved)
GameController.game_loaded.connect(on_game_loaded)
GameController.player_damaged.connect(player.handle_damage)
GameController.player_damaged.connect(ui.update_health)
GameController.player_death.connect(player.handle_death)
GameController.timer_updated.connect(ui.update_timer)
GameController.coin_collected.connect(ui.update_coins)
# Player
player.player_died.connect(GameController.handle_player_death)
func update_enemies() -> void:
var total_enemies : int = 0
for enemy in enemies.get_children():
if enemy is Slimer:
total_enemies = total_enemies + 1
total_enemies += 1
if not enemy.player_slimed.is_connected(GameController.on_player_slimed):
enemy.player_slimed.connect(GameController.on_player_slimed)
GameController.add_enemy_to_level(enemy)
@ -93,6 +71,10 @@ 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()
current_scene.call_deferred("reload_current_scene")
func change_scene(level) -> void:
print_debug("Changing scene to level %s" % level)
@ -100,77 +82,3 @@ func change_scene(level) -> void:
func destroy(body) -> void:
body.queue_free()
func on_game_loaded(stash) -> void:
print_debug("Loading level with data %s" % str(stash))
var player_data = stash.player_data
var coins_data = stash.coins_data
var crates_data = stash.crates_data
var enemies_data = stash.enemies_data
# get rid of existing coins
if coins:
for coin in coins.get_children():
# remove listeners
coin.tree_exited.disconnect(update_coins)
coins.remove_child(coin)
coin.queue_free()
for coin_transform in coins_data:
var coin_object : Coin = coin_scene.instantiate()
coins.add_child(coin_object)
coin_object.transform = coin_transform
update_coins()
if crates:
for crate in crates.get_children():
crates.remove_child(crate)
crate.queue_free()
for crate_transform in crates_data:
var crate_object : RigidBody2D = crate_scene.instantiate()
crates.add_child(crate_object)
crate_object.transform = crate_transform
if enemies:
for enemy in enemies.get_children():
enemies.remove_child(enemy)
enemy.queue_free()
for enemy_dict in enemies_data:
var enemy_object : Slimer = enemy_scene.instantiate()
enemies.add_child(enemy_object)
enemy_object.transform = enemy_dict.position
GameController.add_enemy_to_level(enemy_object, enemy_dict)
player.transform = player_data.position
func on_game_saved(current_level: int, time_available: int, player_current_health: int, enemies_dict: Dictionary) -> void:
print_debug("Saving game!")
print_debug("Player health = %s" % str(player_current_health))
print_debug("Player transforms = %s" % str(player.transform))
var player_data = {
"health": player_current_health,
"position": player.transform,
}
var coin_data : Array ## Coin position(s)
if coins:
for coin in coins.get_children():
print_debug("This coin is at %s" % str(coin.transform))
coin_data.push_front(coin.transform)
var crate_data : Array ## Crate position(s)
if crates:
for crate in crates.get_children():
crate_data.push_front(crate.transform)
var enemy_data : Array ## Array of enemies at savepoint
for enemy_key in enemies_dict:
print_debug("Enemy found at %s" % enemy_key.transform)
print_debug("Enemy health is %s" % enemies_dict[enemy_key].damage)
print_debug("Enemy damage is %s" % enemies_dict[enemy_key].health)
var enemy = {
"position": enemy_key.transform,
"health": enemies_dict[enemy_key].health,
"damage": enemies_dict[enemy_key].damage
}
enemy_data.push_front(enemy)
var stash = {
"player_data": player_data,
"coins_data": coin_data,
"crates_data": crate_data,
"enemies_data": enemy_data
}
GameController.stash_game(stash)

View File

@ -1,31 +1,17 @@
class_name Slimer
extends Area2D
signal player_slimed(body, slime)
@export var speed : int = 50
var direction : int = 1
@onready var right_cast: RayCast2D = $RightCast
@onready var left_cast: RayCast2D = $LeftCast
@onready var right_down_cast: RayCast2D = $RightDownCast
@onready var left_down_cast: RayCast2D = $LeftDownCast
@onready var slime_sprite: AnimatedSprite2D = $SlimeSprite
var speed : int = 100
var direction : int = 1
signal player_slimed(body, slime)
func _process(delta: float) -> void:
if not right_down_cast.is_colliding() or right_cast.is_colliding():
direction = -1
slime_sprite.flip_h = true
elif not left_down_cast.is_colliding() or left_cast.is_colliding():
direction = 1
slime_sprite.flip_h = false
#direction = -1
#slime_sprite.flip_h = true
#if not left_cast.is_colliding():
#direction = 1
#slime_sprite.flip_h = false
position.x += direction * speed * delta
func _on_body_entered(body: Node2D) -> void:

View File

@ -1,15 +0,0 @@
class_name UI
extends Control
@onready var health_label: Label = $VBoxContainer/HBoxContainer/MarginContainer/HealthLabel
@onready var timer_label: Label = $VBoxContainer/HBoxContainer/MarginContainer2/TimerLabel
@onready var coins_label: Label = $VBoxContainer/HBoxContainer/MarginContainer3/CoinsLabel
func update_health(current_health, max_health) -> void:
health_label.text = "Health: " + str(current_health)
func update_timer(time_remaining) -> void:
timer_label.text = "Time: " + str(time_remaining)
func update_coins(coins_remaining) -> void:
coins_label.text = "Coins: " + str(coins_remaining)

View File

@ -1 +0,0 @@
uid://bpyw8duggqhke