diff --git a/ASSETS/Sunimation/Sun_0_5000ms.png b/ASSETS/Sunimation/Sun_0_5000ms.png new file mode 100644 index 0000000..9b2ff02 Binary files /dev/null and b/ASSETS/Sunimation/Sun_0_5000ms.png differ diff --git a/ASSETS/Sunimation/Sun_0_5000ms.png.import b/ASSETS/Sunimation/Sun_0_5000ms.png.import new file mode 100644 index 0000000..2f37cce --- /dev/null +++ b/ASSETS/Sunimation/Sun_0_5000ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_0_5000ms.png-8041f2e105c995f8daff2ed31cc139b3.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_0_5000ms.png" +dest_files=[ "res://.import/Sun_0_5000ms.png-8041f2e105c995f8daff2ed31cc139b3.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/ASSETS/Sunimation/Sun_10_0080ms.png b/ASSETS/Sunimation/Sun_10_0080ms.png new file mode 100644 index 0000000..0106fba Binary files /dev/null and b/ASSETS/Sunimation/Sun_10_0080ms.png differ diff --git a/ASSETS/Sunimation/Sun_10_0080ms.png.import b/ASSETS/Sunimation/Sun_10_0080ms.png.import new file mode 100644 index 0000000..b8ec96e --- /dev/null +++ b/ASSETS/Sunimation/Sun_10_0080ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_10_0080ms.png-cc7dc940d7eae66467aac30406b61baf.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_10_0080ms.png" +dest_files=[ "res://.import/Sun_10_0080ms.png-cc7dc940d7eae66467aac30406b61baf.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/ASSETS/Sunimation/Sun_11_0080ms.png b/ASSETS/Sunimation/Sun_11_0080ms.png new file mode 100644 index 0000000..6ffa6fa Binary files /dev/null and b/ASSETS/Sunimation/Sun_11_0080ms.png differ diff --git a/ASSETS/Sunimation/Sun_11_0080ms.png.import b/ASSETS/Sunimation/Sun_11_0080ms.png.import new file mode 100644 index 0000000..d8a9919 --- /dev/null +++ b/ASSETS/Sunimation/Sun_11_0080ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_11_0080ms.png-cfca4d40b5eeff94fdd100f6227112e1.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_11_0080ms.png" +dest_files=[ "res://.import/Sun_11_0080ms.png-cfca4d40b5eeff94fdd100f6227112e1.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/ASSETS/Sunimation/Sun_12_0080ms.png b/ASSETS/Sunimation/Sun_12_0080ms.png new file mode 100644 index 0000000..2c59da3 Binary files /dev/null and b/ASSETS/Sunimation/Sun_12_0080ms.png differ diff --git a/ASSETS/Sunimation/Sun_12_0080ms.png.import b/ASSETS/Sunimation/Sun_12_0080ms.png.import new file mode 100644 index 0000000..67b4dee --- /dev/null +++ b/ASSETS/Sunimation/Sun_12_0080ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_12_0080ms.png-fe0eff483dae88094260bdee75d530e0.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_12_0080ms.png" +dest_files=[ "res://.import/Sun_12_0080ms.png-fe0eff483dae88094260bdee75d530e0.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/ASSETS/Sunimation/Sun_13_0080ms.png b/ASSETS/Sunimation/Sun_13_0080ms.png new file mode 100644 index 0000000..aa926b7 Binary files /dev/null and b/ASSETS/Sunimation/Sun_13_0080ms.png differ diff --git a/ASSETS/Sunimation/Sun_13_0080ms.png.import b/ASSETS/Sunimation/Sun_13_0080ms.png.import new file mode 100644 index 0000000..10b8dfd --- /dev/null +++ b/ASSETS/Sunimation/Sun_13_0080ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_13_0080ms.png-954becd80a57d38dc92f4ff924a8c02e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_13_0080ms.png" +dest_files=[ "res://.import/Sun_13_0080ms.png-954becd80a57d38dc92f4ff924a8c02e.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/ASSETS/Sunimation/Sun_1_0100ms.png b/ASSETS/Sunimation/Sun_1_0100ms.png new file mode 100644 index 0000000..01a99ca Binary files /dev/null and b/ASSETS/Sunimation/Sun_1_0100ms.png differ diff --git a/ASSETS/Sunimation/Sun_1_0100ms.png.import b/ASSETS/Sunimation/Sun_1_0100ms.png.import new file mode 100644 index 0000000..7aa4e0a --- /dev/null +++ b/ASSETS/Sunimation/Sun_1_0100ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_1_0100ms.png-ef5f445744cc065011c45138c6d26438.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_1_0100ms.png" +dest_files=[ "res://.import/Sun_1_0100ms.png-ef5f445744cc065011c45138c6d26438.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/ASSETS/Sunimation/Sun_2_2000ms.png b/ASSETS/Sunimation/Sun_2_2000ms.png new file mode 100644 index 0000000..8188e5f Binary files /dev/null and b/ASSETS/Sunimation/Sun_2_2000ms.png differ diff --git a/ASSETS/Sunimation/Sun_2_2000ms.png.import b/ASSETS/Sunimation/Sun_2_2000ms.png.import new file mode 100644 index 0000000..0c4f741 --- /dev/null +++ b/ASSETS/Sunimation/Sun_2_2000ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_2_2000ms.png-0ffea42e778805b1c6e44474b85963c5.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_2_2000ms.png" +dest_files=[ "res://.import/Sun_2_2000ms.png-0ffea42e778805b1c6e44474b85963c5.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/ASSETS/Sunimation/Sun_3_0100ms.png b/ASSETS/Sunimation/Sun_3_0100ms.png new file mode 100644 index 0000000..e5e9d79 Binary files /dev/null and b/ASSETS/Sunimation/Sun_3_0100ms.png differ diff --git a/ASSETS/Sunimation/Sun_3_0100ms.png.import b/ASSETS/Sunimation/Sun_3_0100ms.png.import new file mode 100644 index 0000000..e7a89eb --- /dev/null +++ b/ASSETS/Sunimation/Sun_3_0100ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_3_0100ms.png-42ac04179b2982a948301daed486e329.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_3_0100ms.png" +dest_files=[ "res://.import/Sun_3_0100ms.png-42ac04179b2982a948301daed486e329.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/ASSETS/Sunimation/Sun_4_2000ms.png b/ASSETS/Sunimation/Sun_4_2000ms.png new file mode 100644 index 0000000..b853ea1 Binary files /dev/null and b/ASSETS/Sunimation/Sun_4_2000ms.png differ diff --git a/ASSETS/Sunimation/Sun_4_2000ms.png.import b/ASSETS/Sunimation/Sun_4_2000ms.png.import new file mode 100644 index 0000000..09c54b9 --- /dev/null +++ b/ASSETS/Sunimation/Sun_4_2000ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_4_2000ms.png-ab9fb9c27afe8c99e9d7f131068598f6.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_4_2000ms.png" +dest_files=[ "res://.import/Sun_4_2000ms.png-ab9fb9c27afe8c99e9d7f131068598f6.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/ASSETS/Sunimation/Sun_5_0080ms.png b/ASSETS/Sunimation/Sun_5_0080ms.png new file mode 100644 index 0000000..812e7e7 Binary files /dev/null and b/ASSETS/Sunimation/Sun_5_0080ms.png differ diff --git a/ASSETS/Sunimation/Sun_5_0080ms.png.import b/ASSETS/Sunimation/Sun_5_0080ms.png.import new file mode 100644 index 0000000..99ab4f3 --- /dev/null +++ b/ASSETS/Sunimation/Sun_5_0080ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_5_0080ms.png-e554a10de4b1b531909187b95409fb06.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_5_0080ms.png" +dest_files=[ "res://.import/Sun_5_0080ms.png-e554a10de4b1b531909187b95409fb06.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/ASSETS/Sunimation/Sun_6_0080ms.png b/ASSETS/Sunimation/Sun_6_0080ms.png new file mode 100644 index 0000000..909b9ed Binary files /dev/null and b/ASSETS/Sunimation/Sun_6_0080ms.png differ diff --git a/ASSETS/Sunimation/Sun_6_0080ms.png.import b/ASSETS/Sunimation/Sun_6_0080ms.png.import new file mode 100644 index 0000000..d357e0a --- /dev/null +++ b/ASSETS/Sunimation/Sun_6_0080ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_6_0080ms.png-5538569236b96aea8f85d3f637f67e88.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_6_0080ms.png" +dest_files=[ "res://.import/Sun_6_0080ms.png-5538569236b96aea8f85d3f637f67e88.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/ASSETS/Sunimation/Sun_7_0080ms.png b/ASSETS/Sunimation/Sun_7_0080ms.png new file mode 100644 index 0000000..54f352f Binary files /dev/null and b/ASSETS/Sunimation/Sun_7_0080ms.png differ diff --git a/ASSETS/Sunimation/Sun_7_0080ms.png.import b/ASSETS/Sunimation/Sun_7_0080ms.png.import new file mode 100644 index 0000000..727fac9 --- /dev/null +++ b/ASSETS/Sunimation/Sun_7_0080ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_7_0080ms.png-66bada005940ede5fe2429546fef466f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_7_0080ms.png" +dest_files=[ "res://.import/Sun_7_0080ms.png-66bada005940ede5fe2429546fef466f.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/ASSETS/Sunimation/Sun_8_0080ms.png b/ASSETS/Sunimation/Sun_8_0080ms.png new file mode 100644 index 0000000..16d7a86 Binary files /dev/null and b/ASSETS/Sunimation/Sun_8_0080ms.png differ diff --git a/ASSETS/Sunimation/Sun_8_0080ms.png.import b/ASSETS/Sunimation/Sun_8_0080ms.png.import new file mode 100644 index 0000000..e027fce --- /dev/null +++ b/ASSETS/Sunimation/Sun_8_0080ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_8_0080ms.png-bf69ad2d9815c1d693e2579393eef3a0.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_8_0080ms.png" +dest_files=[ "res://.import/Sun_8_0080ms.png-bf69ad2d9815c1d693e2579393eef3a0.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/ASSETS/Sunimation/Sun_9_0080ms.png b/ASSETS/Sunimation/Sun_9_0080ms.png new file mode 100644 index 0000000..e46054d Binary files /dev/null and b/ASSETS/Sunimation/Sun_9_0080ms.png differ diff --git a/ASSETS/Sunimation/Sun_9_0080ms.png.import b/ASSETS/Sunimation/Sun_9_0080ms.png.import new file mode 100644 index 0000000..7d01413 --- /dev/null +++ b/ASSETS/Sunimation/Sun_9_0080ms.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Sun_9_0080ms.png-e1531184ac25f43c2630bdf3b06d86a6.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/Sunimation/Sun_9_0080ms.png" +dest_files=[ "res://.import/Sun_9_0080ms.png-e1531184ac25f43c2630bdf3b06d86a6.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/ASSETS/sun_spritesheet.png b/ASSETS/sun_spritesheet.png new file mode 100644 index 0000000..7dba321 Binary files /dev/null and b/ASSETS/sun_spritesheet.png differ diff --git a/ASSETS/sun_spritesheet.png.import b/ASSETS/sun_spritesheet.png.import new file mode 100644 index 0000000..b982a9c --- /dev/null +++ b/ASSETS/sun_spritesheet.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/sun_spritesheet.png-d21049e2ef79b88fd17d20de33c73138.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ASSETS/sun_spritesheet.png" +dest_files=[ "res://.import/sun_spritesheet.png-d21049e2ef79b88fd17d20de33c73138.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/Level1.tscn b/Level1.tscn index cc1d187..493b58c 100644 --- a/Level1.tscn +++ b/Level1.tscn @@ -6,7 +6,7 @@ [ext_resource path="res://ASSETS/Background/Layer 7.png" type="Texture" id=4] [ext_resource path="res://ASSETS/Background/Skyline2.png" type="Texture" id=5] [ext_resource path="res://ASSETS/Background/Skyline1.png" type="Texture" id=6] -[ext_resource path="res://ASSETS/Background/Sun total.png" type="Texture" id=7] +[ext_resource path="res://ASSETS/Sunimation/Sun_0_5000ms.png" type="Texture" id=8] [sub_resource type="GDScript" id=3] script/source = "extends Node2D @@ -20,13 +20,65 @@ func _on_DeathZone_entered(body): get_tree().change_scene(\"res://Dead.tscn\") " -[sub_resource type="SpriteFrames" id=2] -animations = [ { -"frames": [ ExtResource( 7 ) ], -"loop": true, -"name": "lag", -"speed": 5.0 -} ] +[sub_resource type="GDScript" id=6] +script/source = "extends Sprite + +export(String, DIR) var sun_frames_path = \"res://ASSETS/Sunimation\" + +signal sun_anim_done + +var frames := [] +var timer := Timer.new() + +func _ready(): + add_child(timer) + timer.one_shot = true + + var frames_names = list_files_in_directory(sun_frames_path, [\"png\"]) + frames.resize(len(frames_names)) + + for f in frames_names: + var tokens = f.trim_prefix(\"Sun_\").trim_suffix(\"ms.png\").split(\"_\") + +# print(f, \" \", tmp, \" \", tokens) + + var idx = int(tokens[0]) + frames[idx] = { + file = \"%s/%s\" % [sun_frames_path, f], + frame_len = float(tokens[1])/1000.0 + } + +# print(frames) + animate() + +func animate(): + for fr in frames: + texture = load(fr.file) + timer.start(fr.frame_len) + + yield(timer, \"timeout\") + + texture = null + emit_signal(\"sun_anim_done\") + +func list_files_in_directory(path, ext_filter := [], allow_hidden := false): + var files = [] + var dir = Directory.new() + dir.open(path) + dir.list_dir_begin() + + var file = dir.get_next() + while file != \"\": + var is_hidden = file.begins_with(\".\") + var ext_ok = (len(ext_filter) == 0 or file.get_extension() in ext_filter) + if (not is_hidden or allow_hidden) and ext_ok: + files.append(file) + file = dir.get_next() + + dir.list_dir_end() + + return files +" [sub_resource type="GDScript" id=5] script/source = "extends Area2D @@ -50,10 +102,10 @@ motion_scale = Vector2( 0, 0 ) [node name="Skybox" type="Sprite" parent="ParallaxBackground/ParallaxLayer2"] texture = ExtResource( 4 ) -[node name="Sun" type="AnimatedSprite" parent="ParallaxBackground/ParallaxLayer2"] -position = Vector2( 0, 40 ) -frames = SubResource( 2 ) -animation = "lag" +[node name="Sun" type="Sprite" parent="ParallaxBackground/ParallaxLayer2"] +position = Vector2( 0, 88 ) +texture = ExtResource( 8 ) +script = SubResource( 6 ) [node name="Purple Sky" type="ParallaxLayer" parent="ParallaxBackground"] position = Vector2( 0, -90 ) @@ -98,5 +150,3 @@ shape = SubResource( 4 ) [node name="Player" parent="." instance=ExtResource( 2 )] position = Vector2( 73, 39 ) -max_jump_height = 64 -max_acceleration = 1500 diff --git a/project.godot b/project.godot index bc56e18..1fb0b49 100644 --- a/project.godot +++ b/project.godot @@ -40,6 +40,7 @@ config/icon="res://icon.png" window/size/width=480 window/size/height=270 +window/size/resizable=false window/size/test_width=960 window/size/test_height=540 window/stretch/mode="viewport"