diff --git a/...zip b/...zip new file mode 100644 index 0000000..95d0a99 Binary files /dev/null and b/...zip differ diff --git a/.import/.gdignore b/.import/.gdignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.import/.gdignore @@ -0,0 +1 @@ + diff --git a/.import/bg.png-ce62c430b71ffb4c7afbde2747e87833.md5 b/.import/bg.png-ce62c430b71ffb4c7afbde2747e87833.md5 index 088ede5..a1bf6bc 100644 --- a/.import/bg.png-ce62c430b71ffb4c7afbde2747e87833.md5 +++ b/.import/bg.png-ce62c430b71ffb4c7afbde2747e87833.md5 @@ -1,3 +1,3 @@ source_md5="3d6c1b69c64d9a799c5e4df736a34521" -dest_md5="dcb083f516ff3bdf48f961f496108381" +dest_md5="d5334249f9632532fb04574a5389920d" diff --git a/.import/bg.png-ce62c430b71ffb4c7afbde2747e87833.stex b/.import/bg.png-ce62c430b71ffb4c7afbde2747e87833.stex index 608db00..c25dd26 100644 Binary files a/.import/bg.png-ce62c430b71ffb4c7afbde2747e87833.stex and b/.import/bg.png-ce62c430b71ffb4c7afbde2747e87833.stex differ diff --git a/.import/button.png-4edafff40fd83657bafbe870889c3323.md5 b/.import/button.png-4edafff40fd83657bafbe870889c3323.md5 index 4bb73c5..9ca02f4 100644 --- a/.import/button.png-4edafff40fd83657bafbe870889c3323.md5 +++ b/.import/button.png-4edafff40fd83657bafbe870889c3323.md5 @@ -1,3 +1,3 @@ -source_md5="3c58eb9118747647f2b61541557bc914" -dest_md5="13d0aee3f63aa4bfb8410a986a0e9972" +source_md5="dd5701bc6b4e74dbeb58a489ae60b64c" +dest_md5="ea4dcd90f1805017946f5f093333032e" diff --git a/.import/button.png-4edafff40fd83657bafbe870889c3323.stex b/.import/button.png-4edafff40fd83657bafbe870889c3323.stex index ea86d5b..6fa1938 100644 Binary files a/.import/button.png-4edafff40fd83657bafbe870889c3323.stex and b/.import/button.png-4edafff40fd83657bafbe870889c3323.stex differ diff --git a/.import/buttonOld.png-131e0620d4c23b73f204ed6cd9d8ce95.md5 b/.import/buttonOld.png-131e0620d4c23b73f204ed6cd9d8ce95.md5 new file mode 100644 index 0000000..6582102 --- /dev/null +++ b/.import/buttonOld.png-131e0620d4c23b73f204ed6cd9d8ce95.md5 @@ -0,0 +1,3 @@ +source_md5="3c58eb9118747647f2b61541557bc914" +dest_md5="8377ce38061241af3c7a74121c23b811" + diff --git a/.import/buttonOld.png-131e0620d4c23b73f204ed6cd9d8ce95.stex b/.import/buttonOld.png-131e0620d4c23b73f204ed6cd9d8ce95.stex new file mode 100644 index 0000000..7e3a217 Binary files /dev/null and b/.import/buttonOld.png-131e0620d4c23b73f204ed6cd9d8ce95.stex differ diff --git a/.import/door.png-bfe5ad6280b208e7ee25aacacb4d62c9.md5 b/.import/door.png-bfe5ad6280b208e7ee25aacacb4d62c9.md5 index 7090209..443cf35 100644 --- a/.import/door.png-bfe5ad6280b208e7ee25aacacb4d62c9.md5 +++ b/.import/door.png-bfe5ad6280b208e7ee25aacacb4d62c9.md5 @@ -1,3 +1,3 @@ -source_md5="ee48b337e693bb93a4fedf8fd5572c72" -dest_md5="17396c74ee6daa88d832e12c6adfdae5" +source_md5="dd41b9a5b010b434cef8dbfab4b913a1" +dest_md5="9a363a3cffc05c6368b60c9957928010" diff --git a/.import/door.png-bfe5ad6280b208e7ee25aacacb4d62c9.stex b/.import/door.png-bfe5ad6280b208e7ee25aacacb4d62c9.stex index 1be95a9..37a8153 100644 Binary files a/.import/door.png-bfe5ad6280b208e7ee25aacacb4d62c9.stex and b/.import/door.png-bfe5ad6280b208e7ee25aacacb4d62c9.stex differ diff --git a/.import/lights.png-0c0740b6d3d40dcf01e22cd22d0dd86c.md5 b/.import/lights.png-0c0740b6d3d40dcf01e22cd22d0dd86c.md5 index 8938201..7ca1480 100644 --- a/.import/lights.png-0c0740b6d3d40dcf01e22cd22d0dd86c.md5 +++ b/.import/lights.png-0c0740b6d3d40dcf01e22cd22d0dd86c.md5 @@ -1,3 +1,3 @@ -source_md5="6bccbc54c2d56b3189327d36f6e808b8" -dest_md5="583455405b6a0c2bf342a4c25abfcee5" +source_md5="80a77a62202581cb55624f0e18755210" +dest_md5="1c1c1c55651300e70d76bc7710b7590b" diff --git a/.import/lights.png-0c0740b6d3d40dcf01e22cd22d0dd86c.stex b/.import/lights.png-0c0740b6d3d40dcf01e22cd22d0dd86c.stex index 4253f6c..2e7325c 100644 Binary files a/.import/lights.png-0c0740b6d3d40dcf01e22cd22d0dd86c.stex and b/.import/lights.png-0c0740b6d3d40dcf01e22cd22d0dd86c.stex differ diff --git a/.import/player.png-9a829b1b1a789657a17034a799cae319.md5 b/.import/player.png-9a829b1b1a789657a17034a799cae319.md5 index 98c2f5b..a1d2221 100644 --- a/.import/player.png-9a829b1b1a789657a17034a799cae319.md5 +++ b/.import/player.png-9a829b1b1a789657a17034a799cae319.md5 @@ -1,3 +1,3 @@ -source_md5="fb7da6e7febb84019237ef12498c865e" -dest_md5="e73c0ddc8c4002376b31173cf110886d" +source_md5="df38fd3d311b1f24d13147f2e9e502d7" +dest_md5="8c93d855a1ac65842312af8eb9981186" diff --git a/.import/player.png-9a829b1b1a789657a17034a799cae319.stex b/.import/player.png-9a829b1b1a789657a17034a799cae319.stex index 078d614..a0de0e0 100644 Binary files a/.import/player.png-9a829b1b1a789657a17034a799cae319.stex and b/.import/player.png-9a829b1b1a789657a17034a799cae319.stex differ diff --git a/.import/playerOutlined.png-acc49fcd2934f6d84fb17f0b4f6a4818.md5 b/.import/playerOutlined.png-acc49fcd2934f6d84fb17f0b4f6a4818.md5 new file mode 100644 index 0000000..75a9217 --- /dev/null +++ b/.import/playerOutlined.png-acc49fcd2934f6d84fb17f0b4f6a4818.md5 @@ -0,0 +1,3 @@ +source_md5="b94fa7f2f82abf18c579b2656f52d8c4" +dest_md5="2ea088b868c49dd59cf469abc59b02c7" + diff --git a/.import/playerOutlined.png-acc49fcd2934f6d84fb17f0b4f6a4818.stex b/.import/playerOutlined.png-acc49fcd2934f6d84fb17f0b4f6a4818.stex new file mode 100644 index 0000000..0b94bea Binary files /dev/null and b/.import/playerOutlined.png-acc49fcd2934f6d84fb17f0b4f6a4818.stex differ diff --git a/.import/sprParticle1.png-be51c994dae4bc850dbf7d13de8b3b7f.md5 b/.import/sprParticle1.png-be51c994dae4bc850dbf7d13de8b3b7f.md5 new file mode 100644 index 0000000..46f6f24 --- /dev/null +++ b/.import/sprParticle1.png-be51c994dae4bc850dbf7d13de8b3b7f.md5 @@ -0,0 +1,3 @@ +source_md5="44ea95f9c70eeb77d9d62ee3b3e884b9" +dest_md5="a8955200f2f79eaa1c759ce2522efb36" + diff --git a/.import/sprParticle1.png-be51c994dae4bc850dbf7d13de8b3b7f.stex b/.import/sprParticle1.png-be51c994dae4bc850dbf7d13de8b3b7f.stex new file mode 100644 index 0000000..581bed8 Binary files /dev/null and b/.import/sprParticle1.png-be51c994dae4bc850dbf7d13de8b3b7f.stex differ diff --git a/.import/sprParticle2.png-47e286d6deb510cee4eef896ff9e2177.md5 b/.import/sprParticle2.png-47e286d6deb510cee4eef896ff9e2177.md5 new file mode 100644 index 0000000..baae31c --- /dev/null +++ b/.import/sprParticle2.png-47e286d6deb510cee4eef896ff9e2177.md5 @@ -0,0 +1,3 @@ +source_md5="89c1858e7442868e2cde5fba4bbdce0c" +dest_md5="eb619df30fc3c29b1c2366d391a5d1ac" + diff --git a/.import/sprParticle2.png-47e286d6deb510cee4eef896ff9e2177.stex b/.import/sprParticle2.png-47e286d6deb510cee4eef896ff9e2177.stex new file mode 100644 index 0000000..76e3f26 Binary files /dev/null and b/.import/sprParticle2.png-47e286d6deb510cee4eef896ff9e2177.stex differ diff --git a/.import/sprPlayerJumpDust.png-92ff364560d0526e306d85a674d00dbd.md5 b/.import/sprPlayerJumpDust.png-92ff364560d0526e306d85a674d00dbd.md5 new file mode 100644 index 0000000..95fdb80 --- /dev/null +++ b/.import/sprPlayerJumpDust.png-92ff364560d0526e306d85a674d00dbd.md5 @@ -0,0 +1,3 @@ +source_md5="93344dab44a7ed8b1f5901fc4d814966" +dest_md5="ecbf9f2feb5da83ee2762b05a9c6b3bb" + diff --git a/.import/sprPlayerJumpDust.png-92ff364560d0526e306d85a674d00dbd.stex b/.import/sprPlayerJumpDust.png-92ff364560d0526e306d85a674d00dbd.stex new file mode 100644 index 0000000..cfa31ab Binary files /dev/null and b/.import/sprPlayerJumpDust.png-92ff364560d0526e306d85a674d00dbd.stex differ diff --git a/.import/sprPlayerLandDust.png-3bee588da7d139b9078a9dbca5583673.md5 b/.import/sprPlayerLandDust.png-3bee588da7d139b9078a9dbca5583673.md5 new file mode 100644 index 0000000..5c67d03 --- /dev/null +++ b/.import/sprPlayerLandDust.png-3bee588da7d139b9078a9dbca5583673.md5 @@ -0,0 +1,3 @@ +source_md5="9840471563f347b6163b773e111c7e04" +dest_md5="bcfe059215d216ce2afce993e48525bf" + diff --git a/.import/sprPlayerLandDust.png-3bee588da7d139b9078a9dbca5583673.stex b/.import/sprPlayerLandDust.png-3bee588da7d139b9078a9dbca5583673.stex new file mode 100644 index 0000000..f65c822 Binary files /dev/null and b/.import/sprPlayerLandDust.png-3bee588da7d139b9078a9dbca5583673.stex differ diff --git a/.import/vignette.png-6930179cd6b89d23b5c5c293a438ebdf.md5 b/.import/vignette.png-6930179cd6b89d23b5c5c293a438ebdf.md5 new file mode 100644 index 0000000..9aad975 --- /dev/null +++ b/.import/vignette.png-6930179cd6b89d23b5c5c293a438ebdf.md5 @@ -0,0 +1,3 @@ +source_md5="fbc84a42d883896588a4cddab8f6c4cf" +dest_md5="d678d8a1490f36fdcff31529efc65903" + diff --git a/.import/vignette.png-6930179cd6b89d23b5c5c293a438ebdf.stex b/.import/vignette.png-6930179cd6b89d23b5c5c293a438ebdf.stex new file mode 100644 index 0000000..7d8ec43 Binary files /dev/null and b/.import/vignette.png-6930179cd6b89d23b5c5c293a438ebdf.stex differ diff --git a/Resources/MoreTextures/bg.png.import b/Resources/MoreTextures/bg.png.import index afae4fc..1fef78d 100644 --- a/Resources/MoreTextures/bg.png.import +++ b/Resources/MoreTextures/bg.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 @@ -28,6 +28,7 @@ process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false process/invert_color=false +process/normal_map_invert_y=false stream=false size_limit=0 detect_3d=true diff --git a/Resources/MoreTextures/button.png b/Resources/MoreTextures/button.png index cdb2695..e611113 100644 Binary files a/Resources/MoreTextures/button.png and b/Resources/MoreTextures/button.png differ diff --git a/Resources/MoreTextures/button.png.import b/Resources/MoreTextures/button.png.import index 817d117..0a4baf0 100644 --- a/Resources/MoreTextures/button.png.import +++ b/Resources/MoreTextures/button.png.import @@ -28,6 +28,7 @@ process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false process/invert_color=false +process/normal_map_invert_y=false stream=false size_limit=0 detect_3d=true diff --git a/Resources/MoreTextures/buttonOld.png b/Resources/MoreTextures/buttonOld.png new file mode 100644 index 0000000..cdb2695 Binary files /dev/null and b/Resources/MoreTextures/buttonOld.png differ diff --git a/Resources/MoreTextures/buttonOld.png.import b/Resources/MoreTextures/buttonOld.png.import new file mode 100644 index 0000000..3fded02 --- /dev/null +++ b/Resources/MoreTextures/buttonOld.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/buttonOld.png-131e0620d4c23b73f204ed6cd9d8ce95.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/MoreTextures/buttonOld.png" +dest_files=[ "res://.import/buttonOld.png-131e0620d4c23b73f204ed6cd9d8ce95.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/MoreTextures/door.png b/Resources/MoreTextures/door.png index 647fe8d..7a0182f 100644 Binary files a/Resources/MoreTextures/door.png and b/Resources/MoreTextures/door.png differ diff --git a/Resources/MoreTextures/door.png.import b/Resources/MoreTextures/door.png.import index 736ce64..1488b1a 100644 --- a/Resources/MoreTextures/door.png.import +++ b/Resources/MoreTextures/door.png.import @@ -28,6 +28,7 @@ process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false process/invert_color=false +process/normal_map_invert_y=false stream=false size_limit=0 detect_3d=true diff --git a/Resources/MoreTextures/lights.png b/Resources/MoreTextures/lights.png index 259ed1c..3e8ce3f 100644 Binary files a/Resources/MoreTextures/lights.png and b/Resources/MoreTextures/lights.png differ diff --git a/Resources/MoreTextures/lights.png.import b/Resources/MoreTextures/lights.png.import index bb69a9a..dc6acfe 100644 --- a/Resources/MoreTextures/lights.png.import +++ b/Resources/MoreTextures/lights.png.import @@ -28,6 +28,7 @@ process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false process/invert_color=false +process/normal_map_invert_y=false stream=false size_limit=0 detect_3d=true diff --git a/Resources/MoreTextures/player.png b/Resources/MoreTextures/player.png index 17c6ee5..4e61bdb 100644 Binary files a/Resources/MoreTextures/player.png and b/Resources/MoreTextures/player.png differ diff --git a/Resources/MoreTextures/player.png.import b/Resources/MoreTextures/player.png.import index 86a9bea..7794902 100644 --- a/Resources/MoreTextures/player.png.import +++ b/Resources/MoreTextures/player.png.import @@ -28,6 +28,7 @@ process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false process/invert_color=false +process/normal_map_invert_y=false stream=false size_limit=0 detect_3d=true diff --git a/Resources/MoreTextures/playerOutlined.png b/Resources/MoreTextures/playerOutlined.png new file mode 100644 index 0000000..d0b812a Binary files /dev/null and b/Resources/MoreTextures/playerOutlined.png differ diff --git a/Resources/MoreTextures/playerOutlined.png.import b/Resources/MoreTextures/playerOutlined.png.import new file mode 100644 index 0000000..17b85bc --- /dev/null +++ b/Resources/MoreTextures/playerOutlined.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/playerOutlined.png-acc49fcd2934f6d84fb17f0b4f6a4818.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/MoreTextures/playerOutlined.png" +dest_files=[ "res://.import/playerOutlined.png-acc49fcd2934f6d84fb17f0b4f6a4818.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/MoreTextures/sprParticle1.png b/Resources/MoreTextures/sprParticle1.png new file mode 100644 index 0000000..0ddcec4 Binary files /dev/null and b/Resources/MoreTextures/sprParticle1.png differ diff --git a/Resources/MoreTextures/sprParticle1.png.import b/Resources/MoreTextures/sprParticle1.png.import new file mode 100644 index 0000000..2a41a69 --- /dev/null +++ b/Resources/MoreTextures/sprParticle1.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/sprParticle1.png-be51c994dae4bc850dbf7d13de8b3b7f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/MoreTextures/sprParticle1.png" +dest_files=[ "res://.import/sprParticle1.png-be51c994dae4bc850dbf7d13de8b3b7f.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/MoreTextures/sprParticle2.png b/Resources/MoreTextures/sprParticle2.png new file mode 100644 index 0000000..1eacabf Binary files /dev/null and b/Resources/MoreTextures/sprParticle2.png differ diff --git a/Resources/MoreTextures/sprParticle2.png.import b/Resources/MoreTextures/sprParticle2.png.import new file mode 100644 index 0000000..a183d16 --- /dev/null +++ b/Resources/MoreTextures/sprParticle2.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/sprParticle2.png-47e286d6deb510cee4eef896ff9e2177.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/MoreTextures/sprParticle2.png" +dest_files=[ "res://.import/sprParticle2.png-47e286d6deb510cee4eef896ff9e2177.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/MoreTextures/sprPlayerJumpDust.png b/Resources/MoreTextures/sprPlayerJumpDust.png new file mode 100644 index 0000000..f678742 Binary files /dev/null and b/Resources/MoreTextures/sprPlayerJumpDust.png differ diff --git a/Resources/MoreTextures/sprPlayerJumpDust.png.import b/Resources/MoreTextures/sprPlayerJumpDust.png.import new file mode 100644 index 0000000..8450290 --- /dev/null +++ b/Resources/MoreTextures/sprPlayerJumpDust.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/sprPlayerJumpDust.png-92ff364560d0526e306d85a674d00dbd.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/MoreTextures/sprPlayerJumpDust.png" +dest_files=[ "res://.import/sprPlayerJumpDust.png-92ff364560d0526e306d85a674d00dbd.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/MoreTextures/sprPlayerLandDust.png b/Resources/MoreTextures/sprPlayerLandDust.png new file mode 100644 index 0000000..ec72410 Binary files /dev/null and b/Resources/MoreTextures/sprPlayerLandDust.png differ diff --git a/Resources/MoreTextures/sprPlayerLandDust.png.import b/Resources/MoreTextures/sprPlayerLandDust.png.import new file mode 100644 index 0000000..c491214 --- /dev/null +++ b/Resources/MoreTextures/sprPlayerLandDust.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/sprPlayerLandDust.png-3bee588da7d139b9078a9dbca5583673.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/MoreTextures/sprPlayerLandDust.png" +dest_files=[ "res://.import/sprPlayerLandDust.png-3bee588da7d139b9078a9dbca5583673.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/MoreTextures/vignette.png b/Resources/MoreTextures/vignette.png new file mode 100644 index 0000000..a1850ff Binary files /dev/null and b/Resources/MoreTextures/vignette.png differ diff --git a/Resources/MoreTextures/vignette.png.import b/Resources/MoreTextures/vignette.png.import new file mode 100644 index 0000000..991e713 --- /dev/null +++ b/Resources/MoreTextures/vignette.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/vignette.png-6930179cd6b89d23b5c5c293a438ebdf.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Resources/MoreTextures/vignette.png" +dest_files=[ "res://.import/vignette.png-6930179cd6b89d23b5c5c293a438ebdf.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Resources/MoreTextures/vignette.xcf b/Resources/MoreTextures/vignette.xcf new file mode 100644 index 0000000..c0e43aa Binary files /dev/null and b/Resources/MoreTextures/vignette.xcf differ diff --git a/Scenes/bg.tscn b/Scenes/bg.tscn index 6e4826b..f6fd31b 100644 --- a/Scenes/bg.tscn +++ b/Scenes/bg.tscn @@ -4,7 +4,13 @@ [sub_resource type="GDScript" id=1] script/source = "extends Sprite -func _ready(): self.frame=randi()%self.hframes" + +func _ready(): + self.scale *= rand_range(0.8, 1.2) + self.modulate.b = rand_range(0.8, 1.0) + self.modulate.a = rand_range(0.4, 0.8) + self.frame=randi()%self.hframes +" [node name="bg" type="Sprite"] texture = ExtResource( 1 ) diff --git a/Scenes/bg_layer.tscn b/Scenes/bg_layer.tscn index 5a8160a..4236169 100644 --- a/Scenes/bg_layer.tscn +++ b/Scenes/bg_layer.tscn @@ -1,20 +1,33 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://Resources/MoreTextures/sprParticle1.png" type="Texture" id=1] +[ext_resource path="res://Resources/MoreTextures/sprParticle2.png" type="Texture" id=2] [sub_resource type="GDScript" id=1] script/source = "extends ParallaxBackground -const bg=preload(\"res://Scenes/bg.tscn\") -func _ready(): - for a in rand_range(5, 25): +const bg := preload(\"res://Scenes/bg.tscn\") + +func _ready() -> void: + #for a in rand_range(5, 25): + for _a in rand_range(25, 100): var i=bg.instance() + $parallax_layer.add_child(i) i.global_position.x=rand_range(16,384-16) i.global_position.y=rand_range(16,216-16) - $parallax_layer.add_child(i) set_process(true) -func _process(delta): - self.offset.x=-0.02*(global.player.global_position.x-384/2) + +func _process(_delta) -> void: + self.offset.x = -0.02*(global.player.global_position.x-384/2) " +[sub_resource type="Curve" id=2] +_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.247253, 1 ), 0.0, 0.0, 0, 0, Vector2( 0.75, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 1 ), 0.0, 0.0, 0, 0 ] + +[sub_resource type="Gradient" id=3] +offsets = PoolRealArray( 0.718475, 1 ) +colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0 ) + [node name="bg" type="ParallaxBackground"] layer = -1 scroll_base_scale = Vector2( 0.2, 1 ) @@ -24,3 +37,50 @@ script = SubResource( 1 ) color = Color( 0.75, 0.75, 0.8, 1 ) [node name="parallax_layer" type="ParallaxLayer" parent="."] + +[node name="fg" type="CanvasLayer" parent="."] +layer = 10 + +[node name="particles0" type="CPUParticles2D" parent="fg"] +position = Vector2( 192, 93 ) +lifetime = 16.0 +preprocess = 10.0 +speed_scale = 0.66 +lifetime_randomness = 0.3 +texture = ExtResource( 1 ) +emission_shape = 2 +emission_rect_extents = Vector2( 192, 93 ) +gravity = Vector2( 0, 0 ) +initial_velocity = 16.0 +initial_velocity_random = 1.0 +angular_velocity = 32.0 +angular_velocity_random = 0.33 +tangential_accel = 16.0 +tangential_accel_random = 0.33 +angle = 360.0 +angle_random = 1.0 +scale_amount_random = 0.33 +scale_amount_curve = SubResource( 2 ) +color_ramp = SubResource( 3 ) + +[node name="particles1" type="CPUParticles2D" parent="fg"] +position = Vector2( 192, 93 ) +amount = 16 +lifetime = 16.0 +preprocess = 10.0 +speed_scale = 0.66 +lifetime_randomness = 0.3 +texture = ExtResource( 2 ) +emission_shape = 2 +emission_rect_extents = Vector2( 192, 93 ) +gravity = Vector2( 0, 0 ) +initial_velocity = 16.0 +initial_velocity_random = 1.0 +angular_velocity = 32.0 +angular_velocity_random = 0.33 +tangential_accel_random = 0.33 +angle = 360.0 +angle_random = 1.0 +scale_amount_random = 1.0 +scale_amount_curve = SubResource( 2 ) +color_ramp = SubResource( 3 ) diff --git a/Scenes/camera2D.gd b/Scenes/camera2D.gd new file mode 100644 index 0000000..282d60f --- /dev/null +++ b/Scenes/camera2D.gd @@ -0,0 +1,70 @@ +extends Camera2D + +var _duration = 0.0 +var _period_in_ms = 0.0 +var _amplitude = 0.0 +var _timer = 0.0 +var _last_shook_timer = 0 +var _previous_x = 0.0 +var _previous_y = 0.0 +var _last_offset = Vector2(0, 0) + + +func _ready(): + set_process(true) + + +# Shake with decreasing intensity while there's time remaining. +func _process(delta): + # Only shake when there's shake time remaining. + if _timer == 0: + set_offset(Vector2()) + set_process(false) + return + # Only shake on certain frames. + _last_shook_timer = _last_shook_timer + delta + # Be mathematically correct in the face of lag; usually only happens once. + while _last_shook_timer >= _period_in_ms: + _last_shook_timer = _last_shook_timer - _period_in_ms + # Lerp between [amplitude] and 0.0 intensity based on remaining shake time. + var intensity = _amplitude * (1 - ((_duration - _timer) / _duration)) + # Noise calculation logic from http://jonny.morrill.me/blog/view/14 + var new_x = rand_range(-1.0, 1.0) + var x_component = intensity * (_previous_x + (delta * (new_x - _previous_x))) + var new_y = rand_range(-1.0, 1.0) + var y_component = intensity * (_previous_y + (delta * (new_y - _previous_y))) + _previous_x = new_x + _previous_y = new_y + # Track how much we've moved the offset, as opposed to other effects. + var new_offset = Vector2(x_component, y_component) + set_offset(get_offset() - _last_offset + new_offset) + _last_offset = new_offset + # Reset the offset when we're done shaking. + _timer = _timer - delta + if _timer <= 0: + _timer = 0 + set_offset(get_offset() - _last_offset) + + +# Kick off a new screenshake effect. +# 0.2, 15, and 8 +func shake(duration, frequency, amplitude): + # Don't interrupt current shake duration + if(_timer != 0): + return + + # Initialize variables. + _duration = duration + _timer = duration + _period_in_ms = 1.0 / frequency + _amplitude = amplitude + _previous_x = rand_range(-1.0, 1.0) + _previous_y = rand_range(-1.0, 1.0) + # Reset previous offset, if any. + set_offset(get_offset() - _last_offset) + _last_offset = Vector2(0, 0) + set_process(true) + +func minorShake(): + shake(0.2, 15.0, 8.0) + pass diff --git a/Scenes/drop.tscn b/Scenes/drop.tscn index e241ab2..286d5d6 100644 --- a/Scenes/drop.tscn +++ b/Scenes/drop.tscn @@ -3,7 +3,6 @@ [ext_resource path="res://Resources/Textures/white.png" type="Texture" id=1] [sub_resource type="GDScript" id=1] - script/source = "extends RigidBody2D var colors=[Color('3a5339'),Color('394071')] var direction=Vector2(0,-1) @@ -12,73 +11,39 @@ func _ready(): self.modulate=colors[0] if randf()<0.6 else colors[1] $timer.wait_time=rand_range(1,5) $timer.start() - var variation=Vector2(rand_range(-50,50) if direction.x==0 else 0, rand_range(-50,50) if direction.y==0 else 0) + var variation = Vector2( + rand_range(-50.0,50.0) if direction.x == 0 else 0.0,\\ + rand_range(-50.0,50.0) if direction.y==0 else 0.0 + ) self.linear_velocity=direction*rand_range(-200,200)+variation func _on_timer_timeout(): $twn_fade.interpolate_property(self, 'modulate:a', self.modulate.a, 0, 1, Tween.TRANS_QUART, Tween.EASE_IN, 0.2) $twn_fade.start() -func _on_twn_fade_tween_completed(object, key): +func _on_twn_fade_tween_completed(_object, _key) -> void: self.queue_free() " [sub_resource type="RectangleShape2D" id=2] - -custom_solver_bias = 0.0 extents = Vector2( 1, 1 ) [node name="drop" type="RigidBody2D"] - -input_pickable = false collision_layer = 0 collision_mask = 4 -mode = 0 -mass = 1.0 -friction = 1.0 -bounce = 0.0 gravity_scale = 4.0 -custom_integrator = false -continuous_cd = 0 -contacts_reported = 0 -contact_monitor = false -sleeping = false -can_sleep = true -linear_velocity = Vector2( 0, 0 ) -linear_damp = -1.0 -angular_velocity = 0.0 -angular_damp = -1.0 script = SubResource( 1 ) -_sections_unfolded = [ "Collision", "Visibility" ] -[node name="timer" type="Timer" parent="." index="0"] +[node name="timer" type="Timer" parent="."] -process_mode = 1 -wait_time = 1.0 -one_shot = false -autostart = false - -[node name="twn_fade" type="Tween" parent="." index="1"] - -repeat = false -playback_process_mode = 1 -playback_speed = 1.0 -playback/active = false -playback/repeat = false -playback/speed = 1.0 - -[node name="sprite" type="Sprite" parent="." index="2"] +[node name="twn_fade" type="Tween" parent="."] +[node name="sprite" type="Sprite" parent="."] scale = Vector2( 2, 2 ) texture = ExtResource( 1 ) -_sections_unfolded = [ "Transform" ] - -[node name="collision_shape_2d" type="CollisionShape2D" parent="." index="3"] +[node name="collision_shape_2d" type="CollisionShape2D" parent="."] shape = SubResource( 2 ) [connection signal="timeout" from="timer" to="." method="_on_timer_timeout"] - [connection signal="tween_completed" from="twn_fade" to="." method="_on_twn_fade_tween_completed"] - - diff --git a/Scenes/fxPlayerJumpDust.gd b/Scenes/fxPlayerJumpDust.gd new file mode 100644 index 0000000..e0c9650 --- /dev/null +++ b/Scenes/fxPlayerJumpDust.gd @@ -0,0 +1,10 @@ +extends AnimatedSprite + +func _ready() -> void: + self.scale.x = rand_range(0.6, 1.4) + self.play("default") + yield(self,"animation_finished") + self.visible = false + #yield(get_tree().create_timer(1.0), "timeout") + self.queue_free() + diff --git a/Scenes/fxPlayerJumpDust.tscn b/Scenes/fxPlayerJumpDust.tscn new file mode 100644 index 0000000..fee7a5a --- /dev/null +++ b/Scenes/fxPlayerJumpDust.tscn @@ -0,0 +1,41 @@ +[gd_scene load_steps=10 format=2] + +[ext_resource path="res://Resources/MoreTextures/sprPlayerJumpDust.png" type="Texture" id=1] +[ext_resource path="res://Scenes/fxPlayerJumpDust.gd" type="Script" id=2] + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 32, 16 ) + +[sub_resource type="AtlasTexture" id=5] +atlas = ExtResource( 1 ) +region = Rect2( 32, 0, 32, 16 ) + +[sub_resource type="AtlasTexture" id=6] +atlas = ExtResource( 1 ) +region = Rect2( 64, 0, 32, 16 ) + +[sub_resource type="AtlasTexture" id=7] +atlas = ExtResource( 1 ) +region = Rect2( 96, 0, 32, 16 ) + +[sub_resource type="AtlasTexture" id=8] +atlas = ExtResource( 1 ) +region = Rect2( 128, 0, 32, 16 ) + +[sub_resource type="AtlasTexture" id=9] +atlas = ExtResource( 1 ) +region = Rect2( 160, 0, 32, 16 ) + +[sub_resource type="SpriteFrames" id=10] +animations = [ { +"frames": [ SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ) ], +"loop": false, +"name": "default", +"speed": 24.0 +} ] + +[node name="fxPlayerJumpDust" type="AnimatedSprite"] +position = Vector2( 73.3862, 87.7803 ) +frames = SubResource( 10 ) +script = ExtResource( 2 ) diff --git a/Scenes/fxPlayerLandDust.tscn b/Scenes/fxPlayerLandDust.tscn new file mode 100644 index 0000000..87b8d18 --- /dev/null +++ b/Scenes/fxPlayerLandDust.tscn @@ -0,0 +1,41 @@ +[gd_scene load_steps=10 format=2] + +[ext_resource path="res://Resources/MoreTextures/sprPlayerLandDust.png" type="Texture" id=1] +[ext_resource path="res://Scenes/fxPlayerJumpDust.gd" type="Script" id=2] + +[sub_resource type="AtlasTexture" id=1] +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 32, 16 ) + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 1 ) +region = Rect2( 32, 0, 32, 16 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 1 ) +region = Rect2( 64, 0, 32, 16 ) + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 1 ) +region = Rect2( 96, 0, 32, 16 ) + +[sub_resource type="AtlasTexture" id=5] +atlas = ExtResource( 1 ) +region = Rect2( 128, 0, 32, 16 ) + +[sub_resource type="AtlasTexture" id=6] +atlas = ExtResource( 1 ) +region = Rect2( 160, 0, 32, 16 ) + +[sub_resource type="SpriteFrames" id=7] +animations = [ { +"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ], +"loop": true, +"name": "default", +"speed": 30.0 +} ] + +[node name="fxPlayerJumpDust" type="AnimatedSprite"] +position = Vector2( 73.3862, 87.7803 ) +frames = SubResource( 7 ) +script = ExtResource( 2 ) diff --git a/Scenes/global.gd b/Scenes/global.gd index 8f48524..5cda9ef 100644 --- a/Scenes/global.gd +++ b/Scenes/global.gd @@ -105,11 +105,14 @@ func _ready(): #print_debug('Global: Ready! Hope you have fun!') -func add_to_minutes(): +func add_to_minutes() -> void: print_debug("Min add") minutes+=1 -func startTimer(): $timer.start() -func _process(delta): + +func startTimer() -> void: + $timer.start() + +func _process(_delta): if Input.is_action_just_pressed("ui_debug") and not OS.has_feature("standalone"): next_stage() # change_stage("res://Scenes/stages/20.tscn") @@ -119,17 +122,13 @@ func _process(delta): func next_stage(): #@ Add a delay here maybe get_tree().current_scene.queue_free() - stage_index+=1 + stage_index += 1 state='Stage_begin' - get_tree().change_scene(stage_list[stage_index]) + var _v = get_tree().change_scene(stage_list[stage_index]) func change_stage(stage): - var target=get_tree().current_scene -# twn.interpolate_property(target, 'modulate:a', target.modulate.a, 0, 0.4, Tween.TRANS_QUART, Tween.EASE_IN) -# twn.start() -# yield(twn, "tween_completed") -# var i=stage.instance() -# i.add_child(stage_fadein.instance()) + var _target = get_tree().current_scene + if stage.instance().get_node('stage/str_stagename').text=='Stage 2: Going up': print_debug("Started timer") startTimer() @@ -146,22 +145,19 @@ func change_stage(stage): add_child(k) seconds=round($timer.time_left) $timer.stop() - get_tree().change_scene_to(stage) + var _v = get_tree().change_scene_to(stage) changeFromLowPassMusic() func reload_stage(): if get_tree().current_scene.modulate.a==1: changeFromLowPassMusic() - #print_debug('Global: Reseting current stage.') - get_tree().paused=true - $tint.color=red_tint + get_tree().paused = true + $tint.color = red_tint yield(get_tree().create_timer(0.75), 'timeout') get_tree().reload_current_scene() - $tint.color=blue_tint - get_tree().paused=false - -# get_tree().reload_current_scene() -# add_child(stage_reseter.instance()) + $tint.color = blue_tint + get_tree().paused = false + func changeToLowPassMusic(): #print_debug('Global: Changing to filtered music.') AudioServer.set_bus_mute(AudioServer.get_bus_index('bgm'), true) diff --git a/Scenes/line2dBgOutline.gd b/Scenes/line2dBgOutline.gd new file mode 100644 index 0000000..b4b20f8 --- /dev/null +++ b/Scenes/line2dBgOutline.gd @@ -0,0 +1,4 @@ +extends Line2D + +func _ready() -> void: + self.points = get_node("../line_2d").points diff --git a/Scenes/music1.tscn b/Scenes/music1.tscn index babc04a..0e322de 100644 --- a/Scenes/music1.tscn +++ b/Scenes/music1.tscn @@ -3,14 +3,9 @@ [ext_resource path="res://Resources/Delta-Key-Fourths.ogg" type="AudioStream" id=1] [sub_resource type="GDScript" id=1] - script/source = "extends AudioStreamPlayer -# class member variables go here, for example: -# var a = 2 -# var b = \"textvar\" - -func _ready(): +func _ready() -> void: self.volume_db=-100 $music1_lp.volume_db=-100 $twn.interpolate_property(self, 'volume_db', self.volume_db, 0, 1.0, Tween.TRANS_QUART, Tween.EASE_IN) @@ -18,51 +13,30 @@ func _ready(): $twn.start() $twn_lp.start() -func fade(): +func fade() -> void: $twn.interpolate_property(self, 'volume_db', self.volume_db, -100, 1.0, Tween.TRANS_QUART, Tween.EASE_IN) $twn_lp.interpolate_property($music1_lp, 'volume_db', $music1_lp.volume_db, -100, 1.0, Tween.TRANS_QUART, Tween.EASE_IN) $twn.start() $twn_lp.start() -func _on_twn_tween_completed(object, key): - if self.volume_db<-10: self.queue_free() +func _on_twn_tween_completed(_object, _key) -> void: + if self.volume_db < -10: + self.queue_free() " [node name="music1" type="AudioStreamPlayer"] - stream = ExtResource( 1 ) -volume_db = 0.0 autoplay = true -mix_target = 0 bus = "bgm" script = SubResource( 1 ) -[node name="music1_lp" type="AudioStreamPlayer" parent="." index="0"] - +[node name="music1_lp" type="AudioStreamPlayer" parent="."] stream = ExtResource( 1 ) -volume_db = 0.0 autoplay = true -mix_target = 0 bus = "bgm_lp" -[node name="twn" type="Tween" parent="." index="1"] +[node name="twn" type="Tween" parent="."] -repeat = false -playback_process_mode = 1 -playback_speed = 1.0 -playback/active = false -playback/repeat = false -playback/speed = 1.0 - -[node name="twn_lp" type="Tween" parent="." index="2"] - -repeat = false -playback_process_mode = 1 -playback_speed = 1.0 -playback/active = false -playback/repeat = false -playback/speed = 1.0 +[node name="twn_lp" type="Tween" parent="."] [connection signal="tween_completed" from="twn" to="." method="_on_twn_tween_completed"] - - diff --git a/Scenes/music2.tscn b/Scenes/music2.tscn index 8cf346c..0ae76c6 100644 --- a/Scenes/music2.tscn +++ b/Scenes/music2.tscn @@ -3,14 +3,9 @@ [ext_resource path="res://Resources/Delta-Key-CEGB.ogg" type="AudioStream" id=1] [sub_resource type="GDScript" id=1] - script/source = "extends AudioStreamPlayer -# class member variables go here, for example: -# var a = 2 -# var b = \"textvar\" - -func _ready(): +func _ready() -> void: self.volume_db=-100 $music2_lp.volume_db=-100 $twn.interpolate_property(self, 'volume_db', self.volume_db, 0, 1.0, Tween.TRANS_QUART, Tween.EASE_IN) @@ -18,51 +13,29 @@ func _ready(): $twn.start() $twn_lp.start() -func fade(): +func fade() -> void: $twn.interpolate_property(self, 'volume_db', self.volume_db, -100, 1.0, Tween.TRANS_QUART, Tween.EASE_IN) $twn_lp.interpolate_property($music2_lp, 'volume_db', $music2_lp.volume_db, -100, 1.0, Tween.TRANS_QUART, Tween.EASE_IN) $twn.start() $twn_lp.start() -func _on_twn_tween_completed(object, key): +func _on_twn_tween_completed(_object, _key) -> void: if self.volume_db<-10: self.queue_free() " [node name="music2" type="AudioStreamPlayer"] - stream = ExtResource( 1 ) -volume_db = 0.0 autoplay = true -mix_target = 0 bus = "bgm" script = SubResource( 1 ) -[node name="music2_lp" type="AudioStreamPlayer" parent="." index="0"] - +[node name="music2_lp" type="AudioStreamPlayer" parent="."] stream = ExtResource( 1 ) -volume_db = 0.0 autoplay = true -mix_target = 0 bus = "bgm_lp" -[node name="twn" type="Tween" parent="." index="1"] +[node name="twn" type="Tween" parent="."] -repeat = false -playback_process_mode = 1 -playback_speed = 1.0 -playback/active = false -playback/repeat = false -playback/speed = 1.0 - -[node name="twn_lp" type="Tween" parent="." index="2"] - -repeat = false -playback_process_mode = 1 -playback_speed = 1.0 -playback/active = false -playback/repeat = false -playback/speed = 1.0 +[node name="twn_lp" type="Tween" parent="."] [connection signal="tween_completed" from="twn" to="." method="_on_twn_tween_completed"] - - diff --git a/Scenes/next_level.tscn b/Scenes/next_level.tscn index 40f7b11..2478374 100644 --- a/Scenes/next_level.tscn +++ b/Scenes/next_level.tscn @@ -8,18 +8,35 @@ script/source = "extends Area2D var transitionLayer=preload(\"res://Scenes/screenTransition/transitionLayer.tscn\") onready var current_level=get_tree().current_scene.get_node('stage') export (PackedScene) var next_level=load(\"res://Scenes/debug.tscn\") -func _ready(): pass + +func _ready() -> void: + set_process(true) + +func _process(delta: float) -> void: + if OS.is_debug_build() and Input.is_action_just_pressed(\"ui_debug\"): + goToNextLevel() + func _on_next_level_body_entered(body): if(body.is_in_group('Player')): + goToNextLevel() + return #global.change_stage(next_level) - var i=transitionLayer.instance() - i.nextLevel=self.next_level - get_tree().root.add_child(i) - - $snd_done.play() +# var i = transitionLayer.instance() +# i.nextLevel=self.next_level +# get_tree().root.add_child(i) +# +# $snd_done.play() # body.anim='idle' # body.get_node('animation_player').play('idle') # body.get_node('twn_fadeout').interpolate_property(body, 'modulate:a', body.modulate.a, 0, 0.4, Tween.TRANS_QUART, Tween.EASE_IN) + +func goToNextLevel() -> void: + var i = transitionLayer.instance() + i.nextLevel = self.next_level + get_tree().root.add_child(i) + + $snd_done.play() + pass " [sub_resource type="RectangleShape2D" id=2] @@ -29,7 +46,7 @@ extents = Vector2( 9, 10 ) script = SubResource( 1 ) [node name="icon" type="Sprite" parent="."] -position = Vector2( 0, -2 ) +position = Vector2( 0, -3 ) texture = ExtResource( 1 ) [node name="collision_shape_2d" type="CollisionShape2D" parent="."] @@ -38,4 +55,5 @@ shape = SubResource( 2 ) [node name="snd_done" type="AudioStreamPlayer" parent="."] stream = ExtResource( 2 ) bus = "sfx" + [connection signal="body_entered" from="." to="." method="_on_next_level_body_entered"] diff --git a/Scenes/pause_manager/pause_manager.tscn b/Scenes/pause_manager/pause_manager.tscn index 02ff7eb..4fea4e0 100644 --- a/Scenes/pause_manager/pause_manager.tscn +++ b/Scenes/pause_manager/pause_manager.tscn @@ -1,23 +1,21 @@ [gd_scene load_steps=2 format=2] [sub_resource type="GDScript" id=1] - script/source = "extends Node2D -func _ready(): set_process(true) -func _process(delta): + +func _ready() -> void: + set_process(true) + +func _process(_delta) -> void: if Input.is_action_just_pressed('ui_pause'): get_tree().paused = not get_tree().paused - self.visible = not self.visible" + self.visible = not self.visible +" [node name="pause_manager" type="Node2D"] - pause_mode = 2 visible = false script = SubResource( 1 ) -_sections_unfolded = [ "Pause" ] - -[node name="canvas_modulate" type="CanvasModulate" parent="." index="0"] +[node name="canvas_modulate" type="CanvasModulate" parent="."] color = Color( 0.4375, 0.4375, 0.4375, 1 ) - - diff --git a/Scenes/player_default/player.gd b/Scenes/player_default/player.gd index f1170e2..7242eb0 100644 --- a/Scenes/player_default/player.gd +++ b/Scenes/player_default/player.gd @@ -1,11 +1,13 @@ extends KinematicBody2D -var id=self +var id = self +var bWasOnFloor := false var vectorVelocity=Vector2() var vector_gravity = Vector2() export var last_horizontal_direction = 1 var active=true var anim='' +var vSpriteOffset := Vector2(0,8) enum {State_normal, State_dive} var state = State_normal @@ -33,136 +35,210 @@ const twn_duration=0.25 const spritetrail=preload('res://Scenes/spritetrail/sprite_trail.tscn') const spherizeShader=preload("res://Scenes/spherizeShader.tscn") const drop=preload("res://Scenes/drop.tscn") +const fxPlayerJumpDust = preload("res://Scenes/fxPlayerJumpDust.tscn") +const fxPlayerLandDust = preload("res://Scenes/fxPlayerLandDust.tscn") -onready var dive_aim=$dive_aim/dive_aim -func _ready(): +onready var nSprite:Sprite = $sprite +onready var nSprEyes:Sprite = $eyes +onready var nAnimationPlayer:AnimationPlayer = $animation_player +onready var nDiveAim:Node2D =$dive_aim/dive_aim +onready var dive_aim:Node2D =$dive_aim/dive_aim +onready var nTwnDive:Tween = $twn_dive +onready var nVignette:Sprite = $layerVignette/sprVignette + +func _ready() -> void: add_to_group('Player') - global.player=self - $dive_aim.rotation=0 if self.last_horizontal_direction==1 else -PI + nSprEyes.visible = false + global.player = self + nVignette.modulate.a = 0 + nDiveAim.rotation = 0.0 if self.last_horizontal_direction == 1 else -PI -func _physics_process(delta): - $sprite.flip_h=false if(last_horizontal_direction==1) else true - if state==State_dive: - anim="idle" +func _physics_process(delta:float) -> void: + nSprite.flip_h = false if last_horizontal_direction==1 else true + + if state == State_dive: + anim = "idle" else: if self.is_on_floor(): - anim="idle" if abs(vectorVelocity.x)<=10 else "walk" + anim = "idle" if abs(vectorVelocity.x)<=10 else "walk" else: - anim="going_up" if vectorVelocity.y<0 else "goind_down" - if($animation_player.current_animation!=anim): $animation_player.play(anim) + anim = "going_up" if vectorVelocity.y<0 else "going_down" + + if(nAnimationPlayer.current_animation!=anim): + nAnimationPlayer.play(anim) - if flag_constant_spritetrail: _create_spritetrail() - if Input.is_action_just_pressed('ui_reset'): get_tree().reload_current_scene() + if flag_constant_spritetrail: + _create_spritetrail() + + if Input.is_action_just_pressed('ui_reset'): + var _v = get_tree().reload_current_scene() var vector_direction_input=Vector2(1 if Input.is_action_pressed('ui_right') else -1 if Input.is_action_pressed('ui_left') else 0, 1 if Input.is_action_pressed('ui_down') else -1 if Input.is_action_pressed('ui_up') else 0) last_horizontal_direction=vector_direction_input.x if vector_direction_input.x != 0 else last_horizontal_direction # if vector_direction_input!=Vector2(): $dive_aim.rotation=vector_direction_input.angle() if self.active: - if state==State_normal: _state_normal(delta,vector_direction_input) - elif state==State_dive: _state_dive(delta,vector_direction_input) - if vector_direction_input!=Vector2(): $dive_aim.rotation=vector_direction_input.angle() + if state==State_normal: + _state_normal(delta,vector_direction_input) + elif state==State_dive: + _state_dive(delta,vector_direction_input) + + if vector_direction_input!=Vector2(): + $dive_aim.rotation = lerp_angle($dive_aim.rotation, vector_direction_input.angle(), 0.5) + #$dive_aim.rotation=vector_direction_input.angle() -func _state_normal(delta,vector_direction_input): +func _state_normal(_delta, vector_direction_input): + nVignette.modulate.a = lerp(nVignette.modulate.a, 0, 0.1) set_collision_layer_bit(0, true) set_collision_mask_bit(0, true) vector_gravity=vector_gravity_up if (vectorVelocity.y<0 and Input.is_action_pressed('ui_jump')) else vector_gravity_down - if Input.is_action_just_pressed('ui_jump'):jumpBuffer=maxJumpBuffer - if Input.is_action_just_pressed('ui_dive'):diveBuffer=maxDiveBuffer - if self.is_on_floor():airTime=maxAirTime - else:airTime-=0.5 + if Input.is_action_just_pressed('ui_jump'): + jumpBuffer = maxJumpBuffer + if Input.is_action_just_pressed('ui_dive'): + diveBuffer = maxDiveBuffer + + if self.is_on_floor(): + airTime=maxAirTime + else: + airTime-=0.5 + jumpBuffer-=0.5 diveBuffer-=0.5 - if jumpBuffer>0 and airTime>0: + if jumpBuffer > 0 and airTime > 0: airTime=0 jumpBuffer=0 _twn_squishy() $sounds/snd_jump.play() - vectorVelocity.y=-jump_force + vectorVelocity.y = -jump_force + var i = fxPlayerJumpDust.instance() + i.global_position = self.global_position - vSpriteOffset + get_parent().add_child(i) if diveBuffer>0 and dive_aim.get_overlapping_bodies().size()>0: - var phaseable=true + var phaseable = true #Check if the tileset is unphaseable for body in dive_aim.get_overlapping_bodies(): - if body.is_in_group('Unphaseable'): phaseable=false + if body.is_in_group('Unphaseable'): + phaseable = false + if phaseable: global.changeToLowPassMusic() - if randf()<=0.5: $sounds/snd_dive.play() - else: $sounds/snd_dive1.play() - self.state=State_dive - var cursor_position=dive_aim.get_node('position_2d').global_position#-Vector2(0,1) - var vector_target_position=Vector2(floor(cursor_position.x/global.tile_size.x)*global.tile_size.x,floor(cursor_position.y/global.tile_size.y)*global.tile_size.y)+global.tile_size/2 - $twn_dive.interpolate_property(self, 'global_position', self.global_position,vector_target_position, twn_duration, Tween.TRANS_QUART, Tween.EASE_OUT) - $twn_dive.start() - $animation_player.play("idle") + + if randf() <= 0.5: + $sounds/snd_dive.play() + else: + $sounds/snd_dive1.play() + + self.state = State_dive + var cursor_position = dive_aim.get_node('position_2d').global_position#-Vector2(0,1) + var vector_target_position = Vector2( + floor(cursor_position.x / global.tile_size.x) * global.tile_size.x,\ + floor(cursor_position.y / global.tile_size.y) * global.tile_size.y \ + ) + global.tile_size / 2 + vSpriteOffset + + var _v = nTwnDive.interpolate_property(self, 'global_position', self.global_position,vector_target_position, twn_duration, Tween.TRANS_QUART, Tween.EASE_OUT) + _v = nTwnDive.start() + nAnimationPlayer.play("idle") create_splash(20,30,-(self.global_position-vector_target_position),(self.global_position-vector_target_position)/2) - createSpherize() - else: - var initialVelocity=vectorVelocity - vectorVelocity.x=lerp(vectorVelocity.x, maximum_speed*vector_direction_input.x, lerp_constant) - vectorVelocity.y+=vector_gravity.y - vectorVelocity=move_and_slide(vectorVelocity, vector_normal) - if initialVelocity.y!=vectorVelocity.y and self.is_on_floor(): - $sounds/snd_land.play() + createSpherize(vector_target_position) + $camera2D.minorShake() + return + + var initialVelocity=vectorVelocity + vectorVelocity.x=lerp(vectorVelocity.x, maximum_speed*vector_direction_input.x, lerp_constant) + vectorVelocity.y+=vector_gravity.y + vectorVelocity=move_and_slide(vectorVelocity, vector_normal) + if initialVelocity.y!=vectorVelocity.y and self.is_on_floor(): + $sounds/snd_land.play() + + if !self.bWasOnFloor and self.is_on_floor(): + var i = fxPlayerLandDust.instance() + i.global_position = self.global_position - vSpriteOffset + get_parent().add_child(i) + tweenLandSquish() + self.bWasOnFloor = self.is_on_floor() -func _state_dive(delta,vector_direction_input): - if Input.is_action_just_pressed('ui_dive'):diveBuffer=maxDiveBuffer - diveBuffer-=0.5 - if diveBuffer>0 and dive_aim.get_overlapping_bodies().size()==0: +func _state_dive(_delta, _vector_direction_input): + nVignette.modulate.a = lerp(nVignette.modulate.a, 1, 0.1) + + if Input.is_action_just_pressed('ui_dive'): + diveBuffer = maxDiveBuffer + diveBuffer -= 0.5 + + if diveBuffer>0 and dive_aim.get_overlapping_bodies().size() == 0: global.changeFromLowPassMusic() $sounds/snd_dive_away.play() self.state=State_normal - var vector_target_position=Vector2(floor(dive_aim.global_position.x/global.tile_size.x)*global.tile_size.x,floor(dive_aim.global_position.y/global.tile_size.y)*global.tile_size.y)+global.tile_size/2 - $twn_dive.interpolate_property(self, 'global_position', self.global_position,vector_target_position, twn_duration*0.8, Tween.TRANS_QUART, Tween.EASE_OUT) - $twn_dive.start() + var vector_target_position:Vector2 = Vector2( + floor(dive_aim.global_position.x/global.tile_size.x)*global.tile_size.x,\ + floor(dive_aim.global_position.y/global.tile_size.y)*global.tile_size.y \ + ) + global.tile_size/2 + vSpriteOffset + + var _v = nTwnDive.interpolate_property(self, 'global_position', self.global_position,vector_target_position, twn_duration*0.8, Tween.TRANS_QUART, Tween.EASE_OUT) + _v = nTwnDive.start() + create_splash(10,15,(self.global_position-vector_target_position),(self.global_position-vector_target_position)/2) createSpherize() - vectorVelocity=Vector2()#(self.global_position-vector_target_position).normalized()*maximum_speed #Add conservation of momentum maybe + $camera2D.minorShake() + + vectorVelocity = Vector2() #(self.global_position-vector_target_position).normalized()*maximum_speed #Add conservation of momentum maybe #@Maybe allow for diving without the position "fixing" //@Add a dive buffer as well func create_splash(minimum=5,maximum=10,direction=Vector2(0,-1),offset=Vector2()): - for a in range(rand_range(minimum,maximum)): - var i=drop.instance() + for _a in range(rand_range(minimum,maximum)): + var i = drop.instance() i.global_position=self.global_position+offset*Vector2(rand_range(-0.5,0.5),rand_range(-0.5,0.5)) i.direction=direction.normalized() get_tree().current_scene.add_child(i) -func createSpherize(): - var i=spherizeShader.instance() - i.global_position=self.global_position + +func createSpherize(vGlobalPosition:Vector2 = self.global_position): + var i = spherizeShader.instance() + i.global_position = vGlobalPosition # get_tree().root.add_child(i) get_parent().add_child(i) + func _create_spritetrail(): - if flag_can_create_spritetrail == true: - flag_can_create_spritetrail = false; $timers/tmr_spritetrail.start() - var i = spritetrail.instance() - i.texture = $sprite.texture - i.hframes = $sprite.hframes - i.vframes = $sprite.vframes - i.flip_h=$sprite.flip_h - i.frame = $sprite.frame - i.scale = $sprite.scale - i.rotation = $sprite.global_rotation - i.global_position = $sprite.global_position - i.modulate = color_spritetrail - i.fade_increment = 0.05 - get_parent().add_child(i) + return +# if flag_can_create_spritetrail == true: +# flag_can_create_spritetrail = false +# $timers/tmr_spritetrail.start() +# var i = spritetrail.instance() +# i.texture = $sprite.texture +# i.hframes = $sprite.hframes +# i.vframes = $sprite.vframes +# i.flip_h=$sprite.flip_h +# i.frame = $sprite.frame +# i.scale = $sprite.scale +# i.rotation = $sprite.global_rotation +# i.global_position = $sprite.global_position +# i.modulate = color_spritetrail +# i.fade_increment = 0.05 +# i.modulate.a = 0.66 +# i.z_index = -1 +# get_parent().add_child(i) -func _twn_squishy( scale_vector = Vector2(0.50, 1.50) ): +func _twn_squishy(scale_vector = Vector2(0.50, 1.50)) -> void: + $twn_squishy.interpolate_property($sprite, 'scale', $sprite.scale * scale_vector, Vector2(1,1), 0.5, Tween.TRANS_QUINT, Tween.EASE_OUT) + $twn_squishy.start() + +func tweenLandSquish(scale_vector = Vector2(1.50, 0.50)) -> void: $twn_squishy.interpolate_property($sprite, 'scale', $sprite.scale * scale_vector, Vector2(1,1), 0.5, Tween.TRANS_QUINT, Tween.EASE_OUT) $twn_squishy.start() -func _on_tmr_spritetrail_timeout(): flag_can_create_spritetrail = true +func _on_tmr_spritetrail_timeout(): + flag_can_create_spritetrail = true -func _on_twn_dive_tween_started(object, key): - self.active=false - $sprite.modulate.a=0 if $sprite.modulate.a==1 else 1 - $eyes.visible=!$eyes.visible - self.flag_constant_spritetrail=true +func _on_twn_dive_tween_started(_object, _key) -> void: + self.active = false + nSprite.modulate.a = 0 if nSprite.modulate.a == 1 else 1 + $eyes.visible = !$eyes.visible + self.flag_constant_spritetrail = true set_collision_layer_bit(0, false) set_collision_mask_bit(0, false) -func _on_twn_dive_tween_completed(object, key): + +func _on_twn_dive_tween_completed(_object, _key) -> void: self.active=true self.flag_constant_spritetrail=false if self.state==State_normal: @@ -171,7 +247,7 @@ func _on_twn_dive_tween_completed(object, key): else: pass -func footstepSfx(): +func footstepSfx() -> void: var footsteps=["res://Resources/SFX/footsteps/footstep_grass_000.ogg","res://Resources/SFX/footsteps/footstep_grass_001.ogg","res://Resources/SFX/footsteps/footstep_grass_002.ogg","res://Resources/SFX/footsteps/footstep_grass_003.ogg","res://Resources/SFX/footsteps/footstep_grass_004.ogg"] $sounds.get_node("sndFootsteps").stream=load(footsteps[randi()%footsteps.size()]) $sounds.get_node("sndFootsteps").play() diff --git a/Scenes/player_default/player.tscn b/Scenes/player_default/player.tscn index ab3eb10..72e1cd6 100644 --- a/Scenes/player_default/player.tscn +++ b/Scenes/player_default/player.tscn @@ -1,14 +1,16 @@ -[gd_scene load_steps=18 format=2] +[gd_scene load_steps=20 format=2] [ext_resource path="res://Scenes/player_default/player.gd" type="Script" id=1] [ext_resource path="res://Resources/Textures/white.png" type="Texture" id=2] -[ext_resource path="res://Resources/MoreTextures/player.png" type="Texture" id=3] +[ext_resource path="res://Resources/MoreTextures/playerOutlined.png" type="Texture" id=3] [ext_resource path="res://icon.png" type="Texture" id=4] [ext_resource path="res://Resources/SFX/Jump.wav" type="AudioStream" id=5] [ext_resource path="res://Resources/SFX/Landing.wav" type="AudioStream" id=6] [ext_resource path="res://Resources/SFX/Dive1.wav" type="AudioStream" id=7] [ext_resource path="res://Resources/SFX/Dive3.wav" type="AudioStream" id=8] [ext_resource path="res://Resources/SFX/Dive2.wav" type="AudioStream" id=9] +[ext_resource path="res://Resources/MoreTextures/vignette.png" type="Texture" id=10] +[ext_resource path="res://Scenes/camera2D.gd" type="Script" id=11] [sub_resource type="Animation" id=1] resource_name = "going_down" @@ -89,7 +91,7 @@ tracks/1/keys = { "times": PoolRealArray( 0, 0.5 ), "transitions": PoolRealArray( 1, 1 ), "update": 1, -"values": [ Vector2( 0, 1 ), Vector2( 0, 2 ) ] +"values": [ Vector2( 0, -8 ), Vector2( 0, -7 ) ] } [sub_resource type="Animation" id=4] @@ -148,11 +150,14 @@ height = 8.0 [sub_resource type="GDScript" id=7] script/source = "extends Node2D + const green=Color('afff00')#Color('84ad42') const red=Color('c0461f') -func _ready():set_process(true) -func _process(delta): +func _ready() -> void: + set_process(true) + +func _process(_delta) -> void: var phaseable=true for body in $dive_aim.get_overlapping_bodies(): if body.is_in_group('Unphaseable'): phaseable=false @@ -173,6 +178,13 @@ z_as_relative = false script = ExtResource( 1 ) color_spritetrail = Color( 1, 1, 1, 1 ) +[node name="camera2D" type="Camera2D" parent="."] +limit_left = 0 +limit_top = 0 +limit_right = 384 +limit_bottom = 216 +script = ExtResource( 11 ) + [node name="animation_player" type="AnimationPlayer" parent="."] autoplay = "idle" anims/going_down = SubResource( 1 ) @@ -187,16 +199,17 @@ anims/walk = SubResource( 4 ) [node name="twn_fadeout" type="Tween" parent="."] [node name="collision_shape_2d" type="CollisionShape2D" parent="."] -position = Vector2( 0, 1 ) +position = Vector2( 0, -7 ) shape = SubResource( 5 ) [node name="collision_shape_2d2" type="CollisionShape2D" parent="."] +position = Vector2( 0, -8 ) shape = SubResource( 6 ) disabled = true [node name="eyes" type="Sprite" parent="."] visible = false -position = Vector2( 0, 1 ) +position = Vector2( 0, -8 ) z_index = 10 z_as_relative = false @@ -214,34 +227,47 @@ centered = false [node name="sprite" type="Sprite" parent="."] use_parent_material = true +position = Vector2( 0, -1 ) texture = ExtResource( 3 ) +offset = Vector2( 0, -8 ) hframes = 9 -frame = 4 [node name="timers" type="Node2D" parent="."] +position = Vector2( 0, -7 ) [node name="tmr_spritetrail" type="Timer" parent="timers"] -wait_time = 0.1 +wait_time = 0.001 one_shot = true [node name="tmr_invencibility" type="Timer" parent="timers"] [node name="area_2d" type="Area2D" parent="."] +position = Vector2( 0, -9 ) [node name="collision_shape_2d" type="CollisionShape2D" parent="area_2d"] shape = SubResource( 5 ) [node name="dive_aim" type="Node2D" parent="."] +position = Vector2( 0, -9 ) +z_index = 100 +z_as_relative = false script = SubResource( 7 ) [node name="dive_aim" type="Area2D" parent="dive_aim"] -position = Vector2( 16, 0 ) +position = Vector2( 20, 0 ) [node name="sprite" type="Sprite" parent="dive_aim/dive_aim"] visible = false scale = Vector2( 0.0625, 0.0625 ) texture = ExtResource( 4 ) +[node name="polygon2dBg" type="Polygon2D" parent="dive_aim/dive_aim"] +position = Vector2( -2, 0 ) +scale = Vector2( 1.2, 1.2 ) +color = Color( 0, 0, 0, 1 ) +polygon = PoolVector2Array( -5, -2, -7, 0, -5, 2, 3, 0 ) +vertex_colors = PoolColorArray( 0.3, 0.3, 0.3, 0.9, 0.3, 0.3, 0.3, 0.5, 0.3, 0.3, 0.3, 0.9 ) + [node name="polygon_2d" type="Polygon2D" parent="dive_aim/dive_aim"] position = Vector2( -3, 0 ) polygon = PoolVector2Array( -5, -2, -7, 0, -5, 2, 3, 0 ) @@ -286,6 +312,14 @@ bus = "sfx" stream = ExtResource( 9 ) volume_db = 9.0 bus = "sfx" + +[node name="layerVignette" type="CanvasLayer" parent="."] + +[node name="sprVignette" type="Sprite" parent="layerVignette"] +modulate = Color( 0, 0, 0, 0 ) +texture = ExtResource( 10 ) +centered = false + [connection signal="tween_completed" from="twn_dive" to="." method="_on_twn_dive_tween_completed"] [connection signal="tween_started" from="twn_dive" to="." method="_on_twn_dive_tween_started"] [connection signal="timeout" from="timers/tmr_spritetrail" to="." method="_on_tmr_spritetrail_timeout"] diff --git a/Scenes/screenTransition/transitionLayer.gd b/Scenes/screenTransition/transitionLayer.gd index 2cca8dd..ae6d023 100644 --- a/Scenes/screenTransition/transitionLayer.gd +++ b/Scenes/screenTransition/transitionLayer.gd @@ -7,19 +7,20 @@ const lightMaskSpacing=64 var lightMask=preload("res://Scenes/screenTransition/light2DforMasking.tscn") var deleteNext=false var nextLevel=PackedScene -func _ready(): + +func _ready() -> void: $twnGrow.connect("tween_all_completed",self,"tweenEnded") - var d=0 + var d = 0 for i in range(0,global.defaultResolution.x+lightMaskSpacing*0.1,lightMaskSpacing): for j in range(0,global.defaultResolution.y+lightMaskSpacing*0.3,lightMaskSpacing): createLight(i,j) d+=1 - print_debug(d) func createLight(x,y): var i=lightMask.instance() i.global_position=Vector2(x,y) i.texture_scale=0 + i.range_layer_max = 1000 $twnGrow.interpolate_property(i,"texture_scale",i.texture_scale,maximumLightMaskSize,duration,Tween.TRANS_QUINT,Tween.EASE_OUT,baseDelay+delay*2*(x+y)/lightMaskSpacing) $twnGrow.start() $lights.add_child(i) diff --git a/Scenes/screenTransition/transitionLayer.tscn b/Scenes/screenTransition/transitionLayer.tscn index bdb25ce..731231e 100644 --- a/Scenes/screenTransition/transitionLayer.tscn +++ b/Scenes/screenTransition/transitionLayer.tscn @@ -7,7 +7,7 @@ light_mode = 2 [node name="transitionLayer" type="CanvasLayer"] -layer = 0 +layer = 128 script = ExtResource( 2 ) [node name="twnGrow" type="Tween" parent="."] diff --git a/Scenes/spherizeShader.tscn b/Scenes/spherizeShader.tscn index 759876d..5cdc50a 100644 --- a/Scenes/spherizeShader.tscn +++ b/Scenes/spherizeShader.tscn @@ -5,12 +5,15 @@ [sub_resource type="GDScript" id=1] script/source = "extends BackBufferCopy -var duration=3 + +var duration=1 var strength=0.00043 + func _ready(): $twnStrength.interpolate_property($sprite.material,\"shader_param/strength\",strength,0,duration,Tween.TRANS_QUINT,Tween.EASE_OUT) $twnStrength.interpolate_property($sprite,\"modulate:a\",0.8,0,duration,Tween.TRANS_QUINT,Tween.EASE_OUT) $twnStrength.start() + func _on_twnStrength_tween_all_completed(): self.queue_free() # @@ -35,4 +38,5 @@ material = ExtResource( 2 ) texture = ExtResource( 1 ) [node name="twnStrength" type="Tween" parent="."] + [connection signal="tween_all_completed" from="twnStrength" to="." method="_on_twnStrength_tween_all_completed"] diff --git a/Scenes/spotlight.tscn b/Scenes/spotlight.tscn index d990643..b7e0ff7 100644 --- a/Scenes/spotlight.tscn +++ b/Scenes/spotlight.tscn @@ -19,7 +19,7 @@ func _process(delta): [node name="spotlight" type="Polygon2D"] color = Color( 0.807843, 0.678431, 0.45098, 0.25 ) antialiased = true -polygon = PoolVector2Array( -16.2602, 72.8509, 14.1519, 73.1745, 0, 0 ) +polygon = PoolVector2Array( -16.2602, 72.8509, 14.1519, 73.1745, 2, 1, -2, 1 ) vertex_colors = PoolColorArray( 0, 0, 0, 0.25, 0, 0, 0, 0.25 ) script = SubResource( 1 ) diff --git a/Scenes/spotlight_on_rails.tscn b/Scenes/spotlight_on_rails.tscn index bc03b41..af2b240 100644 --- a/Scenes/spotlight_on_rails.tscn +++ b/Scenes/spotlight_on_rails.tscn @@ -4,16 +4,18 @@ [sub_resource type="GDScript" id=1] script/source = "extends Path2D -export (bool) var loop=false -export (float) var duration=1.0 -var target_offset=1 -onready var spotlight_on_rails=$path_follow_2d -func _ready(): - spotlight_on_rails.loop=self.loop + +export (bool) var loop = false +export (float) var duration = 1.0 +var target_offset = 1 +onready var spotlight_on_rails = $path_follow_2d + +func _ready() -> void: + spotlight_on_rails.loop = self.loop $twn_offset.interpolate_property(spotlight_on_rails, 'unit_offset', spotlight_on_rails.unit_offset, self.target_offset, self.duration, Tween.TRANS_SINE, Tween.EASE_IN_OUT) $twn_offset.start() -func _on_twn_offset_tween_completed(object, key): +func _on_twn_offset_tween_completed(_object, _key) -> void: self.target_offset=0 if spotlight_on_rails.unit_offset>0.9 else 1 _ready() " @@ -46,4 +48,5 @@ loop = false [node name="spotlight" parent="path_follow_2d" instance=ExtResource( 1 )] script = SubResource( 2 ) + [connection signal="tween_completed" from="twn_offset" to="." method="_on_twn_offset_tween_completed"] diff --git a/Scenes/spotlight_on_timer.tscn b/Scenes/spotlight_on_timer.tscn index 0d1c57c..2ef316d 100644 --- a/Scenes/spotlight_on_timer.tscn +++ b/Scenes/spotlight_on_timer.tscn @@ -3,18 +3,17 @@ [ext_resource path="res://Resources/MoreTextures/lights.png" type="Texture" id=1] [sub_resource type="GDScript" id=1] - resource_name = "spotlight_on_timer" script/source = "extends Node2D -export (float) var wait_time=1 -export (float) var delay=0 +export (float) var wait_time = 1.0 +export (float) var delay = 0.0 func _ready(): $timer.wait_time=self.wait_time+delay $timer.start() $area_2d/collision_polygon_2d.polygon=self.polygon set_process(true) -func _process(delta): +func _process(_delta) -> void: $progress_bar.value=$progress_bar.max_value*($timer.wait_time-$timer.time_left)/$timer.wait_time for body in $area_2d.get_overlapping_bodies(): if body.is_in_group('Player'): @@ -28,43 +27,14 @@ func _on_timer_timeout(): else: self.self_modulate.a=1 $sprite.frame=0 - $area_2d/collision_polygon_2d.disabled=false" -_sections_unfolded = [ "Resource" ] + $area_2d/collision_polygon_2d.disabled=false +" [sub_resource type="StyleBoxFlat" id=2] - -content_margin_left = -1.0 -content_margin_right = -1.0 -content_margin_top = -1.0 -content_margin_bottom = -1.0 bg_color = Color( 1, 1, 1, 1 ) -draw_center = true -border_width_left = 0 -border_width_top = 0 -border_width_right = 0 -border_width_bottom = 0 -border_color = Color( 0.8, 0.8, 0.8, 1 ) -border_blend = false -corner_radius_top_left = 0 -corner_radius_top_right = 0 -corner_radius_bottom_right = 0 -corner_radius_bottom_left = 0 -corner_detail = 8 -expand_margin_left = 0.0 -expand_margin_right = 0.0 -expand_margin_top = 0.0 -expand_margin_bottom = 0.0 -shadow_color = Color( 0, 0, 0, 0.6 ) -shadow_size = 0 -anti_aliasing = true -anti_aliasing_size = 1 +anti_aliasing_size = 1.0 [sub_resource type="StyleBoxFlat" id=3] - -content_margin_left = -1.0 -content_margin_right = -1.0 -content_margin_top = -1.0 -content_margin_bottom = -1.0 bg_color = Color( 1, 1, 1, 1 ) draw_center = false border_width_left = 1 @@ -72,97 +42,35 @@ border_width_top = 1 border_width_right = 1 border_width_bottom = 1 border_color = Color( 0.628906, 0.628906, 0.628906, 1 ) -border_blend = false -corner_radius_top_left = 0 -corner_radius_top_right = 0 -corner_radius_bottom_right = 0 -corner_radius_bottom_left = 0 -corner_detail = 8 -expand_margin_left = 0.0 -expand_margin_right = 0.0 -expand_margin_top = 0.0 -expand_margin_bottom = 0.0 -shadow_color = Color( 0, 0, 0, 0.6 ) -shadow_size = 0 -anti_aliasing = true -anti_aliasing_size = 1 -_sections_unfolded = [ "Border", "Border Width" ] +anti_aliasing_size = 1.0 [node name="spotlight_on_timer" type="Polygon2D"] - -polygon = PoolVector2Array( -24, 72, 24, 72, 0.0959015, 0.603569 ) -uv = PoolVector2Array( ) color = Color( 0.807843, 0.678431, 0.45098, 0.247059 ) -vertex_colors = PoolColorArray( 0, 0, 0, 0.25, 0, 0, 0, 0.25 ) -offset = Vector2( 0, 0 ) antialiased = true -texture = null -texture_offset = Vector2( 0, 0 ) -texture_scale = Vector2( 1, 1 ) -texture_rotation_degrees = 0.0 -invert_enable = false -invert_border = 100.0 +polygon = PoolVector2Array( -24, 72, 24, 72, 0.0959015, 0.603569 ) +vertex_colors = PoolColorArray( 0, 0, 0, 0.25, 0, 0, 0, 0.25 ) script = SubResource( 1 ) -_sections_unfolded = [ "Texture", "Transform" ] -wait_time = 1 -delay = 0 -[node name="progress_bar" type="ProgressBar" parent="." index="0"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 +[node name="progress_bar" type="ProgressBar" parent="."] margin_left = -8.0 margin_top = -10.0 margin_right = 8.0 margin_bottom = -8.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 0 custom_styles/fg = SubResource( 2 ) custom_styles/bg = SubResource( 3 ) -min_value = 0.0 -max_value = 100.0 step = 1.0 -page = 0.0 value = 50.0 -exp_edit = false -rounded = false percent_visible = false -_sections_unfolded = [ "Percent" ] - -[node name="sprite" type="Sprite" parent="." index="1"] +[node name="sprite" type="Sprite" parent="."] texture = ExtResource( 1 ) hframes = 2 -_sections_unfolded = [ "Animation", "Transform" ] -[node name="area_2d" type="Area2D" parent="." index="2"] +[node name="area_2d" type="Area2D" parent="."] -input_pickable = true -gravity_vec = Vector2( 0, 1 ) -gravity = 98.0 -linear_damp = 0.1 -angular_damp = 1.0 -audio_bus_override = false -audio_bus_name = "Master" +[node name="collision_polygon_2d" type="CollisionPolygon2D" parent="area_2d"] -[node name="collision_polygon_2d" type="CollisionPolygon2D" parent="area_2d" index="0"] - -build_mode = 0 -polygon = PoolVector2Array( ) - -[node name="timer" type="Timer" parent="." index="3"] - -process_mode = 1 -wait_time = 1.0 -one_shot = false +[node name="timer" type="Timer" parent="."] autostart = true [connection signal="timeout" from="timer" to="." method="_on_timer_timeout"] - - diff --git a/Scenes/spotlight_spinner.tscn b/Scenes/spotlight_spinner.tscn index 10b6967..3ac40f5 100644 --- a/Scenes/spotlight_spinner.tscn +++ b/Scenes/spotlight_spinner.tscn @@ -3,56 +3,47 @@ [ext_resource path="res://Scenes/spotlight.tscn" type="PackedScene" id=1] [sub_resource type="GDScript" id=1] - script/source = "extends Node2D export (float) var speed=0.5 func _ready(): set_process(true) -func _process(delta): self.rotation+=self.speed*delta" +func _process(delta): self.rotation+=self.speed*delta +" [sub_resource type="GDScript" id=2] - script/source = "extends Node2D -func _ready(): - $area_2d/collision_polygon_2d.polygon=self.polygon +func _ready() -> void: + $area_2d/collision_polygon_2d.polygon = self.polygon set_process(true) -func _process(delta): - self.modulate.r=1 +func _process(delta:float) -> void: + self.modulate.r = 1 for body in $area_2d.get_overlapping_bodies(): if body.is_in_group('Player'): - get_tree().reload_current_scene() #@Make a better gameover - self.modulate.r=30" + var _v = get_tree().reload_current_scene() #@Make a better gameover + self.modulate.r = 30 +" [node name="spotlight_spinner" type="Node2D"] - script = SubResource( 1 ) -_sections_unfolded = [ "Transform" ] -speed = 0.5 - -[node name="1" parent="." index="0" instance=ExtResource( 1 )] +[node name="1" parent="." instance=ExtResource( 1 )] position = Vector2( 0, 8 ) script = SubResource( 2 ) -[node name="2" parent="." index="1" instance=ExtResource( 1 )] - +[node name="2" parent="." instance=ExtResource( 1 )] position = Vector2( -8, 0 ) rotation = 1.5708 script = SubResource( 2 ) -[node name="3" parent="." index="2" instance=ExtResource( 1 )] - +[node name="3" parent="." instance=ExtResource( 1 )] position = Vector2( 0, -8 ) rotation = 3.14159 script = SubResource( 2 ) -[node name="4" parent="." index="3" instance=ExtResource( 1 )] - +[node name="4" parent="." instance=ExtResource( 1 )] position = Vector2( 8, 0 ) rotation = 4.71239 script = SubResource( 2 ) - - diff --git a/Scenes/spotlight_with_button.tscn b/Scenes/spotlight_with_button.tscn index 0b48192..a04175f 100644 --- a/Scenes/spotlight_with_button.tscn +++ b/Scenes/spotlight_with_button.tscn @@ -1,19 +1,22 @@ -[gd_scene load_steps=9 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://Scenes/spotlight.tscn" type="PackedScene" id=1] [ext_resource path="res://Resources/MoreTextures/button.png" type="Texture" id=2] [ext_resource path="res://Resources/SFX/Laser_shoot 6.wav" type="AudioStream" id=3] +[ext_resource path="res://Scenes/line2dBgOutline.gd" type="Script" id=4] [sub_resource type="GDScript" id=1] - resource_name = "spotlight_with_button" script/source = "extends Node2D -export (bool) var activated=true -func _ready(): + +export (bool) var activated = true + +func _ready() -> void: if not activated: $spotlight.set_process(false) $spotlight.self_modulate.a=0 -func _on_area_2d_body_entered(body): + +func _on_area_2d_body_entered(body) -> void: if body.is_in_group('Player'): $snd_press.play() if $spotlight.is_processing(): @@ -25,11 +28,10 @@ func _on_area_2d_body_entered(body): $spotlight.set_process(true) $spotlight/sprite.frame=0 $twn_spotlightfade.interpolate_property($spotlight, 'self_modulate:a', $spotlight.self_modulate.a, 1, 0.4, Tween.TRANS_QUART, Tween.EASE_IN) - $twn_spotlightfade.start()" -_sections_unfolded = [ "Resource" ] + $twn_spotlightfade.start() +" [sub_resource type="GDScript" id=2] - resource_name = "spotlight_with_button_line2d" script/source = "tool extends Line2D @@ -37,11 +39,10 @@ extends Line2D func _ready(): # return #self.points[0]=Vector2(0,0) - self.points[self.points.size()-1]=get_parent().get_node('button').position+get_parent().get_node('button/sprite').position" -_sections_unfolded = [ "Resource" ] + self.points[self.points.size()-1]=get_parent().get_node('button').position+get_parent().get_node('button/sprite').position +" [sub_resource type="GDScript" id=3] - script/source = "extends Node2D func _ready(): @@ -51,32 +52,34 @@ func _ready(): func _process(delta): for body in $area_2d.get_overlapping_bodies(): if body.is_in_group('Player'): - global.reload_stage()" -_sections_unfolded = [ "Resource" ] + global.reload_stage() +" [sub_resource type="RectangleShape2D" id=4] - -custom_solver_bias = 0.0 extents = Vector2( 8, 3 ) [sub_resource type="RectangleShape2D" id=5] - -custom_solver_bias = 0.0 extents = Vector2( 8, 3 ) [node name="spotlight_with_button" type="Node2D"] - position = Vector2( 8, 8 ) script = SubResource( 1 ) -_sections_unfolded = [ "Transform" ] __meta__ = { "_edit_horizontal_guides_": [ 61.0, 67.0 ], "_edit_vertical_guides_": [ 48.0, 64.0 ] } -activated = true -[node name="line_2d" type="Line2D" parent="." index="0"] +[node name="line2dBgOutline" type="Line2D" parent="."] +points = PoolVector2Array( 0, 0, 48, 0, 48, 56 ) +width = 4.0 +default_color = Color( 0, 0, 0, 1 ) +texture_mode = 593255583 +joint_mode = 1 +begin_cap_mode = 2 +end_cap_mode = 2 +script = ExtResource( 4 ) +[node name="line_2d" type="Line2D" parent="."] points = PoolVector2Array( 0, 0, 48, 0, 48, 56 ) width = 2.0 default_color = Color( 0.40625, 0.40625, 0.40625, 1 ) @@ -84,73 +87,33 @@ texture_mode = 593255583 joint_mode = 1 begin_cap_mode = 2 end_cap_mode = 2 -sharp_limit = 2.0 -round_precision = 8 script = SubResource( 2 ) -_sections_unfolded = [ "Capping" ] -[node name="twn_spotlightfade" type="Tween" parent="." index="1"] - -repeat = false -playback_process_mode = 1 -playback_speed = 1.0 -playback/active = false -playback/repeat = false -playback/speed = 1.0 - -[node name="spotlight" parent="." index="2" instance=ExtResource( 1 )] +[node name="twn_spotlightfade" type="Tween" parent="."] +[node name="spotlight" parent="." instance=ExtResource( 1 )] color = Color( 0.807843, 0.678431, 0.45098, 0.6 ) script = SubResource( 3 ) -[node name="button" type="Area2D" parent="." index="3"] - +[node name="button" type="Area2D" parent="."] position = Vector2( 48, 48 ) -input_pickable = true -gravity_vec = Vector2( 0, 1 ) -gravity = 98.0 -linear_damp = 0.1 -angular_damp = 1.0 -audio_bus_override = false -audio_bus_name = "Master" -_sections_unfolded = [ "Transform" ] - -[node name="sprite" type="Sprite" parent="button" index="0"] +[node name="sprite" type="Sprite" parent="button"] position = Vector2( 0, 8 ) texture = ExtResource( 2 ) -_sections_unfolded = [ "Offset", "Transform" ] - -[node name="collision_shape_2d" type="CollisionShape2D" parent="button" index="1"] +[node name="collision_shape_2d" type="CollisionShape2D" parent="button"] position = Vector2( 0, 7 ) shape = SubResource( 4 ) -[node name="static_body_2d" type="StaticBody2D" parent="button" index="2"] - +[node name="static_body_2d" type="StaticBody2D" parent="button"] position = Vector2( 0, 9 ) -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 -_sections_unfolded = [ "Transform" ] - -[node name="collision_shape_2d" type="CollisionShape2D" parent="button/static_body_2d" index="0"] +[node name="collision_shape_2d" type="CollisionShape2D" parent="button/static_body_2d"] shape = SubResource( 5 ) -_sections_unfolded = [ "Transform" ] - -[node name="snd_press" type="AudioStreamPlayer" parent="." index="4"] +[node name="snd_press" type="AudioStreamPlayer" parent="."] stream = ExtResource( 3 ) -volume_db = 0.0 -autoplay = false -mix_target = 0 bus = "sfx" [connection signal="body_entered" from="button" to="." method="_on_area_2d_body_entered"] - - diff --git a/Scenes/spritetrail/sprite_trail.tscn b/Scenes/spritetrail/sprite_trail.tscn index 8c1d734..b723404 100644 --- a/Scenes/spritetrail/sprite_trail.tscn +++ b/Scenes/spritetrail/sprite_trail.tscn @@ -1,7 +1,6 @@ [gd_scene load_steps=2 format=2] [sub_resource type="GDScript" id=1] - resource_name = "spritetrail" script/source = "extends Sprite var fade_increment = 0.03 @@ -9,7 +8,7 @@ func _ready(): set_process(true) self.set_modulate( get_modulate() - Color(0,0,0,0.2)) -func _process(delta): +func _process(_delta) -> void: var color = self.get_modulate() if color.a <= 0: self.queue_free() @@ -18,12 +17,7 @@ func _process(delta): set_modulate(color) " -_sections_unfolded = [ "Resource" ] [node name="spritetrail" type="Sprite"] - z_index = 5 script = SubResource( 1 ) -_sections_unfolded = [ "Transform", "Visibility", "Z Index" ] - - diff --git a/Scenes/stage_reseter.tscn b/Scenes/stage_reseter.tscn index 619bc06..c5d769c 100644 --- a/Scenes/stage_reseter.tscn +++ b/Scenes/stage_reseter.tscn @@ -1,63 +1,42 @@ [gd_scene load_steps=2 format=2] [sub_resource type="GDScript" id=1] - resource_name = "stage_reseter" script/source = "extends Node2D -var blinks=0 -func _ready(): + +var blinks := 0 + +func _ready() -> void: print('Stage reseter: Player caught. Blinking the stage...') - get_tree().paused=true -# $tween.interpolate_property($canvas_modulate, 'color', $canvas_modulate.color, Color(0,0,0), 0.4, Tween.TRANS_QUART, Tween.EASE_IN, 0.1) -# $tween.start() -# yield(get_tree().create_timer(0.5), \"timeout\") -# get_tree().reload_current_scene() -# get_tree().paused=false + get_tree().paused = true -func _on_tween_tween_completed(object, key): +func _on_tween_tween_completed(_object, _key) -> void: yield(get_tree().create_timer(0.2), \"timeout\") - get_tree().reload_current_scene() - get_tree().paused=false + var _v = get_tree().reload_current_scene() + get_tree().paused = false - -func _on_timer_timeout(): - get_tree().current_scene.modulate.a=0 if get_tree().current_scene.modulate.a==1 else 1 - blinks+=1 - if blinks>5: - get_tree().reload_current_scene() +func _on_timer_timeout() -> void: + get_tree().current_scene.modulate.a = 0 if get_tree().current_scene.modulate.a == 1 else 1 + blinks += 1 + if blinks > 5: + var _v = get_tree().reload_current_scene() get_tree().paused=false print('Stage reseter: Stage reseted. Deleting self, bai!') - self.queue_free()" -_sections_unfolded = [ "Resource" ] + self.queue_free() +" [node name="stage_reseter" type="Node2D"] - pause_mode = 2 script = SubResource( 1 ) -_sections_unfolded = [ "Pause" ] -[node name="tween" type="Tween" parent="." index="0"] - -repeat = false -playback_process_mode = 1 -playback_speed = 1.0 -playback/active = false -playback/repeat = false -playback/speed = 1.0 - -[node name="canvas_modulate" type="CanvasModulate" parent="." index="1"] +[node name="tween" type="Tween" parent="."] +[node name="canvas_modulate" type="CanvasModulate" parent="."] color = Color( 1, 0.662745, 0.662745, 0.396078 ) -[node name="timer" type="Timer" parent="." index="2"] - -process_mode = 1 +[node name="timer" type="Timer" parent="."] wait_time = 0.1 -one_shot = false autostart = true [connection signal="tween_completed" from="tween" to="." method="_on_tween_tween_completed"] - [connection signal="timeout" from="timer" to="." method="_on_timer_timeout"] - - diff --git a/Scenes/stages/0.tscn b/Scenes/stages/0.tscn index e78c416..dbc276f 100644 --- a/Scenes/stages/0.tscn +++ b/Scenes/stages/0.tscn @@ -49,14 +49,17 @@ extra_spacing_char = 2 font_data = ExtResource( 8 ) [sub_resource type="GDScript" id=3] -script/source = "extends Label -export (float) var extra_delay=0 +script/source = "extends Label + +export (float) var extra_delay = 0.0 + func _ready(): self.modulate.a=0 - $twn_fade.interpolate_property(self, 'modulate:a', 0, 1, 1.5, Tween.TRANS_QUART, Tween.EASE_IN, 0.5+extra_delay) + $twn_fade.interpolate_property(self, 'modulate:a', 0, 1, 1.5, Tween.TRANS_QUART, Tween.EASE_IN, 0.5 + extra_delay) $twn_fade.start() $twn_goup.interpolate_property(self, 'rect_global_position:y', self.rect_global_position.y, self.rect_global_position.y-16, 2.0, Tween.TRANS_QUART, Tween.EASE_IN_OUT, 0.5+extra_delay) - $twn_goup.start()" + $twn_goup.start() +" [node name="stage" type="Node2D"] __meta__ = { @@ -104,10 +107,10 @@ position = Vector2( 280, 56 ) [node name="diver" type="Label" parent="stage/diver_down"] margin_right = 210.0 margin_bottom = 20.0 -custom_fonts/font = SubResource( 2 ) custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) custom_constants/shadow_offset_x = 3 custom_constants/shadow_offset_y = 3 +custom_fonts/font = SubResource( 2 ) text = "Diver" script = SubResource( 3 ) extra_delay = 0.25 @@ -121,10 +124,10 @@ margin_left = 16.0 margin_top = 32.0 margin_right = 226.0 margin_bottom = 71.0 -custom_fonts/font = SubResource( 2 ) custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) custom_constants/shadow_offset_x = 3 custom_constants/shadow_offset_y = 3 +custom_fonts/font = SubResource( 2 ) text = "Down" script = SubResource( 3 ) __meta__ = { @@ -142,15 +145,12 @@ margin_top = 60.707 margin_right = 276.052 margin_bottom = 99.707 rect_scale = Vector2( 0.25, 0.25 ) -custom_fonts/font = SubResource( 2 ) custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) custom_constants/shadow_offset_x = 3 custom_constants/shadow_offset_y = 3 -text = "V1.1.1" +custom_fonts/font = SubResource( 2 ) +text = "V1.2" script = SubResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} extra_delay = 0.75 [node name="twn_fade" type="Tween" parent="stage/diver_down/version"] diff --git a/Scenes/stages/10.tscn b/Scenes/stages/10.tscn index 46338c3..e347747 100644 --- a/Scenes/stages/10.tscn +++ b/Scenes/stages/10.tscn @@ -50,18 +50,21 @@ _data = { [sub_resource type="GDScript" id=4] script/source = "extends Path2D -export (bool) var loop=false -export (float) var duration=1.0 -var target_offset=1 -onready var spotlight_on_rails=$path_follow_2d + +export (bool) var loop = false +export (float) var duration = 1.0 +var target_offset = 1 +onready var spotlight_on_rails = $path_follow_2d + func _ready(): spotlight_on_rails.loop=self.loop $twn_offset.interpolate_property(spotlight_on_rails, 'unit_offset', spotlight_on_rails.unit_offset, self.target_offset, self.duration, Tween.TRANS_SINE, Tween.EASE_IN_OUT) $twn_offset.start() -func _on_twn_offset_tween_completed(object, key): - self.target_offset=0 if spotlight_on_rails.unit_offset>0.9 else 1 - _ready()" +func _on_twn_offset_tween_completed(_object, _key) -> void: + self.target_offset = 0 if spotlight_on_rails.unit_offset > 0.9 else 1 + _ready() +" [sub_resource type="GDScript" id=5] script/source = "extends Node2D @@ -70,12 +73,13 @@ func _ready(): $area_2d/collision_polygon_2d.polygon=self.polygon set_process(true) -func _process(delta): - self.modulate.r=1 +func _process(_delta) -> void: + self.modulate.r = 1 for body in $area_2d.get_overlapping_bodies(): if body.is_in_group('Player'): - get_tree().reload_current_scene() #@Make a better gameover - self.modulate.r=30" + var _v = get_tree().reload_current_scene() #@Make a better gameover + self.modulate.r = 30 +" [node name="stage" type="Node2D"] @@ -165,8 +169,8 @@ position = Vector2( 360, 104 ) [node name="grass6" parent="stage" instance=ExtResource( 10 )] position = Vector2( 312, 72 ) + [connection signal="tween_completed" from="stage/spotlight_on_rails3/twn_offset" to="stage/spotlight_on_rails3" method="_on_twn_offset_tween_completed"] [editable path="stage/spotlight_on_rails"] - [editable path="stage/spotlight_on_rails2"] diff --git a/Scenes/stages/13.tscn b/Scenes/stages/13.tscn index 9baf171..22887f8 100644 --- a/Scenes/stages/13.tscn +++ b/Scenes/stages/13.tscn @@ -52,70 +52,70 @@ margin_bottom = 40.0 [node name="spotlight_with_button" parent="stage" instance=ExtResource( 3 )] position = Vector2( 264, 24 ) -[node name="line_2d" parent="stage/spotlight_with_button" index="0"] +[node name="line_2d" parent="stage/spotlight_with_button" index="1"] points = PoolVector2Array( 0, 0, -64, 0, -64, 64, 0, 64, 0, 96, 0, 160, -192, 160, -192, 32, -128, 32, -128, 72 ) default_color = Color( 0.8, 0.4, 0.8, 1 ) -[node name="spotlight" parent="stage/spotlight_with_button" index="2"] +[node name="spotlight" parent="stage/spotlight_with_button" index="3"] polygon = PoolVector2Array( -16, 240, 16, 240, 0.0959015, 0.603569 ) -[node name="button" parent="stage/spotlight_with_button" index="3"] +[node name="button" parent="stage/spotlight_with_button" index="4"] position = Vector2( -128, 64 ) [node name="spotlight_with_button2" parent="stage" instance=ExtResource( 3 )] position = Vector2( 168, 24 ) -[node name="line_2d" parent="stage/spotlight_with_button2" index="0"] +[node name="line_2d" parent="stage/spotlight_with_button2" index="1"] points = PoolVector2Array( 0, 0, 0, 64, 64, 64, 64, 168 ) default_color = Color( 0.8, 0.4, 0.4, 1 ) -[node name="spotlight" parent="stage/spotlight_with_button2" index="2"] +[node name="spotlight" parent="stage/spotlight_with_button2" index="3"] polygon = PoolVector2Array( -16, 240, 16, 240, 0.0959015, 0.603569 ) -[node name="button" parent="stage/spotlight_with_button2" index="3"] +[node name="button" parent="stage/spotlight_with_button2" index="4"] position = Vector2( 64, 160 ) [node name="spotlight_with_button3" parent="stage" instance=ExtResource( 3 )] position = Vector2( 40, 88 ) -[node name="line_2d" parent="stage/spotlight_with_button3" index="0"] +[node name="line_2d" parent="stage/spotlight_with_button3" index="1"] points = PoolVector2Array( 0, 0, 0, 32, 128, 32, 128, 96, 0, 96, 0, 64, 32, 64, 32, 72 ) default_color = Color( 0.4, 0.8, 0.4, 1 ) -[node name="spotlight" parent="stage/spotlight_with_button3" index="2"] +[node name="spotlight" parent="stage/spotlight_with_button3" index="3"] rotation = -1.5708 polygon = PoolVector2Array( -16, 400, 16, 400, 0.0959015, 0.603569 ) -[node name="button" parent="stage/spotlight_with_button3" index="3"] +[node name="button" parent="stage/spotlight_with_button3" index="4"] position = Vector2( 32, 64 ) [node name="spotlight_with_button4" parent="stage" instance=ExtResource( 3 )] position = Vector2( 72, 24 ) activated = false -[node name="line_2d" parent="stage/spotlight_with_button4" index="0"] +[node name="line_2d" parent="stage/spotlight_with_button4" index="1"] points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 32, 128, 128, 128, 128, 168 ) default_color = Color( 0.4, 0.4, 0.8, 1 ) -[node name="spotlight" parent="stage/spotlight_with_button4" index="2"] +[node name="spotlight" parent="stage/spotlight_with_button4" index="3"] polygon = PoolVector2Array( -16, 240, 16, 240, 0.0959015, 0.603569 ) -[node name="button" parent="stage/spotlight_with_button4" index="3"] +[node name="button" parent="stage/spotlight_with_button4" index="4"] position = Vector2( 128, 160 ) [node name="spotlight_with_button5" parent="stage" instance=ExtResource( 3 )] position = Vector2( 360, 152 ) activated = false -[node name="line_2d" parent="stage/spotlight_with_button5" index="0"] +[node name="line_2d" parent="stage/spotlight_with_button5" index="1"] points = PoolVector2Array( 0, 0, 0, -96, -288, -96, -288, -64, -64, -64, -64, 0, -224, 0, -224, 8 ) default_color = Color( 0.8, 0.8, 0, 1 ) -[node name="spotlight" parent="stage/spotlight_with_button5" index="2"] +[node name="spotlight" parent="stage/spotlight_with_button5" index="3"] rotation = 1.5708 polygon = PoolVector2Array( -16, 400, 16, 400, 0.0959015, 0.603569 ) -[node name="button" parent="stage/spotlight_with_button5" index="3"] +[node name="button" parent="stage/spotlight_with_button5" index="4"] position = Vector2( -224, 0 ) [node name="tilemap" type="TileMap" parent="stage"] @@ -159,11 +159,7 @@ position = Vector2( 72, 120 ) position = Vector2( 296, 56 ) [editable path="stage/spotlight_with_button"] - [editable path="stage/spotlight_with_button2"] - [editable path="stage/spotlight_with_button3"] - [editable path="stage/spotlight_with_button4"] - [editable path="stage/spotlight_with_button5"] diff --git a/Scenes/stages/14.tscn b/Scenes/stages/14.tscn index 53ae3f5..4872d69 100644 --- a/Scenes/stages/14.tscn +++ b/Scenes/stages/14.tscn @@ -53,10 +53,13 @@ margin_bottom = 40.0 [node name="spotlight_with_button" parent="stage" instance=ExtResource( 3 )] position = Vector2( 312, 168 ) -[node name="line_2d" parent="stage/spotlight_with_button" index="0"] +[node name="line_2dbg" parent="stage/spotlight_with_button" index="0"] +points = PoolVector2Array( 0, 0, 48, 0, -272, -120 ) + +[node name="line_2d" parent="stage/spotlight_with_button" index="1"] points = PoolVector2Array( 0, 0, 0, -128, -272, -128, -272, -120 ) -[node name="button" parent="stage/spotlight_with_button" index="3"] +[node name="button" parent="stage/spotlight_with_button" index="4"] position = Vector2( -272, -128 ) [node name="tilemap" type="TileMap" parent="stage"] @@ -164,7 +167,5 @@ position = Vector2( 328, 120 ) flip_h = true [editable path="stage/spotlight_with_button"] - [editable path="stage/spotlight_spinner"] - [editable path="stage/spotlight_spinner2"] diff --git a/Scenes/stages/18.tscn b/Scenes/stages/18.tscn index 477d3a4..1b63119 100644 --- a/Scenes/stages/18.tscn +++ b/Scenes/stages/18.tscn @@ -100,7 +100,6 @@ next_level = ExtResource( 5 ) [node name="player" parent="stage" instance=ExtResource( 6 )] position = Vector2( 344, 184 ) -last_horizontal_direction = -1 [node name="str_stagename" parent="stage" instance=ExtResource( 7 )] text = "Stage 19: Mixed" diff --git a/Scenes/stages/19.tscn b/Scenes/stages/19.tscn index ef6c3b1..cc1a643 100644 --- a/Scenes/stages/19.tscn +++ b/Scenes/stages/19.tscn @@ -109,15 +109,15 @@ text = "Stage 20: Gauntlet" [node name="spotlight_with_button" parent="stage" instance=ExtResource( 9 )] position = Vector2( 104, 136 ) -[node name="line_2d" parent="stage/spotlight_with_button" index="0"] +[node name="line_2d" parent="stage/spotlight_with_button" index="1"] points = PoolVector2Array( 0, 32, 0, 0, 192, 0, 192, -96, 224, -96, 224, -72 ) -[node name="spotlight" parent="stage/spotlight_with_button" index="2"] +[node name="spotlight" parent="stage/spotlight_with_button" index="3"] position = Vector2( 0, 32 ) rotation = -1.5708 polygon = PoolVector2Array( -112, 336, 64, 336, 0.0959015, 0.603569 ) -[node name="button" parent="stage/spotlight_with_button" index="3"] +[node name="button" parent="stage/spotlight_with_button" index="4"] position = Vector2( 224, -80 ) [node name="vine" parent="stage/spotlight_with_button" instance=ExtResource( 10 )] diff --git a/Scenes/stages/20.tscn b/Scenes/stages/20.tscn index edda7fb..af35e0e 100644 --- a/Scenes/stages/20.tscn +++ b/Scenes/stages/20.tscn @@ -174,4 +174,5 @@ position = Vector2( 72, 72 ) [node name="grass5" parent="stage" instance=ExtResource( 11 )] position = Vector2( 280, 168 ) + [connection signal="body_entered" from="stage/next_level" to="stage/next_level" method="_on_next_level_body_entered"] diff --git a/Scenes/stages/21.tscn b/Scenes/stages/21.tscn index 6fb3e1a..eb5abef 100644 --- a/Scenes/stages/21.tscn +++ b/Scenes/stages/21.tscn @@ -28,8 +28,10 @@ font_data = ExtResource( 2 ) [sub_resource type="GDScript" id=3] script/source = "extends Label -export (float) var extra_delay=0 -func _ready(): + +export (float) var extra_delay = 0.0 + +func _ready() -> void: self.text= str(global.minutes) + ' minutes and ' + str(global.seconds) + ' seconds.' self.modulate.a=0 $twn_fade.interpolate_property(self, 'modulate:a', 0, 1, 1.5, Tween.TRANS_QUART, Tween.EASE_IN, 0.5+extra_delay) @@ -84,8 +86,8 @@ anchor_right = 1.0 anchor_bottom = 1.0 margin_top = 106.0 margin_bottom = 106.0 -custom_fonts/font = SubResource( 2 ) custom_colors/font_color_shadow = Color( 0.33, 0.33, 0.33, 1 ) +custom_fonts/font = SubResource( 2 ) text = "<