ui; game saving and loading; bad guy movement; damage and death anims
This commit is contained in:
parent
f0fec8bfc7
commit
09a6140d15
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Player Jab 48x48.png-a092fdd9a110293df667baca
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
BIN
graphics/animations/player_death/Player Death 64x64.png
Normal file
BIN
graphics/animations/player_death/Player Death 64x64.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dcrb23f006glc"
|
||||||
|
path="res://.godot/imported/Player Death 64x64.png-dc6feffe3d49162e73ed5293fec16099.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://graphics/animations/player_death/Player Death 64x64.png"
|
||||||
|
dest_files=["res://.godot/imported/Player Death 64x64.png-dc6feffe3d49162e73ed5293fec16099.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
BIN
graphics/animations/player_hurt/Player Hurt 48x48.png
Normal file
BIN
graphics/animations/player_hurt/Player Hurt 48x48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
34
graphics/animations/player_hurt/Player Hurt 48x48.png.import
Normal file
34
graphics/animations/player_hurt/Player Hurt 48x48.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cr8wqcakbcjnl"
|
||||||
|
path="res://.godot/imported/Player Hurt 48x48.png-0ab10aebe76670b2993b2e5f07f8ac84.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://graphics/animations/player_hurt/Player Hurt 48x48.png"
|
||||||
|
dest_files=["res://.godot/imported/Player Hurt 48x48.png-0ab10aebe76670b2993b2e5f07f8ac84.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Player Idle 48x48.png-febc6ee73b16c6ae56feb25
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player jump 48x48.png-53153cc022c0f5f1a72bef8
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player new jump 48x48.png-085528a4cee6917e773
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player land 48x48.png-73bf83889efcd0c346ed730
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Player Punch 64x64(1).png-30d66d61ef3a1f371d6
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player run 48x48.png-e4bb17293a9ce0c0c03376a7
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/Player Running Shooting 48x48.png-3d2df69d2a4
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/player shoot 2H 48x48.png-6d3782d73196ec488a7
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/25-10-17-sky-background-godot-course-.png-685
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/25-10-17-trees-background-godot-course-v1.png
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/forestbackground.png-c62d472b3b61aefff531c569
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/14.png-b80bda9481eb03b9296615b658f23b86.ctex"
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/explosion.png-67838f4909472368e8b1165eafa79d8
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/orb_red.png-96d2144e68a7a46da9f571d0443165d8.
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/slime_green(1).png-681a56605c941b0b260c890dc1
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/25-10-27-small-crate.png-2ac8da16d97759b258fc
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/mushroom_32x64.png-ae0508fa0fd752d4aa1446b33c
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/veg_32x32.png-742a28d4fd61b9f915a41209e1c7450
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/coin(1).png-19d802c455c83c490b6727491bcbe9e7.
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/25-10-18-godot-course-Terrain (32x32).png-1ec
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/25-10-26-godot-course-Terrain (32x32)-color-e
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/crate-100-custom.png-5420ee27cb0ee861df6e7629
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -18,8 +18,6 @@ dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.cte
|
|||||||
compress/mode=0
|
compress/mode=0
|
||||||
compress/high_quality=false
|
compress/high_quality=false
|
||||||
compress/lossy_quality=0.7
|
compress/lossy_quality=0.7
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
compress/hdr_compression=1
|
||||||
compress/normal_map=0
|
compress/normal_map=0
|
||||||
compress/channel_pack=0
|
compress/channel_pack=0
|
||||||
@ -27,10 +25,6 @@ mipmaps/generate=false
|
|||||||
mipmaps/limit=-1
|
mipmaps/limit=-1
|
||||||
roughness/mode=0
|
roughness/mode=0
|
||||||
roughness/src_normal=""
|
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/fix_alpha_border=true
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
|
|||||||
@ -13,7 +13,7 @@ config_version=5
|
|||||||
config/name="September Game AB"
|
config/name="September Game AB"
|
||||||
config/tags=PackedStringArray("2d", "lesson", "platformer")
|
config/tags=PackedStringArray("2d", "lesson", "platformer")
|
||||||
run/main_scene="uid://cueixogtk70go"
|
run/main_scene="uid://cueixogtk70go"
|
||||||
config/features=PackedStringArray("4.5", "Forward Plus")
|
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
@ -58,21 +58,35 @@ move_right={
|
|||||||
jump={
|
jump={
|
||||||
"deadzone": 0.2,
|
"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)
|
"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={
|
punch={
|
||||||
"deadzone": 0.2,
|
"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)
|
"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":4194306,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
shoot={
|
shoot={
|
||||||
"deadzone": 0.2,
|
"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)
|
"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={
|
throw={
|
||||||
"deadzone": 0.2,
|
"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)
|
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":4,"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)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,6 +96,7 @@ throw={
|
|||||||
2d_physics/layer_2="environment"
|
2d_physics/layer_2="environment"
|
||||||
2d_physics/layer_3="objects"
|
2d_physics/layer_3="objects"
|
||||||
2d_physics/layer_4="weapons"
|
2d_physics/layer_4="weapons"
|
||||||
|
2d_physics/layer_5="enemies"
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
|
|||||||
23
resources/level0_game_save_stats.tres
Normal file
23
resources/level0_game_save_stats.tres
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
[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)
|
||||||
|
}
|
||||||
|
}
|
||||||
23
resources/level1_game_save_stats.tres
Normal file
23
resources/level1_game_save_stats.tres
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
[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)
|
||||||
|
}
|
||||||
|
}
|
||||||
4
resources/save_object.gd
Normal file
4
resources/save_object.gd
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
class_name SaveObject
|
||||||
|
extends Resource
|
||||||
|
|
||||||
|
@export var game_save : Dictionary = {}
|
||||||
1
resources/save_object.gd.uid
Normal file
1
resources/save_object.gd.uid
Normal file
@ -0,0 +1 @@
|
|||||||
|
uid://dvx254gud8f6o
|
||||||
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=21 format=4 uid="uid://cueixogtk70go"]
|
[gd_scene load_steps=22 format=4 uid="uid://cueixogtk70go"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b84pdw14l6gb6" path="res://scripts/scene_manager.gd" id="2_iywne"]
|
[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://2pp1gtlflav8" path="res://scenes/trigger.tscn" id="2_yqjtg"]
|
||||||
@ -8,6 +8,7 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://ctrmx80fc52bt" path="res://graphics/objects/mushroom_32x64.png" id="5_0tnpc"]
|
[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://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://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"]
|
[ext_resource type="PackedScene" uid="uid://bts74sqcd7k7h" path="res://scenes/slimer.tscn" id="10_vtaks"]
|
||||||
|
|
||||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"]
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"]
|
||||||
@ -411,7 +412,7 @@ texture_region_size = Vector2i(32, 32)
|
|||||||
[sub_resource type="TileSet" id="TileSet_gee14"]
|
[sub_resource type="TileSet" id="TileSet_gee14"]
|
||||||
tile_size = Vector2i(32, 32)
|
tile_size = Vector2i(32, 32)
|
||||||
physics_layer_0/collision_layer = 2
|
physics_layer_0/collision_layer = 2
|
||||||
physics_layer_0/collision_mask = 13
|
physics_layer_0/collision_mask = 29
|
||||||
terrain_set_0/mode = 0
|
terrain_set_0/mode = 0
|
||||||
terrain_set_0/terrain_0/name = "Main Terrain"
|
terrain_set_0/terrain_0/name = "Main Terrain"
|
||||||
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
|
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
|
||||||
@ -431,10 +432,10 @@ cellular_return_type = 0
|
|||||||
domain_warp_enabled = true
|
domain_warp_enabled = true
|
||||||
|
|
||||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_u5sy4"]
|
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_u5sy4"]
|
||||||
noise = SubResource("FastNoiseLite_p57ef")
|
|
||||||
color_ramp = SubResource("Gradient_iywne")
|
|
||||||
seamless = true
|
|
||||||
in_3d_space = true
|
in_3d_space = true
|
||||||
|
seamless = true
|
||||||
|
color_ramp = SubResource("Gradient_iywne")
|
||||||
|
noise = SubResource("FastNoiseLite_p57ef")
|
||||||
|
|
||||||
[sub_resource type="Gradient" id="Gradient_p57ef"]
|
[sub_resource type="Gradient" id="Gradient_p57ef"]
|
||||||
offsets = PackedFloat32Array(0.513333, 0.846667, 0.926667)
|
offsets = PackedFloat32Array(0.513333, 0.846667, 0.926667)
|
||||||
@ -445,9 +446,9 @@ noise_type = 5
|
|||||||
frequency = 0.02
|
frequency = 0.02
|
||||||
|
|
||||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_iywne"]
|
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_iywne"]
|
||||||
noise = SubResource("FastNoiseLite_u5sy4")
|
|
||||||
color_ramp = SubResource("Gradient_p57ef")
|
|
||||||
seamless = true
|
seamless = true
|
||||||
|
color_ramp = SubResource("Gradient_p57ef")
|
||||||
|
noise = SubResource("FastNoiseLite_u5sy4")
|
||||||
|
|
||||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"]
|
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"]
|
||||||
|
|
||||||
@ -509,7 +510,7 @@ position = Vector2(532, 62)
|
|||||||
scale = Vector2(0.594276, 0.546575)
|
scale = Vector2(0.594276, 0.546575)
|
||||||
intent = "powerup"
|
intent = "powerup"
|
||||||
|
|
||||||
[node name="Crates" type="Node" parent="."]
|
[node name="Crates" type="Node" parent="." groups=["explodable", "punchable"]]
|
||||||
|
|
||||||
[node name="SmallCrate" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_u5sy4")]
|
[node name="SmallCrate" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_u5sy4")]
|
||||||
z_index = 10
|
z_index = 10
|
||||||
@ -533,6 +534,10 @@ position = Vector2(-7, -210)
|
|||||||
z_index = 5
|
z_index = 5
|
||||||
position = Vector2(-49, 84)
|
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="Enemies" type="Node" parent="."]
|
||||||
|
|
||||||
[node name="Slimer" parent="Enemies" instance=ExtResource("10_vtaks")]
|
[node name="Slimer" parent="Enemies" instance=ExtResource("10_vtaks")]
|
||||||
@ -541,6 +546,10 @@ position = Vector2(-123, 85)
|
|||||||
[node name="Slimer2" parent="Enemies" instance=ExtResource("10_vtaks")]
|
[node name="Slimer2" parent="Enemies" instance=ExtResource("10_vtaks")]
|
||||||
position = Vector2(53, 86)
|
position = Vector2(53, 86)
|
||||||
|
|
||||||
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
[node name="UI" parent="CanvasLayer" instance=ExtResource("10_2y5yt")]
|
||||||
|
|
||||||
[connection signal="body_entered" from="WorldBoundary" to="SceneManager" method="_on_world_boundary_body_entered"]
|
[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"]
|
[connection signal="trigger_fired" from="Triggers/Trigger" to="." method="_on_trigger_fired"]
|
||||||
[connection signal="trigger_fired" from="Triggers/Trigger2" to="." method="_on_trigger_fired"]
|
[connection signal="trigger_fired" from="Triggers/Trigger2" to="." method="_on_trigger_fired"]
|
||||||
|
|||||||
@ -438,10 +438,10 @@ cellular_return_type = 0
|
|||||||
domain_warp_enabled = true
|
domain_warp_enabled = true
|
||||||
|
|
||||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_u5sy4"]
|
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_u5sy4"]
|
||||||
noise = SubResource("FastNoiseLite_p57ef")
|
|
||||||
color_ramp = SubResource("Gradient_iywne")
|
|
||||||
seamless = true
|
|
||||||
in_3d_space = true
|
in_3d_space = true
|
||||||
|
seamless = true
|
||||||
|
color_ramp = SubResource("Gradient_iywne")
|
||||||
|
noise = SubResource("FastNoiseLite_p57ef")
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_hey2k"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_hey2k"]
|
||||||
shader = ExtResource("2_hey2k")
|
shader = ExtResource("2_hey2k")
|
||||||
@ -455,9 +455,9 @@ noise_type = 5
|
|||||||
frequency = 0.02
|
frequency = 0.02
|
||||||
|
|
||||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_iywne"]
|
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_iywne"]
|
||||||
noise = SubResource("FastNoiseLite_u5sy4")
|
|
||||||
color_ramp = SubResource("Gradient_p57ef")
|
|
||||||
seamless = true
|
seamless = true
|
||||||
|
color_ramp = SubResource("Gradient_p57ef")
|
||||||
|
noise = SubResource("FastNoiseLite_u5sy4")
|
||||||
|
|
||||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"]
|
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"]
|
||||||
|
|
||||||
@ -522,7 +522,7 @@ position = Vector2(532, 62)
|
|||||||
scale = Vector2(0.594276, 0.546575)
|
scale = Vector2(0.594276, 0.546575)
|
||||||
intent = "powerup"
|
intent = "powerup"
|
||||||
|
|
||||||
[node name="Crates" type="Node" parent="."]
|
[node name="Crates" type="Node" parent="." groups=["explodable", "punchable"]]
|
||||||
|
|
||||||
[node name="SmallCrate" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_guvtl")]
|
[node name="SmallCrate" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_guvtl")]
|
||||||
z_index = 10
|
z_index = 10
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
[sub_resource type="Gradient" id="Gradient_vcx5n"]
|
[sub_resource type="Gradient" id="Gradient_vcx5n"]
|
||||||
interpolation_mode = 1
|
interpolation_mode = 1
|
||||||
offsets = PackedFloat32Array(0.1625, 0.34375, 0.56875, 0.6625, 0.775)
|
offsets = PackedFloat32Array(0.1625, 0.34375, 0.56875, 0.6625, 0.775)
|
||||||
colors = PackedColorArray(0.20280002, 0.182, 0.26, 1, 0.37049997, 0.57, 0.473575, 1, 0.1953, 0.535815, 0.63, 1, 0.51, 0.3468, 0.46648005, 1, 0.66486335, 0.67, 0.3618, 1)
|
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"]
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_56dhn"]
|
||||||
gradient = SubResource("Gradient_vcx5n")
|
gradient = SubResource("Gradient_vcx5n")
|
||||||
@ -461,7 +461,7 @@ void fragment() {
|
|||||||
|
|
||||||
[sub_resource type="Gradient" id="Gradient_56dhn"]
|
[sub_resource type="Gradient" id="Gradient_56dhn"]
|
||||||
offsets = PackedFloat32Array(0.14375, 0.6125)
|
offsets = PackedFloat32Array(0.14375, 0.6125)
|
||||||
colors = PackedColorArray(0.19215687, 0.1882353, 0.22745098, 1, 0.9607843, 0.85490197, 0.6509804, 1)
|
colors = PackedColorArray(0.192157, 0.188235, 0.227451, 1, 0.960784, 0.854902, 0.65098, 1)
|
||||||
|
|
||||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_ax3dk"]
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_ax3dk"]
|
||||||
gradient = SubResource("Gradient_56dhn")
|
gradient = SubResource("Gradient_56dhn")
|
||||||
@ -480,10 +480,10 @@ cellular_return_type = 0
|
|||||||
domain_warp_enabled = true
|
domain_warp_enabled = true
|
||||||
|
|
||||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_u5sy4"]
|
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_u5sy4"]
|
||||||
noise = SubResource("FastNoiseLite_p57ef")
|
|
||||||
color_ramp = SubResource("Gradient_iywne")
|
|
||||||
seamless = true
|
|
||||||
in_3d_space = true
|
in_3d_space = true
|
||||||
|
seamless = true
|
||||||
|
color_ramp = SubResource("Gradient_iywne")
|
||||||
|
noise = SubResource("FastNoiseLite_p57ef")
|
||||||
|
|
||||||
[sub_resource type="Gradient" id="Gradient_p57ef"]
|
[sub_resource type="Gradient" id="Gradient_p57ef"]
|
||||||
offsets = PackedFloat32Array(0.513333, 0.846667, 0.926667)
|
offsets = PackedFloat32Array(0.513333, 0.846667, 0.926667)
|
||||||
@ -494,9 +494,9 @@ noise_type = 5
|
|||||||
frequency = 0.02
|
frequency = 0.02
|
||||||
|
|
||||||
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_iywne"]
|
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_iywne"]
|
||||||
noise = SubResource("FastNoiseLite_u5sy4")
|
|
||||||
color_ramp = SubResource("Gradient_p57ef")
|
|
||||||
seamless = true
|
seamless = true
|
||||||
|
color_ramp = SubResource("Gradient_p57ef")
|
||||||
|
noise = SubResource("FastNoiseLite_u5sy4")
|
||||||
|
|
||||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"]
|
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_8cj0n"]
|
||||||
|
|
||||||
@ -561,7 +561,7 @@ position = Vector2(532, 62)
|
|||||||
scale = Vector2(0.594276, 0.546575)
|
scale = Vector2(0.594276, 0.546575)
|
||||||
intent = "powerup"
|
intent = "powerup"
|
||||||
|
|
||||||
[node name="Crates" type="Node" parent="."]
|
[node name="Crates" type="Node" parent="." groups=["explodable", "punchable"]]
|
||||||
|
|
||||||
[node name="SmallCrate" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_5xqnf")]
|
[node name="SmallCrate" parent="Crates" groups=["explodable", "punchable"] instance=ExtResource("7_5xqnf")]
|
||||||
z_index = 10
|
z_index = 10
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
[gd_scene load_steps=60 format=3 uid="uid://d3y1iqmpknpyo"]
|
[gd_scene load_steps=76 format=3 uid="uid://d3y1iqmpknpyo"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://d3hp5rjoph7hg" path="res://scripts/player.gd" id="1_3vyb7"]
|
[ext_resource type="Script" uid="uid://d3hp5rjoph7hg" path="res://scripts/player.gd" id="1_3vyb7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dr3rp5hv7rexv" path="res://graphics/animations/player_idle/Player Idle 48x48.png" id="2_g2els"]
|
[ext_resource type="Texture2D" uid="uid://dr3rp5hv7rexv" path="res://graphics/animations/player_idle/Player Idle 48x48.png" id="2_g2els"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dcrb23f006glc" path="res://graphics/animations/player_death/Player Death 64x64.png" id="2_ur7pv"]
|
||||||
[ext_resource type="Texture2D" uid="uid://uxdt2cgxicmt" path="res://graphics/animations/player_jump/player jump 48x48.png" id="3_dqkch"]
|
[ext_resource type="Texture2D" uid="uid://uxdt2cgxicmt" path="res://graphics/animations/player_jump/player jump 48x48.png" id="3_dqkch"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cr8wqcakbcjnl" path="res://graphics/animations/player_hurt/Player Hurt 48x48.png" id="3_smehm"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b27fd4xvrp2ov" path="res://graphics/animations/Player Jab 48x48.png" id="4_fjrip"]
|
[ext_resource type="Texture2D" uid="uid://b27fd4xvrp2ov" path="res://graphics/animations/Player Jab 48x48.png" id="4_fjrip"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bgp8oow6hgh5o" path="res://graphics/animations/player_run/player run 48x48.png" id="4_qlg0r"]
|
[ext_resource type="Texture2D" uid="uid://bgp8oow6hgh5o" path="res://graphics/animations/player_run/player run 48x48.png" id="4_qlg0r"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dadvc8tsvmkb6" path="res://graphics/animations/player_shoot/Player Running Shooting 48x48.png" id="5_tuyoq"]
|
[ext_resource type="Texture2D" uid="uid://dadvc8tsvmkb6" path="res://graphics/animations/player_shoot/Player Running Shooting 48x48.png" id="5_tuyoq"]
|
||||||
@ -38,7 +40,7 @@ void fragment() {
|
|||||||
[sub_resource type="Gradient" id="Gradient_smehm"]
|
[sub_resource type="Gradient" id="Gradient_smehm"]
|
||||||
interpolation_mode = 1
|
interpolation_mode = 1
|
||||||
offsets = PackedFloat32Array(0.2, 0.39375, 0.66875)
|
offsets = PackedFloat32Array(0.2, 0.39375, 0.66875)
|
||||||
colors = PackedColorArray(0.14760001, 0.31398, 0.36, 1, 0.37254903, 0.78431374, 0.9019608, 1, 0.99215686, 0.99607843, 0.53333336, 1)
|
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"]
|
[sub_resource type="GradientTexture2D" id="GradientTexture2D_ur7pv"]
|
||||||
gradient = SubResource("Gradient_smehm")
|
gradient = SubResource("Gradient_smehm")
|
||||||
@ -49,10 +51,66 @@ repeat = 1
|
|||||||
shader = SubResource("Shader_fjrip")
|
shader = SubResource("Shader_fjrip")
|
||||||
shader_parameter/gradient_texture = SubResource("GradientTexture2D_ur7pv")
|
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"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_oprun"]
|
||||||
atlas = ExtResource("3_dqkch")
|
atlas = ExtResource("3_dqkch")
|
||||||
region = Rect2(96, 0, 48, 48)
|
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"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
|
||||||
atlas = ExtResource("2_g2els")
|
atlas = ExtResource("2_g2els")
|
||||||
region = Rect2(0, 0, 48, 48)
|
region = Rect2(0, 0, 48, 48)
|
||||||
@ -237,6 +295,41 @@ region = Rect2(336, 0, 48, 48)
|
|||||||
animations = [{
|
animations = [{
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"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")
|
"texture": SubResource("AtlasTexture_oprun")
|
||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
@ -245,6 +338,23 @@ animations = [{
|
|||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"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")
|
"texture": SubResource("AtlasTexture_qhqgy")
|
||||||
}, {
|
}, {
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@ -435,8 +545,10 @@ position = Vector2(-16, -7)
|
|||||||
[node name="PlayerSprite" type="AnimatedSprite2D" parent="."]
|
[node name="PlayerSprite" type="AnimatedSprite2D" parent="."]
|
||||||
material = SubResource("ShaderMaterial_y4r1p")
|
material = SubResource("ShaderMaterial_y4r1p")
|
||||||
sprite_frames = SubResource("SpriteFrames_3vyb7")
|
sprite_frames = SubResource("SpriteFrames_3vyb7")
|
||||||
animation = &"shoot_still"
|
animation = &"die"
|
||||||
autoplay = "idle"
|
autoplay = "idle"
|
||||||
|
frame = 9
|
||||||
|
frame_progress = 1.0
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="."]
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
offset = Vector2(0, -50)
|
offset = Vector2(0, -50)
|
||||||
@ -446,6 +558,10 @@ position_smoothing_enabled = true
|
|||||||
|
|
||||||
[node name="StateLabel" type="Label" parent="DebugInfo"]
|
[node name="StateLabel" type="Label" parent="DebugInfo"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
offset_right = 40.0
|
anchors_preset = 2
|
||||||
offset_bottom = 23.0
|
anchor_top = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_top = -23.0
|
||||||
|
offset_right = 113.0
|
||||||
|
grow_vertical = 0
|
||||||
text = "Current State: "
|
text = "Current State: "
|
||||||
|
|||||||
@ -47,7 +47,7 @@ collision_layer = 16
|
|||||||
collision_mask = 15
|
collision_mask = 15
|
||||||
script = ExtResource("1_4oill")
|
script = ExtResource("1_4oill")
|
||||||
|
|
||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
[node name="SlimeSprite" type="AnimatedSprite2D" parent="."]
|
||||||
sprite_frames = SubResource("SpriteFrames_negjt")
|
sprite_frames = SubResource("SpriteFrames_negjt")
|
||||||
animation = &"idle"
|
animation = &"idle"
|
||||||
autoplay = "idle"
|
autoplay = "idle"
|
||||||
@ -58,17 +58,23 @@ position = Vector2(0, 4.5)
|
|||||||
shape = SubResource("RectangleShape2D_02r3y")
|
shape = SubResource("RectangleShape2D_02r3y")
|
||||||
|
|
||||||
[node name="RightCast" type="RayCast2D" parent="."]
|
[node name="RightCast" type="RayCast2D" parent="."]
|
||||||
|
position = Vector2(1, 0)
|
||||||
target_position = Vector2(20, 0)
|
target_position = Vector2(20, 0)
|
||||||
|
collision_mask = 3
|
||||||
|
|
||||||
[node name="LeftCast" type="RayCast2D" parent="."]
|
[node name="LeftCast" type="RayCast2D" parent="."]
|
||||||
|
position = Vector2(1, 0)
|
||||||
target_position = Vector2(-20, 0)
|
target_position = Vector2(-20, 0)
|
||||||
|
collision_mask = 3
|
||||||
|
|
||||||
[node name="RightDownCast" type="RayCast2D" parent="."]
|
[node name="RightDownCast" type="RayCast2D" parent="."]
|
||||||
position = Vector2(7, 0)
|
position = Vector2(8, 0)
|
||||||
target_position = Vector2(0, 20)
|
target_position = Vector2(0, 20)
|
||||||
|
collision_mask = 3
|
||||||
|
|
||||||
[node name="LeftDownCast" type="RayCast2D" parent="."]
|
[node name="LeftDownCast" type="RayCast2D" parent="."]
|
||||||
position = Vector2(-7, 0)
|
position = Vector2(-6, 0)
|
||||||
target_position = Vector2(0, 20)
|
target_position = Vector2(0, 20)
|
||||||
|
collision_mask = 3
|
||||||
|
|
||||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
|
|||||||
47
scenes/ui.tscn
Normal file
47
scenes/ui.tscn
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
[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
|
||||||
@ -13,11 +13,16 @@ signal level_changed(level)
|
|||||||
signal destroyed(body)
|
signal destroyed(body)
|
||||||
signal player_damaged(health, max_health)
|
signal player_damaged(health, max_health)
|
||||||
signal player_death
|
signal player_death
|
||||||
|
signal game_loaded(stashed_data)
|
||||||
|
signal game_saved(level, time_remaining, player_health, enemies_dictionary)
|
||||||
|
signal timer_updated(time_remaining)
|
||||||
|
signal coin_collected(coins_remaining)
|
||||||
|
|
||||||
var enemy_stats : CharacterStats
|
var enemy_stats : CharacterStats
|
||||||
var player_stats : CharacterStats
|
var player_stats : CharacterStats
|
||||||
var enemies_dict : Dictionary = {}
|
var enemies_dict : Dictionary = {}
|
||||||
var player_current_health : int = 0
|
var player_current_health : int = 0
|
||||||
|
var stash_data : Dictionary = {}
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
# load in characters
|
# load in characters
|
||||||
@ -30,8 +35,17 @@ func _ready() -> void:
|
|||||||
timer.connect("timeout", second_counter)
|
timer.connect("timeout", second_counter)
|
||||||
timer.start()
|
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:
|
func second_counter() -> void:
|
||||||
time_available -= 1
|
time_available -= 1
|
||||||
|
timer_updated.emit(time_available)
|
||||||
if time_available <= 0:
|
if time_available <= 0:
|
||||||
print_debug("You ran out of time! Emitting level_changed signal")
|
print_debug("You ran out of time! Emitting level_changed signal")
|
||||||
#get_tree().call_deferred("change_scene_to_file", levels[current_level])
|
#get_tree().call_deferred("change_scene_to_file", levels[current_level])
|
||||||
@ -63,6 +77,7 @@ func on_coin_collected(_body, coin) -> void:
|
|||||||
destroyed.emit(coin)
|
destroyed.emit(coin)
|
||||||
|
|
||||||
func set_total_coins(value) -> void:
|
func set_total_coins(value) -> void:
|
||||||
|
coin_collected.emit(value)
|
||||||
print_debug("Setting coin total to %s" % str(value))
|
print_debug("Setting coin total to %s" % str(value))
|
||||||
if value == 0:
|
if value == 0:
|
||||||
# You won!
|
# You won!
|
||||||
@ -86,13 +101,20 @@ func on_player_slimed(_body, slime) -> void:
|
|||||||
player_damaged.emit(player_current_health, player_stats.starting_health)
|
player_damaged.emit(player_current_health, player_stats.starting_health)
|
||||||
print_debug("Player Health: " + str(player_current_health) + " of " + str(player_stats.starting_health))
|
print_debug("Player Health: " + str(player_current_health) + " of " + str(player_stats.starting_health))
|
||||||
|
|
||||||
func add_enemy_to_level(enemy) -> void:
|
func handle_player_death() -> void:
|
||||||
|
level_changed.emit(levels[current_level])
|
||||||
|
|
||||||
|
func add_enemy_to_level(enemy, _stat = null) -> void:
|
||||||
print_debug("GC adding %s to level" % enemy.name)
|
print_debug("GC adding %s to level" % enemy.name)
|
||||||
var rand_damage : int = randi() % 10
|
var rand_damage : int = randi() % 10
|
||||||
var this_enemy_stats : Dictionary = {
|
var this_enemy_stats : Dictionary = {
|
||||||
"health": enemy_stats.health,
|
"health": enemy_stats.health,
|
||||||
"damage": enemy_stats.melee_damage + rand_damage
|
"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
|
enemies_dict[enemy] = this_enemy_stats
|
||||||
|
|
||||||
func bullet_damage(thing_damaged, _bullet) -> void:
|
func bullet_damage(thing_damaged, _bullet) -> void:
|
||||||
@ -109,3 +131,24 @@ func bullet_damage(thing_damaged, _bullet) -> void:
|
|||||||
|
|
||||||
func remove_enemy_from_level(enemy) -> void:
|
func remove_enemy_from_level(enemy) -> void:
|
||||||
enemies_dict.erase(enemy)
|
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
|
||||||
|
|||||||
@ -4,6 +4,8 @@ extends CharacterBody2D
|
|||||||
##
|
##
|
||||||
## Controls the player character in this 2D side-scrolling platformer
|
## Controls the player character in this 2D side-scrolling platformer
|
||||||
|
|
||||||
|
signal player_died
|
||||||
|
|
||||||
enum FaceDirection {
|
enum FaceDirection {
|
||||||
LEFT,
|
LEFT,
|
||||||
RIGHT
|
RIGHT
|
||||||
@ -15,7 +17,9 @@ enum State {
|
|||||||
FALL,
|
FALL,
|
||||||
SHOOT_STILL,
|
SHOOT_STILL,
|
||||||
SHOOT_RUN,
|
SHOOT_RUN,
|
||||||
PUNCH
|
PUNCH,
|
||||||
|
HURT,
|
||||||
|
DIE
|
||||||
}
|
}
|
||||||
|
|
||||||
const JUMP_VELOCITY := -500.0 ## Power applied for jumping
|
const JUMP_VELOCITY := -500.0 ## Power applied for jumping
|
||||||
@ -49,14 +53,21 @@ func _ready() -> void:
|
|||||||
add_child(shoot_cooldown_timer)
|
add_child(shoot_cooldown_timer)
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
|
if current_state != State.HURT and current_state != State.DIE:
|
||||||
handle_input()
|
handle_input()
|
||||||
handle_movement(delta)
|
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
|
handle_movement(delta)
|
||||||
handle_collisions()
|
handle_collisions()
|
||||||
update_state()
|
update_state()
|
||||||
update_animation()
|
update_animation()
|
||||||
update_debug()
|
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:
|
func handle_input() -> void:
|
||||||
|
|
||||||
# Handle jumping.
|
# Handle jumping.
|
||||||
@ -144,7 +155,7 @@ func handle_collisions() -> void:
|
|||||||
var collider = right_cast.get_collider()
|
var collider = right_cast.get_collider()
|
||||||
#print_debug("Colliding with %s " % collider.name)
|
#print_debug("Colliding with %s " % collider.name)
|
||||||
if collider is Node and collider is RigidBody2D and collider.is_in_group("punchable"):
|
if collider is Node and collider is RigidBody2D and collider.is_in_group("punchable"):
|
||||||
print_debug("We have a punch target")
|
#print_debug("We have a punch target")
|
||||||
punch_target = collider
|
punch_target = collider
|
||||||
punch_enabled = true
|
punch_enabled = true
|
||||||
|
|
||||||
@ -201,6 +212,14 @@ func update_state() -> void:
|
|||||||
await player_sprite.animation_finished
|
await player_sprite.animation_finished
|
||||||
current_state = State.IDLE
|
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:
|
func update_animation() -> void:
|
||||||
match facing:
|
match facing:
|
||||||
FaceDirection.LEFT:
|
FaceDirection.LEFT:
|
||||||
@ -222,6 +241,10 @@ func update_animation() -> void:
|
|||||||
player_sprite.play("shoot_run")
|
player_sprite.play("shoot_run")
|
||||||
State.PUNCH:
|
State.PUNCH:
|
||||||
player_sprite.play("punch")
|
player_sprite.play("punch")
|
||||||
|
State.HURT:
|
||||||
|
player_sprite.play("hurt")
|
||||||
|
State.DIE:
|
||||||
|
player_sprite.play("die")
|
||||||
|
|
||||||
func update_debug():
|
func update_debug():
|
||||||
%StateLabel.text = "Current state: %s" % State.keys()[current_state]
|
%StateLabel.text = "Current state: %s" % State.keys()[current_state]
|
||||||
|
|||||||
@ -2,12 +2,18 @@ class_name SceneManager
|
|||||||
extends Node2D
|
extends Node2D
|
||||||
|
|
||||||
var bullet = preload("res://scenes/bullet.tscn")
|
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 grenade = preload("res://scenes/grenade.tscn")
|
||||||
var bullet_array = []
|
var bullet_array = []
|
||||||
var total_allowed_bullets : int = 7
|
var total_allowed_bullets : int = 7
|
||||||
|
|
||||||
@onready var coins: Node = $"../Coins"
|
@onready var coins: Node = $"../Coins"
|
||||||
|
@onready var crates: Node = $"../Crates"
|
||||||
@onready var enemies: Node = $"../Enemies"
|
@onready var enemies: Node = $"../Enemies"
|
||||||
|
@onready var player: Player = $"../Player"
|
||||||
|
@onready var ui: UI = $"../CanvasLayer/UI"
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
GameController.reset()
|
GameController.reset()
|
||||||
@ -23,6 +29,14 @@ func build_level() -> void:
|
|||||||
# Wire up signals from GameController
|
# Wire up signals from GameController
|
||||||
GameController.level_changed.connect(change_scene)
|
GameController.level_changed.connect(change_scene)
|
||||||
GameController.destroyed.connect(destroy)
|
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)
|
||||||
|
player.player_died.connect(GameController.handle_player_death)
|
||||||
|
GameController.timer_updated.connect(ui.update_timer)
|
||||||
|
GameController.coin_collected.connect(ui.update_coins)
|
||||||
|
|
||||||
func update_enemies() -> void:
|
func update_enemies() -> void:
|
||||||
var total_enemies : int = 0
|
var total_enemies : int = 0
|
||||||
@ -82,3 +96,77 @@ func change_scene(level) -> void:
|
|||||||
|
|
||||||
func destroy(body) -> void:
|
func destroy(body) -> void:
|
||||||
body.queue_free()
|
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)
|
||||||
|
|||||||
@ -5,13 +5,26 @@ extends Area2D
|
|||||||
@onready var left_cast: RayCast2D = $LeftCast
|
@onready var left_cast: RayCast2D = $LeftCast
|
||||||
@onready var right_down_cast: RayCast2D = $RightDownCast
|
@onready var right_down_cast: RayCast2D = $RightDownCast
|
||||||
@onready var left_down_cast: RayCast2D = $LeftDownCast
|
@onready var left_down_cast: RayCast2D = $LeftDownCast
|
||||||
|
@onready var slime_sprite: AnimatedSprite2D = $SlimeSprite
|
||||||
|
|
||||||
var speed : int = 100
|
var speed : int = 25
|
||||||
var direction : int = 1
|
var direction : int = 1
|
||||||
|
|
||||||
signal player_slimed(body, slime)
|
signal player_slimed(body, slime)
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
|
if not right_down_cast.is_colliding():
|
||||||
|
direction = -1
|
||||||
|
slime_sprite.flip_h = true
|
||||||
|
#if not left_down_cast.is_colliding():
|
||||||
|
#direction = 1
|
||||||
|
#slime_sprite.flip_h = false
|
||||||
|
#if not right_cast.is_colliding():
|
||||||
|
#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
|
position.x += direction * speed * delta
|
||||||
|
|
||||||
func _on_body_entered(body: Node2D) -> void:
|
func _on_body_entered(body: Node2D) -> void:
|
||||||
|
|||||||
15
scripts/ui.gd
Normal file
15
scripts/ui.gd
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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)
|
||||||
1
scripts/ui.gd.uid
Normal file
1
scripts/ui.gd.uid
Normal file
@ -0,0 +1 @@
|
|||||||
|
uid://bpyw8duggqhke
|
||||||
Loading…
Reference in New Issue
Block a user