Added demon level prototype and child player form

This commit is contained in:
doctorbatmanwho-creator 2026-06-08 20:17:50 -04:00
parent 7c7e607a6e
commit 22f2f0d8f4
34 changed files with 1477 additions and 433 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://o1i0tdq0kk07"
path="res://.godot/imported/Child_Lose.png-b8a6f135977fdf80f577aaa5ea101621.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Player/Child/Death/Child_Lose.png"
dest_files=["res://.godot/imported/Child_Lose.png-b8a6f135977fdf80f577aaa5ea101621.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.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://3ymxvn0qvok6"
path="res://.godot/imported/Child_4_frame.png-7ee54cc42cdc68d7c815f4dfa1b2a93f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Player/Child/Hurt/Child_4_frame.png"
dest_files=["res://.godot/imported/Child_4_frame.png-7ee54cc42cdc68d7c815f4dfa1b2a93f.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.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cjetu7i53oamu"
path="res://.godot/imported/Child_Idle.png-5a44f1986349f5248aa63c9300e703df.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Player/Child/Idle/Child_Idle.png"
dest_files=["res://.godot/imported/Child_Idle.png-5a44f1986349f5248aa63c9300e703df.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.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dnffgmymstsqo"
path="res://.godot/imported/Child_Squat_stand_up_png.png-b7db6f15daadd4c3d7691652fe554ecc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Player/Child/Idle/Child_Squat_stand_up_png.png"
dest_files=["res://.godot/imported/Child_Squat_stand_up_png.png-b7db6f15daadd4c3d7691652fe554ecc.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.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b7tc4niy82a8i"
path="res://.godot/imported/Child_Jump.png-ef074e8693b3c4d68c6b80f28adeb549.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Player/Child/Jump/Child_Jump.png"
dest_files=["res://.godot/imported/Child_Jump.png-ef074e8693b3c4d68c6b80f28adeb549.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.

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://g7bg5bcbegtv"
path="res://.godot/imported/Child_punch.png-74b1d922ba175817a2f4de9cb5f5654d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Player/Child/Punch/Child_punch.png"
dest_files=["res://.godot/imported/Child_punch.png-74b1d922ba175817a2f4de9cb5f5654d.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.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://lvcdluia0nr3"
path="res://.godot/imported/Child_run.png-5ddef65ec46aadcf54dfacecd0a1acbb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Player/Child/Run/Child_run.png"
dest_files=["res://.godot/imported/Child_run.png-5ddef65ec46aadcf54dfacecd0a1acbb.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.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cgn382a4sbmod"
path="res://.godot/imported/Adult_punch.png-40ec59633305923c3930def7817103b7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Player/Punch/Adult_punch.png"
dest_files=["res://.godot/imported/Adult_punch.png-40ec59633305923c3930def7817103b7.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.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://o2i1qkvebmqa"
path="res://.godot/imported/bed.png-2a42ff05141734e31aab94239d775ba7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Terrains/Items/Kids/bed.png"
dest_files=["res://.godot/imported/bed.png-2a42ff05141734e31aab94239d775ba7.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.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c311b7r7ocg28"
path="res://.godot/imported/chalkboard.png-12711c1bfde686604ac61bdc24351acc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Terrains/Items/Kids/chalkboard.png"
dest_files=["res://.godot/imported/chalkboard.png-12711c1bfde686604ac61bdc24351acc.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.

After

Width:  |  Height:  |  Size: 102 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d0pgxw6p22var"
path="res://.godot/imported/hiding.png-7cc174ec86b29997f5bfc050f7f574ce.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Terrains/Items/Kids/hiding.png"
dest_files=["res://.godot/imported/hiding.png-7cc174ec86b29997f5bfc050f7f574ce.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.

After

Width:  |  Height:  |  Size: 2.6 MiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://jcdjtkm36dln"
path="res://.godot/imported/Forest Terrain (32x32).png-9d4edab3052370738b30f07e4f857483.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Terrains/Tileset/Forest Terrain (32x32).png"
dest_files=["res://.godot/imported/Forest Terrain (32x32).png-9d4edab3052370738b30f07e4f857483.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.

After

Width:  |  Height:  |  Size: 112 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b1wqerdo7h6s7"
path="res://.godot/imported/night.png-bc05eef7177b6766dc745c9900472205.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Terrains/Tileset/night.png"
dest_files=["res://.godot/imported/night.png-bc05eef7177b6766dc745c9900472205.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.

After

Width:  |  Height:  |  Size: 101 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dg3nhen8cfl3n"
path="res://.godot/imported/smaller night terrain red.png-8ca7702b90a783968ec7bbfa66ca3332.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Graphics/Terrains/Tileset/smaller night terrain red.png"
dest_files=["res://.godot/imported/smaller night terrain red.png-8ca7702b90a783968ec7bbfa66ca3332.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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,153 +1,527 @@
[gd_scene load_steps=44 format=3 uid="uid://bu8e4iyw8pc03"]
[gd_scene load_steps=102 format=3 uid="uid://bu8e4iyw8pc03"]
[ext_resource type="Script" uid="uid://dsryf6gxqcm1k" path="res://Scripts/player.gd" id="1_0y7nr"]
[ext_resource type="Texture2D" uid="uid://rltv4cun6tyw" path="res://Assets/Graphics/Player/Death/adult death.png" id="2_nn08x"]
[ext_resource type="Texture2D" uid="uid://ddqxjf5l3jdjy" path="res://Assets/Graphics/Player/Jump/Adult_jump.png" id="3_52ee3"]
[ext_resource type="Texture2D" uid="uid://c6uobr1ovln4i" path="res://Assets/Graphics/Player/Hurt/adult hurt.png" id="4_bhhdu"]
[ext_resource type="Texture2D" uid="uid://bplvpwu7ktbqc" path="res://Assets/Graphics/Player/Idle/Adult_idle.png" id="5_megsn"]
[ext_resource type="Texture2D" uid="uid://cgn382a4sbmod" path="res://Assets/Graphics/Player/Punch/Adult_punch.png" id="6_miouo"]
[ext_resource type="Texture2D" uid="uid://b6wf75yygb5jo" path="res://Assets/Graphics/Player/Run/Adult_run.png" id="6_yoq75"]
[ext_resource type="Texture2D" uid="uid://o1i0tdq0kk07" path="res://Assets/Graphics/Player/Child/Death/Child_Lose.png" id="7_ksbbd"]
[ext_resource type="Texture2D" uid="uid://b7tc4niy82a8i" path="res://Assets/Graphics/Player/Child/Jump/Child_Jump.png" id="8_glx4g"]
[ext_resource type="Texture2D" uid="uid://3ymxvn0qvok6" path="res://Assets/Graphics/Player/Child/Hurt/Child_4_frame.png" id="9_miouo"]
[ext_resource type="Texture2D" uid="uid://dnffgmymstsqo" path="res://Assets/Graphics/Player/Child/Idle/Child_Squat_stand_up_png.png" id="10_o3h8g"]
[ext_resource type="Texture2D" uid="uid://lvcdluia0nr3" path="res://Assets/Graphics/Player/Child/Run/Child_run.png" id="11_1e7my"]
[ext_resource type="Texture2D" uid="uid://g7bg5bcbegtv" path="res://Assets/Graphics/Player/Child/Punch/Child_punch.png" id="12_o3h8g"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ksbbd"]
[sub_resource type="AtlasTexture" id="AtlasTexture_teras"]
atlas = ExtResource("2_nn08x")
region = Rect2(0, 0, 123, 122)
[sub_resource type="AtlasTexture" id="AtlasTexture_glx4g"]
[sub_resource type="AtlasTexture" id="AtlasTexture_8p516"]
atlas = ExtResource("2_nn08x")
region = Rect2(123, 0, 123, 122)
[sub_resource type="AtlasTexture" id="AtlasTexture_miouo"]
[sub_resource type="AtlasTexture" id="AtlasTexture_fvoow"]
atlas = ExtResource("2_nn08x")
region = Rect2(246, 0, 123, 122)
[sub_resource type="AtlasTexture" id="AtlasTexture_o3h8g"]
[sub_resource type="AtlasTexture" id="AtlasTexture_v5fqo"]
atlas = ExtResource("2_nn08x")
region = Rect2(369, 0, 123, 122)
[sub_resource type="AtlasTexture" id="AtlasTexture_1e7my"]
[sub_resource type="AtlasTexture" id="AtlasTexture_yf17c"]
atlas = ExtResource("2_nn08x")
region = Rect2(492, 0, 123, 122)
[sub_resource type="AtlasTexture" id="AtlasTexture_arntx"]
[sub_resource type="AtlasTexture" id="AtlasTexture_awd2i"]
atlas = ExtResource("2_nn08x")
region = Rect2(615, 0, 123, 122)
[sub_resource type="AtlasTexture" id="AtlasTexture_lslt6"]
[sub_resource type="AtlasTexture" id="AtlasTexture_o2sks"]
atlas = ExtResource("2_nn08x")
region = Rect2(738, 0, 123, 122)
[sub_resource type="AtlasTexture" id="AtlasTexture_ulo2v"]
[sub_resource type="AtlasTexture" id="AtlasTexture_3rw25"]
atlas = ExtResource("2_nn08x")
region = Rect2(861, 0, 123, 122)
[sub_resource type="AtlasTexture" id="AtlasTexture_1iu4k"]
[sub_resource type="AtlasTexture" id="AtlasTexture_u4y2r"]
atlas = ExtResource("2_nn08x")
region = Rect2(984, 0, 123, 122)
[sub_resource type="AtlasTexture" id="AtlasTexture_m0x7a"]
[sub_resource type="AtlasTexture" id="AtlasTexture_tbv6f"]
atlas = ExtResource("2_nn08x")
region = Rect2(1107, 0, 123, 122)
[sub_resource type="AtlasTexture" id="AtlasTexture_5v66d"]
[sub_resource type="AtlasTexture" id="AtlasTexture_vp15a"]
atlas = ExtResource("3_52ee3")
region = Rect2(226, 0, 113, 115)
[sub_resource type="AtlasTexture" id="AtlasTexture_x63xi"]
[sub_resource type="AtlasTexture" id="AtlasTexture_fayk8"]
atlas = ExtResource("4_bhhdu")
region = Rect2(0, 0, 133, 130)
[sub_resource type="AtlasTexture" id="AtlasTexture_i2e8t"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ddly5"]
atlas = ExtResource("4_bhhdu")
region = Rect2(133, 0, 133, 130)
[sub_resource type="AtlasTexture" id="AtlasTexture_qidb7"]
[sub_resource type="AtlasTexture" id="AtlasTexture_omi2y"]
atlas = ExtResource("4_bhhdu")
region = Rect2(266, 0, 133, 130)
[sub_resource type="AtlasTexture" id="AtlasTexture_70hv0"]
[sub_resource type="AtlasTexture" id="AtlasTexture_75iyv"]
atlas = ExtResource("4_bhhdu")
region = Rect2(399, 0, 133, 130)
[sub_resource type="AtlasTexture" id="AtlasTexture_8flut"]
[sub_resource type="AtlasTexture" id="AtlasTexture_yrofn"]
atlas = ExtResource("5_megsn")
region = Rect2(0, 0, 122, 119)
[sub_resource type="AtlasTexture" id="AtlasTexture_u7x0b"]
[sub_resource type="AtlasTexture" id="AtlasTexture_5gg6q"]
atlas = ExtResource("5_megsn")
region = Rect2(122, 0, 122, 119)
[sub_resource type="AtlasTexture" id="AtlasTexture_utwlt"]
[sub_resource type="AtlasTexture" id="AtlasTexture_wenux"]
atlas = ExtResource("5_megsn")
region = Rect2(244, 0, 122, 119)
[sub_resource type="AtlasTexture" id="AtlasTexture_kih0c"]
[sub_resource type="AtlasTexture" id="AtlasTexture_vy33c"]
atlas = ExtResource("5_megsn")
region = Rect2(366, 0, 122, 119)
[sub_resource type="AtlasTexture" id="AtlasTexture_lyrkg"]
[sub_resource type="AtlasTexture" id="AtlasTexture_h1ppb"]
atlas = ExtResource("5_megsn")
region = Rect2(488, 0, 122, 119)
[sub_resource type="AtlasTexture" id="AtlasTexture_c43xd"]
[sub_resource type="AtlasTexture" id="AtlasTexture_k22kr"]
atlas = ExtResource("5_megsn")
region = Rect2(610, 0, 122, 119)
[sub_resource type="AtlasTexture" id="AtlasTexture_avx33"]
[sub_resource type="AtlasTexture" id="AtlasTexture_h4i3a"]
atlas = ExtResource("5_megsn")
region = Rect2(732, 0, 122, 119)
[sub_resource type="AtlasTexture" id="AtlasTexture_rxg2u"]
[sub_resource type="AtlasTexture" id="AtlasTexture_rocfp"]
atlas = ExtResource("5_megsn")
region = Rect2(854, 0, 122, 119)
[sub_resource type="AtlasTexture" id="AtlasTexture_xixlo"]
[sub_resource type="AtlasTexture" id="AtlasTexture_uytvf"]
atlas = ExtResource("5_megsn")
region = Rect2(976, 0, 122, 119)
[sub_resource type="AtlasTexture" id="AtlasTexture_bfbt0"]
[sub_resource type="AtlasTexture" id="AtlasTexture_s7lb4"]
atlas = ExtResource("5_megsn")
region = Rect2(1098, 0, 122, 119)
[sub_resource type="AtlasTexture" id="AtlasTexture_wosd6"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ed4yo"]
atlas = ExtResource("3_52ee3")
region = Rect2(0, 0, 113, 115)
[sub_resource type="AtlasTexture" id="AtlasTexture_hkrn1"]
[sub_resource type="AtlasTexture" id="AtlasTexture_fsa4a"]
atlas = ExtResource("3_52ee3")
region = Rect2(113, 0, 113, 115)
[sub_resource type="AtlasTexture" id="AtlasTexture_wpo1r"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ilb4b"]
atlas = ExtResource("6_miouo")
region = Rect2(0, 0, 157, 155)
[sub_resource type="AtlasTexture" id="AtlasTexture_tlew5"]
atlas = ExtResource("6_miouo")
region = Rect2(157, 0, 157, 155)
[sub_resource type="AtlasTexture" id="AtlasTexture_h55a1"]
atlas = ExtResource("6_miouo")
region = Rect2(314, 0, 157, 155)
[sub_resource type="AtlasTexture" id="AtlasTexture_dqj3d"]
atlas = ExtResource("6_miouo")
region = Rect2(471, 0, 157, 155)
[sub_resource type="AtlasTexture" id="AtlasTexture_f6yay"]
atlas = ExtResource("6_miouo")
region = Rect2(628, 0, 157, 155)
[sub_resource type="AtlasTexture" id="AtlasTexture_ao2s2"]
atlas = ExtResource("6_miouo")
region = Rect2(785, 0, 157, 155)
[sub_resource type="AtlasTexture" id="AtlasTexture_opjds"]
atlas = ExtResource("6_miouo")
region = Rect2(942, 0, 157, 155)
[sub_resource type="AtlasTexture" id="AtlasTexture_6626w"]
atlas = ExtResource("6_miouo")
region = Rect2(1099, 0, 157, 155)
[sub_resource type="AtlasTexture" id="AtlasTexture_6f3s4"]
atlas = ExtResource("6_yoq75")
region = Rect2(0, 0, 102, 107)
[sub_resource type="AtlasTexture" id="AtlasTexture_pqity"]
[sub_resource type="AtlasTexture" id="AtlasTexture_l3y8b"]
atlas = ExtResource("6_yoq75")
region = Rect2(102, 0, 102, 107)
[sub_resource type="AtlasTexture" id="AtlasTexture_opqna"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ujsok"]
atlas = ExtResource("6_yoq75")
region = Rect2(204, 0, 102, 107)
[sub_resource type="AtlasTexture" id="AtlasTexture_00okb"]
[sub_resource type="AtlasTexture" id="AtlasTexture_txwsf"]
atlas = ExtResource("6_yoq75")
region = Rect2(306, 0, 102, 107)
[sub_resource type="AtlasTexture" id="AtlasTexture_6hr71"]
[sub_resource type="AtlasTexture" id="AtlasTexture_i10l2"]
atlas = ExtResource("6_yoq75")
region = Rect2(408, 0, 102, 107)
[sub_resource type="AtlasTexture" id="AtlasTexture_y6y60"]
[sub_resource type="AtlasTexture" id="AtlasTexture_fgqou"]
atlas = ExtResource("6_yoq75")
region = Rect2(510, 0, 102, 107)
[sub_resource type="AtlasTexture" id="AtlasTexture_vmcrb"]
[sub_resource type="AtlasTexture" id="AtlasTexture_01r87"]
atlas = ExtResource("6_yoq75")
region = Rect2(612, 0, 102, 107)
[sub_resource type="AtlasTexture" id="AtlasTexture_teras"]
[sub_resource type="AtlasTexture" id="AtlasTexture_jhxql"]
atlas = ExtResource("6_yoq75")
region = Rect2(714, 0, 102, 107)
[sub_resource type="SpriteFrames" id="SpriteFrames_miouo"]
[sub_resource type="SpriteFrames" id="SpriteFrames_nn08x"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_teras")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8p516")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fvoow")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_v5fqo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_yf17c")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_awd2i")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_o2sks")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3rw25")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_u4y2r")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tbv6f")
}],
"loop": false,
"name": &"death",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_vp15a")
}],
"loop": true,
"name": &"falling",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_fayk8")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ddly5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_omi2y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_75iyv")
}],
"loop": false,
"name": &"hurt",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_yrofn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5gg6q")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wenux")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vy33c")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_h1ppb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_k22kr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_h4i3a")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rocfp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_uytvf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_s7lb4")
}],
"loop": true,
"name": &"idle",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ed4yo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fsa4a")
}],
"loop": false,
"name": &"jump",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ilb4b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tlew5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_h55a1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dqj3d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f6yay")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ao2s2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_opjds")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6626w")
}],
"loop": true,
"name": &"punch",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_6f3s4")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_l3y8b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ujsok")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_txwsf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_i10l2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fgqou")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_01r87")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jhxql")
}],
"loop": true,
"name": &"run",
"speed": 12.0
}]
[sub_resource type="AtlasTexture" id="AtlasTexture_ksbbd"]
atlas = ExtResource("7_ksbbd")
region = Rect2(0, 0, 123, 125)
[sub_resource type="AtlasTexture" id="AtlasTexture_glx4g"]
atlas = ExtResource("7_ksbbd")
region = Rect2(123, 0, 123, 125)
[sub_resource type="AtlasTexture" id="AtlasTexture_miouo"]
atlas = ExtResource("7_ksbbd")
region = Rect2(246, 0, 123, 125)
[sub_resource type="AtlasTexture" id="AtlasTexture_o3h8g"]
atlas = ExtResource("7_ksbbd")
region = Rect2(369, 0, 123, 125)
[sub_resource type="AtlasTexture" id="AtlasTexture_1e7my"]
atlas = ExtResource("7_ksbbd")
region = Rect2(492, 0, 123, 125)
[sub_resource type="AtlasTexture" id="AtlasTexture_arntx"]
atlas = ExtResource("7_ksbbd")
region = Rect2(615, 0, 123, 125)
[sub_resource type="AtlasTexture" id="AtlasTexture_lslt6"]
atlas = ExtResource("7_ksbbd")
region = Rect2(738, 0, 123, 125)
[sub_resource type="AtlasTexture" id="AtlasTexture_ulo2v"]
atlas = ExtResource("7_ksbbd")
region = Rect2(861, 0, 123, 125)
[sub_resource type="AtlasTexture" id="AtlasTexture_1iu4k"]
atlas = ExtResource("7_ksbbd")
region = Rect2(984, 0, 123, 125)
[sub_resource type="AtlasTexture" id="AtlasTexture_m0x7a"]
atlas = ExtResource("7_ksbbd")
region = Rect2(1107, 0, 123, 125)
[sub_resource type="AtlasTexture" id="AtlasTexture_5v66d"]
atlas = ExtResource("8_glx4g")
region = Rect2(222, 0, 111, 111)
[sub_resource type="AtlasTexture" id="AtlasTexture_x63xi"]
atlas = ExtResource("9_miouo")
region = Rect2(0, 0, 126, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_i2e8t"]
atlas = ExtResource("9_miouo")
region = Rect2(126, 0, 126, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_qidb7"]
atlas = ExtResource("9_miouo")
region = Rect2(252, 0, 126, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_70hv0"]
atlas = ExtResource("9_miouo")
region = Rect2(378, 0, 126, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_8flut"]
atlas = ExtResource("10_o3h8g")
region = Rect2(0, 0, 129, 129)
[sub_resource type="AtlasTexture" id="AtlasTexture_u7x0b"]
atlas = ExtResource("10_o3h8g")
region = Rect2(129, 0, 129, 129)
[sub_resource type="AtlasTexture" id="AtlasTexture_utwlt"]
atlas = ExtResource("10_o3h8g")
region = Rect2(258, 0, 129, 129)
[sub_resource type="AtlasTexture" id="AtlasTexture_kih0c"]
atlas = ExtResource("10_o3h8g")
region = Rect2(387, 0, 129, 129)
[sub_resource type="AtlasTexture" id="AtlasTexture_lyrkg"]
atlas = ExtResource("10_o3h8g")
region = Rect2(516, 0, 129, 129)
[sub_resource type="AtlasTexture" id="AtlasTexture_c43xd"]
atlas = ExtResource("10_o3h8g")
region = Rect2(645, 0, 129, 129)
[sub_resource type="AtlasTexture" id="AtlasTexture_avx33"]
atlas = ExtResource("10_o3h8g")
region = Rect2(774, 0, 129, 129)
[sub_resource type="AtlasTexture" id="AtlasTexture_rxg2u"]
atlas = ExtResource("10_o3h8g")
region = Rect2(903, 0, 129, 129)
[sub_resource type="AtlasTexture" id="AtlasTexture_xixlo"]
atlas = ExtResource("10_o3h8g")
region = Rect2(1032, 0, 129, 129)
[sub_resource type="AtlasTexture" id="AtlasTexture_bfbt0"]
atlas = ExtResource("8_glx4g")
region = Rect2(0, 0, 111, 111)
[sub_resource type="AtlasTexture" id="AtlasTexture_wosd6"]
atlas = ExtResource("8_glx4g")
region = Rect2(111, 0, 111, 111)
[sub_resource type="AtlasTexture" id="AtlasTexture_867uf"]
atlas = ExtResource("12_o3h8g")
region = Rect2(0, 0, 158, 158)
[sub_resource type="AtlasTexture" id="AtlasTexture_6ilcf"]
atlas = ExtResource("12_o3h8g")
region = Rect2(158, 0, 158, 158)
[sub_resource type="AtlasTexture" id="AtlasTexture_6id3a"]
atlas = ExtResource("12_o3h8g")
region = Rect2(316, 0, 158, 158)
[sub_resource type="AtlasTexture" id="AtlasTexture_w1x0d"]
atlas = ExtResource("12_o3h8g")
region = Rect2(474, 0, 158, 158)
[sub_resource type="AtlasTexture" id="AtlasTexture_ovjwc"]
atlas = ExtResource("12_o3h8g")
region = Rect2(632, 0, 158, 158)
[sub_resource type="AtlasTexture" id="AtlasTexture_jawh0"]
atlas = ExtResource("12_o3h8g")
region = Rect2(790, 0, 158, 158)
[sub_resource type="AtlasTexture" id="AtlasTexture_jq6en"]
atlas = ExtResource("12_o3h8g")
region = Rect2(948, 0, 158, 158)
[sub_resource type="AtlasTexture" id="AtlasTexture_1g8ls"]
atlas = ExtResource("12_o3h8g")
region = Rect2(1106, 0, 158, 158)
[sub_resource type="AtlasTexture" id="AtlasTexture_hkrn1"]
atlas = ExtResource("11_1e7my")
region = Rect2(0, 0, 102, 102)
[sub_resource type="AtlasTexture" id="AtlasTexture_wpo1r"]
atlas = ExtResource("11_1e7my")
region = Rect2(102, 0, 102, 102)
[sub_resource type="AtlasTexture" id="AtlasTexture_pqity"]
atlas = ExtResource("11_1e7my")
region = Rect2(204, 0, 102, 102)
[sub_resource type="AtlasTexture" id="AtlasTexture_opqna"]
atlas = ExtResource("11_1e7my")
region = Rect2(306, 0, 102, 102)
[sub_resource type="AtlasTexture" id="AtlasTexture_00okb"]
atlas = ExtResource("11_1e7my")
region = Rect2(408, 0, 102, 102)
[sub_resource type="AtlasTexture" id="AtlasTexture_6hr71"]
atlas = ExtResource("11_1e7my")
region = Rect2(510, 0, 102, 102)
[sub_resource type="AtlasTexture" id="AtlasTexture_y6y60"]
atlas = ExtResource("11_1e7my")
region = Rect2(612, 0, 102, 102)
[sub_resource type="AtlasTexture" id="AtlasTexture_vmcrb"]
atlas = ExtResource("11_1e7my")
region = Rect2(714, 0, 102, 102)
[sub_resource type="SpriteFrames" id="SpriteFrames_teras"]
animations = [{
"frames": [{
"duration": 1.0,
@ -236,9 +610,6 @@ animations = [{
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xixlo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bfbt0")
}],
"loop": true,
"name": &"idle",
@ -246,10 +617,10 @@ animations = [{
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_wosd6")
"texture": SubResource("AtlasTexture_bfbt0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hkrn1")
"texture": SubResource("AtlasTexture_wosd6")
}],
"loop": false,
"name": &"jump",
@ -257,6 +628,38 @@ animations = [{
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_867uf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6ilcf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6id3a")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_w1x0d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ovjwc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jawh0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jq6en")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1g8ls")
}],
"loop": true,
"name": &"punch",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_hkrn1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wpo1r")
}, {
"duration": 1.0,
@ -276,9 +679,6 @@ animations = [{
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vmcrb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_teras")
}],
"loop": true,
"name": &"run",
@ -288,6 +688,7 @@ animations = [{
[sub_resource type="CircleShape2D" id="CircleShape2D_2poj3"]
[node name="CharacterBody2D" type="CharacterBody2D"]
z_index = 10
position = Vector2(2, -1)
script = ExtResource("1_0y7nr")
metadata/_edit_group_ = true
@ -296,12 +697,23 @@ metadata/_edit_group_ = true
position = Vector2(-7, -43)
[node name="PlayerGraphic" type="AnimatedSprite2D" parent="."]
z_index = 10
texture_filter = 1
position = Vector2(0, -6)
sprite_frames = SubResource("SpriteFrames_miouo")
sprite_frames = SubResource("SpriteFrames_nn08x")
animation = &"idle"
autoplay = "idle"
frame_progress = 0.47372988
frame_progress = 0.37288705
[node name="ChildGraphic" type="AnimatedSprite2D" parent="."]
visible = false
z_index = 10
texture_filter = 1
position = Vector2(0, -6)
sprite_frames = SubResource("SpriteFrames_teras")
animation = &"idle"
autoplay = "idle"
frame_progress = 0.44878602
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
scale = Vector2(1.6423842, 3.448035)
@ -321,3 +733,4 @@ position = Vector2(17, -3)
position = Vector2(-14, -3)
[connection signal="animation_finished" from="PlayerGraphic" to="." method="_on_animation_finished"]
[connection signal="animation_finished" from="ChildGraphic" to="." method="_on_animation_finished"]

View File

@ -10,12 +10,14 @@ const JUMP_VELOCITY = -400.0
@onready var left_spawn: Node2D = $LeftSpawn
@onready var player_graphic: AnimatedSprite2D = $PlayerGraphic
@onready var camera: Camera2D = $Camera2D
@onready var child_graphic: AnimatedSprite2D = $ChildGraphic
var using_child_form := false
enum FaceDirection{LEFT, RIGHT}
var facing:FaceDirection = FaceDirection.RIGHT
enum State{IDLE, RUN, JUMP, FALLING, HURT, DEATH}
enum State{IDLE, RUN, JUMP, FALLING, HURT, DEATH, PUNCH}
var current_state:State = State.IDLE
var pushTarget
@ -83,38 +85,54 @@ func update_states():
else:
current_state = State.RUN
func get_active_graphic() -> AnimatedSprite2D:
if using_child_form:
return child_graphic
return player_graphic
func update_animation():
var graphic = get_active_graphic()
match current_state:
State.IDLE:
player_graphic.play("idle")
graphic.play("idle")
State.RUN:
player_graphic.play("run")
graphic.play("run")
State.JUMP:
if upJump:
player_graphic.play("jump")
graphic.play("jump")
State.FALLING:
player_graphic.play("falling")
graphic.play("falling")
State.HURT:
player_graphic.play("hurt")
graphic.play("hurt")
State.DEATH:
player_graphic.play("death")
graphic.play("death")
State.PUNCH:
graphic.play("Punch")
func handle_movement(_delta):
if direction:
velocity.x = direction * SPEED
if direction <0:
facing = FaceDirection.LEFT
player_graphic.flip_h = true
get_active_graphic().flip_h = true
if direction >0:
facing = FaceDirection.RIGHT
player_graphic.flip_h = false
get_active_graphic().flip_h = false
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
func handle_input():
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
velocity.y = JUMP_VELOCITY
current_state = State.JUMP
upJump = true
# Child punch attack
if Input.is_action_just_pressed("attack"):
print("ATTACK PRESSED")
print("using_child_form =", using_child_form)
current_state = State.PUNCH
if Input.is_action_just_pressed("shove") && pushEnabled:
print("shove pressed")
if facing == FaceDirection.RIGHT:
@ -131,6 +149,7 @@ func handle_input():
if facing == FaceDirection.LEFT:
%SceneManager.makeBullet(left_spawn.global_transform, -700)
# Get the input direction and handle the movement/deceleration.
direction = Input.get_axis("ui_left", "ui_right")
@ -231,6 +250,24 @@ func _on_animation_finished() -> void:
current_state = State.IDLE
State.DEATH:
deathAnimationCompleteSignal.emit()
State.PUNCH:
current_state = State.IDLE
func become_child() -> void:
using_child_form = true
player_graphic.visible = false
child_graphic.visible = true
print("Player switched to CHILD form")
func become_adult() -> void:
using_child_form = false
player_graphic.visible = true
child_graphic.visible = false
print("Player switched to ADULT form")
func playerTakesDamage(health):
print("Player sees remaining health "+str(health))

View File

@ -13,6 +13,7 @@ var player: Player
var ui: Control
func _ready() -> void:
print("SCENE MANAGER READY")
current_level_container = $"../CurrentLevel"
current_level = current_level_container.get_child(0)
@ -23,6 +24,7 @@ func _ready() -> void:
player = get_parent().get_node("Player")
ui = current_level.get_node_or_null("CanvasLayer/UI")
move_player_to_spawn()
apply_camera_limits()
Gamecontroller.reset()
@ -66,6 +68,19 @@ func apply_camera_limits() -> void:
int(bottom_right.global_position.y)
)
func move_player_to_spawn() -> void:
var spawn = current_level.get_node_or_null("PlayerSpawn")
print("Trying to move player to spawn")
if spawn == null:
print("No PlayerSpawn found in level")
return
player.global_position = spawn.global_position
print("Player moved to spawn: ", spawn.global_position)
#call this any time the coins change
func updateCoins() -> void:
var coinCount = 0

View File

@ -11,7 +11,7 @@ config_version=5
[application]
config/name="AutumnGame"
run/main_scene="uid://c6mxse0hqjro7"
run/main_scene="uid://coknidvakx3e5"
config/features=PackedStringArray("4.5", "Forward Plus")
config/icon="res://icon.svg"
@ -47,6 +47,11 @@ shoot={
"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":89,"key_label":0,"unicode":121,"location":0,"echo":false,"script":null)
]
}
attack={
"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":70,"key_label":0,"unicode":102,"location":0,"echo":false,"script":null)
]
}
[layer_names]