diff --git a/.gitignore b/.gitignore index 89421e0..9b47973 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ data_*/ mono_crash.*.json puki.txt -export \ No newline at end of file +export/build_folder +export/token.txt \ No newline at end of file diff --git a/assets/audio/sfx/pause.mp3 b/assets/audio/gui/pause.mp3 similarity index 100% rename from assets/audio/sfx/pause.mp3 rename to assets/audio/gui/pause.mp3 diff --git a/assets/audio/gui/pause.mp3.import b/assets/audio/gui/pause.mp3.import new file mode 100644 index 0000000..139093d --- /dev/null +++ b/assets/audio/gui/pause.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://ckja8ym50y0d4" +path="res://.godot/imported/pause.mp3-10f7613d15cb333d7efaf86fb9f4755c.mp3str" + +[deps] + +source_file="res://assets/audio/gui/pause.mp3" +dest_files=["res://.godot/imported/pause.mp3-10f7613d15cb333d7efaf86fb9f4755c.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/audio/music/Little Big - Go Bananas.mp3 b/assets/audio/music/Little Big - Go Bananas.mp3 deleted file mode 100644 index dd54f20..0000000 Binary files a/assets/audio/music/Little Big - Go Bananas.mp3 and /dev/null differ diff --git a/assets/audio/music/Little Big - Go Bananas.mp3.import b/assets/audio/music/Little Big - Go Bananas.mp3.import deleted file mode 100644 index 9cf932a..0000000 --- a/assets/audio/music/Little Big - Go Bananas.mp3.import +++ /dev/null @@ -1,19 +0,0 @@ -[remap] - -importer="mp3" -type="AudioStreamMP3" -uid="uid://w7w07cdy5qmt" -path="res://.godot/imported/Little Big - Go Bananas.mp3-9bcadd18f2edd74bffc2a535965b4b7c.mp3str" - -[deps] - -source_file="res://assets/audio/music/Little Big - Go Bananas.mp3" -dest_files=["res://.godot/imported/Little Big - Go Bananas.mp3-9bcadd18f2edd74bffc2a535965b4b7c.mp3str"] - -[params] - -loop=false -loop_offset=0 -bpm=0 -beat_count=0 -bar_beats=4 diff --git a/assets/audio/music/Oliver Buckland - Dead God Graveyard .mp3 b/assets/audio/music/Oliver Buckland - Dead God Graveyard .mp3 deleted file mode 100644 index 3388cf4..0000000 Binary files a/assets/audio/music/Oliver Buckland - Dead God Graveyard .mp3 and /dev/null differ diff --git a/assets/audio/music/Oliver Buckland - Dead God Graveyard .mp3.import b/assets/audio/music/Oliver Buckland - Dead God Graveyard .mp3.import deleted file mode 100644 index 173f82e..0000000 --- a/assets/audio/music/Oliver Buckland - Dead God Graveyard .mp3.import +++ /dev/null @@ -1,19 +0,0 @@ -[remap] - -importer="mp3" -type="AudioStreamMP3" -uid="uid://dwr53ucg07nla" -path="res://.godot/imported/Oliver Buckland - Dead God Graveyard .mp3-22cfd929c244fa24654efd56bbc029db.mp3str" - -[deps] - -source_file="res://assets/audio/music/Oliver Buckland - Dead God Graveyard .mp3" -dest_files=["res://.godot/imported/Oliver Buckland - Dead God Graveyard .mp3-22cfd929c244fa24654efd56bbc029db.mp3str"] - -[params] - -loop=false -loop_offset=0 -bpm=0 -beat_count=0 -bar_beats=4 diff --git a/assets/audio/music/Unknown - Slipknot Unsainted Instrumental.mp3 b/assets/audio/music/Unknown - Slipknot Unsainted Instrumental.mp3 deleted file mode 100644 index 87fb298..0000000 Binary files a/assets/audio/music/Unknown - Slipknot Unsainted Instrumental.mp3 and /dev/null differ diff --git a/assets/audio/music/Unknown - Slipknot Unsainted Instrumental.mp3.import b/assets/audio/music/Unknown - Slipknot Unsainted Instrumental.mp3.import deleted file mode 100644 index a556c48..0000000 --- a/assets/audio/music/Unknown - Slipknot Unsainted Instrumental.mp3.import +++ /dev/null @@ -1,19 +0,0 @@ -[remap] - -importer="mp3" -type="AudioStreamMP3" -uid="uid://ddyfbe40fs5er" -path="res://.godot/imported/Unknown - Slipknot Unsainted Instrumental.mp3-c88e45862eb37d4406f225e65298249f.mp3str" - -[deps] - -source_file="res://assets/audio/music/Unknown - Slipknot Unsainted Instrumental.mp3" -dest_files=["res://.godot/imported/Unknown - Slipknot Unsainted Instrumental.mp3-c88e45862eb37d4406f225e65298249f.mp3str"] - -[params] - -loop=false -loop_offset=0 -bpm=0 -beat_count=0 -bar_beats=4 diff --git a/assets/audio/music/playlist.tres b/assets/audio/music/playlist.tres index b4d2b3b..7d13f3c 100644 --- a/assets/audio/music/playlist.tres +++ b/assets/audio/music/playlist.tres @@ -1,15 +1,13 @@ -[gd_resource type="AudioStreamPlaylist" load_steps=5 format=3 uid="uid://bxshjvvtv3fmp"] +[gd_resource type="AudioStreamPlaylist" load_steps=4 format=3 uid="uid://bxshjvvtv3fmp"] [ext_resource type="AudioStream" uid="uid://8ixfx0uewkgo" path="res://assets/audio/music/Peter McConnell - Far Future (Demonstration Minigame).mp3" id="2_pf8yc"] [ext_resource type="AudioStream" uid="uid://btf3ompk8gvq6" path="res://assets/audio/music/Peter McConnell - Frostbite Caves (Demonstration Minigame).mp3" id="3_nnobx"] -[ext_resource type="AudioStream" uid="uid://w7w07cdy5qmt" path="res://assets/audio/music/Little Big - Go Bananas.mp3" id="4_txg7g"] [ext_resource type="AudioStream" uid="uid://djvq0s4qxcro2" path="res://assets/audio/music/Oliver Buckland - Hourglass Meadow.mp3" id="4_wjg2a"] [resource] shuffle = true fade_time = 0.5 -stream_count = 4 +stream_count = 3 stream_0 = ExtResource("2_pf8yc") stream_1 = ExtResource("3_nnobx") -stream_2 = ExtResource("4_txg7g") -stream_3 = ExtResource("4_wjg2a") +stream_2 = ExtResource("4_wjg2a") diff --git a/assets/audio/music/Смешарики - 194. Метеоритный дождь.mp3 b/assets/audio/music/Смешарики - 194. Метеоритный дождь.mp3 new file mode 100644 index 0000000..0c246e2 Binary files /dev/null and b/assets/audio/music/Смешарики - 194. Метеоритный дождь.mp3 differ diff --git a/assets/audio/music/Смешарики - 194. Метеоритный дождь.mp3.import b/assets/audio/music/Смешарики - 194. Метеоритный дождь.mp3.import new file mode 100644 index 0000000..bed9d90 --- /dev/null +++ b/assets/audio/music/Смешарики - 194. Метеоритный дождь.mp3.import @@ -0,0 +1,19 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +uid="uid://lshrnpdrhh77" +path="res://.godot/imported/Смешарики - 194. Метеоритный дождь.mp3-1c1641538fc065326563e693f5ca9dd1.mp3str" + +[deps] + +source_file="res://assets/audio/music/Смешарики - 194. Метеоритный дождь.mp3" +dest_files=["res://.godot/imported/Смешарики - 194. Метеоритный дождь.mp3-1c1641538fc065326563e693f5ca9dd1.mp3str"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/audio/sfx/pause.mp3.import b/assets/audio/sfx/pause.mp3.import deleted file mode 100644 index 3c76b64..0000000 --- a/assets/audio/sfx/pause.mp3.import +++ /dev/null @@ -1,19 +0,0 @@ -[remap] - -importer="mp3" -type="AudioStreamMP3" -uid="uid://ckja8ym50y0d4" -path="res://.godot/imported/pause.mp3-e9d4dab5bf1cbf6ecf379df2f1abb654.mp3str" - -[deps] - -source_file="res://assets/audio/sfx/pause.mp3" -dest_files=["res://.godot/imported/pause.mp3-e9d4dab5bf1cbf6ecf379df2f1abb654.mp3str"] - -[params] - -loop=false -loop_offset=0 -bpm=0 -beat_count=0 -bar_beats=4 diff --git a/assets/sprites/atlases/atlas1.png b/assets/sprites/atlases/atlas1.png index cfb102a..68279ee 100644 Binary files a/assets/sprites/atlases/atlas1.png and b/assets/sprites/atlases/atlas1.png differ diff --git a/assets/sprites/atlases/plants/nerdus.png b/assets/sprites/atlases/plants/nerdus.png new file mode 100644 index 0000000..c8c7a3c Binary files /dev/null and b/assets/sprites/atlases/plants/nerdus.png differ diff --git a/assets/sprites/atlases/zombies/basic/basic.png.import b/assets/sprites/atlases/plants/nerdus.png.import similarity index 67% rename from assets/sprites/atlases/zombies/basic/basic.png.import rename to assets/sprites/atlases/plants/nerdus.png.import index 4ce2ad7..7c1a08a 100644 --- a/assets/sprites/atlases/zombies/basic/basic.png.import +++ b/assets/sprites/atlases/plants/nerdus.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://brj0buevfwv21" -path="res://.godot/imported/basic.png-38a55937c4f93d822edc7539a67ab55a.ctex" +uid="uid://b06e8xhdy77d1" +path="res://.godot/imported/nerdus.png-ec431205ffd49ae84928c7fa5c535086.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://assets/sprites/atlases/zombies/basic/basic.png" -dest_files=["res://.godot/imported/basic.png-38a55937c4f93d822edc7539a67ab55a.ctex"] +source_file="res://assets/sprites/atlases/plants/nerdus.png" +dest_files=["res://.godot/imported/nerdus.png-ec431205ffd49ae84928c7fa5c535086.ctex"] [params] diff --git a/assets/sprites/atlases/plants/nerdus_attack.png b/assets/sprites/atlases/plants/nerdus_attack.png new file mode 100644 index 0000000..a81d19c Binary files /dev/null and b/assets/sprites/atlases/plants/nerdus_attack.png differ diff --git a/assets/sprites/atlases/plants/nerdus_attack.png.import b/assets/sprites/atlases/plants/nerdus_attack.png.import new file mode 100644 index 0000000..1c7f55e --- /dev/null +++ b/assets/sprites/atlases/plants/nerdus_attack.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://pkss10u2g0p" +path="res://.godot/imported/nerdus_attack.png-b5525c75a5c1206ed7ff9828533d4f8d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/plants/nerdus_attack.png" +dest_files=["res://.godot/imported/nerdus_attack.png-b5525c75a5c1206ed7ff9828533d4f8d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/sprites/atlases/plants/nerdus_idle.png b/assets/sprites/atlases/plants/nerdus_idle.png new file mode 100644 index 0000000..b1e7a76 Binary files /dev/null and b/assets/sprites/atlases/plants/nerdus_idle.png differ diff --git a/assets/sprites/atlases/plants/nerdus_idle.png.import b/assets/sprites/atlases/plants/nerdus_idle.png.import new file mode 100644 index 0000000..6fce0e1 --- /dev/null +++ b/assets/sprites/atlases/plants/nerdus_idle.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cx3xjcaqqawr5" +path="res://.godot/imported/nerdus_idle.png-460516daa87af0de882346b10c06ae5d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/atlases/plants/nerdus_idle.png" +dest_files=["res://.godot/imported/nerdus_idle.png-460516daa87af0de882346b10c06ae5d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/sprites/atlases/zombies/basic.png b/assets/sprites/atlases/zombies/basic.png deleted file mode 100644 index 0f96b6d..0000000 Binary files a/assets/sprites/atlases/zombies/basic.png and /dev/null differ diff --git a/assets/sprites/atlases/zombies/basic/basic.png b/assets/sprites/atlases/zombies/basic/basic.png deleted file mode 100644 index b9cdafa..0000000 Binary files a/assets/sprites/atlases/zombies/basic/basic.png and /dev/null differ diff --git a/assets/sprites/atlases/zombies/basic/body.tres b/assets/sprites/atlases/zombies/basic/body.tres deleted file mode 100644 index 12cd67d..0000000 --- a/assets/sprites/atlases/zombies/basic/body.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://cmqqw8phpv47j"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_wj01h"] - -[resource] -atlas = ExtResource("1_wj01h") -region = Rect2(103, 7, 29, 39) diff --git a/assets/sprites/atlases/zombies/basic/butt.tres b/assets/sprites/atlases/zombies/basic/butt.tres deleted file mode 100644 index 9151e11..0000000 --- a/assets/sprites/atlases/zombies/basic/butt.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://w18rel3qlx8b"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_82n7o"] - -[resource] -atlas = ExtResource("1_82n7o") -region = Rect2(32, 31, 20, 8) diff --git a/assets/sprites/atlases/zombies/basic/head.tres b/assets/sprites/atlases/zombies/basic/head.tres deleted file mode 100644 index c5eaca2..0000000 --- a/assets/sprites/atlases/zombies/basic/head.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://d1dj4jkho6g6n"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_5adf2"] - -[resource] -atlas = ExtResource("1_5adf2") -region = Rect2(45, 0, 33, 29) diff --git a/assets/sprites/atlases/zombies/basic/jaw.tres b/assets/sprites/atlases/zombies/basic/jaw.tres deleted file mode 100644 index 51afb82..0000000 --- a/assets/sprites/atlases/zombies/basic/jaw.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://dum7mdptqxsrg"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_oooei"] - -[resource] -atlas = ExtResource("1_oooei") -region = Rect2(24, 16, 20, 6) diff --git a/assets/sprites/atlases/zombies/basic/left_foot.tres b/assets/sprites/atlases/zombies/basic/left_foot.tres deleted file mode 100644 index 2e35bc5..0000000 --- a/assets/sprites/atlases/zombies/basic/left_foot.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://u3d43pbf20g2"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_evbxa"] - -[resource] -atlas = ExtResource("1_evbxa") -region = Rect2(81, 29, 19, 13) diff --git a/assets/sprites/atlases/zombies/basic/left_hand_eat.tres b/assets/sprites/atlases/zombies/basic/left_hand_eat.tres deleted file mode 100644 index 10e4def..0000000 --- a/assets/sprites/atlases/zombies/basic/left_hand_eat.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bfjmu73k22hes"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_o0xfq"] - -[resource] -atlas = ExtResource("1_o0xfq") -region = Rect2(34, 1, 9, 9) diff --git a/assets/sprites/atlases/zombies/basic/left_hand_norm.tres b/assets/sprites/atlases/zombies/basic/left_hand_norm.tres deleted file mode 100644 index 2c08ea0..0000000 --- a/assets/sprites/atlases/zombies/basic/left_hand_norm.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://dj2kbt83xn5ww"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_p5nl0"] - -[resource] -atlas = ExtResource("1_p5nl0") -region = Rect2(23, 1, 9, 10) diff --git a/assets/sprites/atlases/zombies/basic/left_lower_arm.tres b/assets/sprites/atlases/zombies/basic/left_lower_arm.tres deleted file mode 100644 index 485bae6..0000000 --- a/assets/sprites/atlases/zombies/basic/left_lower_arm.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://87k3f1q8j1g0"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_54dnx"] - -[resource] -atlas = ExtResource("1_54dnx") -region = Rect2(9, 0, 9, 15) diff --git a/assets/sprites/atlases/zombies/basic/left_lower_leg.tres b/assets/sprites/atlases/zombies/basic/left_lower_leg.tres deleted file mode 100644 index 99791b3..0000000 --- a/assets/sprites/atlases/zombies/basic/left_lower_leg.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bgvlijc7nirpq"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_o7ssy"] - -[resource] -atlas = ExtResource("1_o7ssy") -region = Rect2(69, 32, 7, 10) diff --git a/assets/sprites/atlases/zombies/basic/left_upper_arm.tres b/assets/sprites/atlases/zombies/basic/left_upper_arm.tres deleted file mode 100644 index 0464691..0000000 --- a/assets/sprites/atlases/zombies/basic/left_upper_arm.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://cjgvr0njwjbpo"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_oxppr"] - -[resource] -atlas = ExtResource("1_oxppr") -region = Rect2(0, 0, 6, 19) diff --git a/assets/sprites/atlases/zombies/basic/left_upper_leg.tres b/assets/sprites/atlases/zombies/basic/left_upper_leg.tres deleted file mode 100644 index 3c7268e..0000000 --- a/assets/sprites/atlases/zombies/basic/left_upper_leg.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bdn3pri0pyiom"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_ho0w5"] - -[resource] -atlas = ExtResource("1_ho0w5") -region = Rect2(57, 29, 8, 18) diff --git a/assets/sprites/atlases/zombies/basic/pupil.tres b/assets/sprites/atlases/zombies/basic/pupil.tres deleted file mode 100644 index 83613d5..0000000 --- a/assets/sprites/atlases/zombies/basic/pupil.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://cvwquke2wkg77"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_mj2qc"] - -[resource] -atlas = ExtResource("1_mj2qc") -region = Rect2(4, 28, 2, 3) diff --git a/assets/sprites/atlases/zombies/basic/right_foot.tres b/assets/sprites/atlases/zombies/basic/right_foot.tres deleted file mode 100644 index 6142b0c..0000000 --- a/assets/sprites/atlases/zombies/basic/right_foot.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://chf70r51gng5m"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_i1ggm"] - -[resource] -atlas = ExtResource("1_i1ggm") -region = Rect2(103, 49, 17, 9) diff --git a/assets/sprites/atlases/zombies/basic/right_hand_eat.tres b/assets/sprites/atlases/zombies/basic/right_hand_eat.tres deleted file mode 100644 index b703e13..0000000 --- a/assets/sprites/atlases/zombies/basic/right_hand_eat.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://b2crmvouxqd7v"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_jdgig"] - -[resource] -atlas = ExtResource("1_jdgig") -region = Rect2(35, 49, 9, 10) diff --git a/assets/sprites/atlases/zombies/basic/right_hand_norm.tres b/assets/sprites/atlases/zombies/basic/right_hand_norm.tres deleted file mode 100644 index e9a166c..0000000 --- a/assets/sprites/atlases/zombies/basic/right_hand_norm.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bk1qytkidbvoj"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_8kv5h"] - -[resource] -atlas = ExtResource("1_8kv5h") -region = Rect2(21, 48, 9, 11) diff --git a/assets/sprites/atlases/zombies/basic/right_lower_arm.tres b/assets/sprites/atlases/zombies/basic/right_lower_arm.tres deleted file mode 100644 index f9f4af7..0000000 --- a/assets/sprites/atlases/zombies/basic/right_lower_arm.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://c75m4bl4w716s"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_ck7fk"] - -[resource] -atlas = ExtResource("1_ck7fk") -region = Rect2(10, 43, 8, 15) diff --git a/assets/sprites/atlases/zombies/basic/right_lower_leg.tres b/assets/sprites/atlases/zombies/basic/right_lower_leg.tres deleted file mode 100644 index d67d9d0..0000000 --- a/assets/sprites/atlases/zombies/basic/right_lower_leg.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bamn1qspmeqbq"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_y8dy7"] - -[resource] -atlas = ExtResource("1_y8dy7") -region = Rect2(89, 44, 11, 17) diff --git a/assets/sprites/atlases/zombies/basic/right_upper_arm.tres b/assets/sprites/atlases/zombies/basic/right_upper_arm.tres deleted file mode 100644 index 7891cbe..0000000 --- a/assets/sprites/atlases/zombies/basic/right_upper_arm.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://ohh0simjshn5"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_3lur4"] - -[resource] -atlas = ExtResource("1_3lur4") -region = Rect2(0, 41, 6, 20) diff --git a/assets/sprites/atlases/zombies/basic/right_upper_leg.tres b/assets/sprites/atlases/zombies/basic/right_upper_leg.tres deleted file mode 100644 index af2485e..0000000 --- a/assets/sprites/atlases/zombies/basic/right_upper_leg.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://sj4wjl7kwa4v"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_o7587"] - -[resource] -atlas = ExtResource("1_o7587") -region = Rect2(74, 43, 10, 17) diff --git a/assets/sprites/atlases/zombies/basic/tie.tres b/assets/sprites/atlases/zombies/basic/tie.tres deleted file mode 100644 index a3e5a8e..0000000 --- a/assets/sprites/atlases/zombies/basic/tie.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://cb8olnk0b31vy"] - -[ext_resource type="Texture2D" uid="uid://brj0buevfwv21" path="res://assets/sprites/atlases/zombies/basic/basic.png" id="1_86mrn"] - -[resource] -atlas = ExtResource("1_86mrn") -region = Rect2(82, 1, 13, 26) diff --git a/assets/sprites/atlases/zombies/basic_fem.png b/assets/sprites/atlases/zombies/basic_fem.png deleted file mode 100644 index 790387b..0000000 Binary files a/assets/sprites/atlases/zombies/basic_fem.png and /dev/null differ diff --git a/assets/sprites/atlases/zombies/hobo.png b/assets/sprites/atlases/zombies/hobo.png deleted file mode 100644 index d865637..0000000 Binary files a/assets/sprites/atlases/zombies/hobo.png and /dev/null differ diff --git a/assets/sprites/atlases/zombies/polevaulter.png b/assets/sprites/atlases/zombies/polevaulter.png deleted file mode 100644 index 46b9864..0000000 Binary files a/assets/sprites/atlases/zombies/polevaulter.png and /dev/null differ diff --git a/assets/sprites/atlases/zombies/screendoor.png b/assets/sprites/atlases/zombies/screendoor.png deleted file mode 100644 index 8641e51..0000000 Binary files a/assets/sprites/atlases/zombies/screendoor.png and /dev/null differ diff --git a/assets/sprites/atlases/zombies/screendoor_fem.png b/assets/sprites/atlases/zombies/screendoor_fem.png deleted file mode 100644 index 4a32b3c..0000000 Binary files a/assets/sprites/atlases/zombies/screendoor_fem.png and /dev/null differ diff --git a/assets/sprites/atlases/zombies/Зондби.png b/assets/sprites/atlases/zombies/Зондби.png deleted file mode 100644 index 30d9fae..0000000 Binary files a/assets/sprites/atlases/zombies/Зондби.png and /dev/null differ diff --git a/assets/sprites/cone1.tres b/assets/sprites/cone1.tres index b680b8a..418370c 100644 --- a/assets/sprites/cone1.tres +++ b/assets/sprites/cone1.tres @@ -1,7 +1,7 @@ [gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://ceqvdmude7cgg"] -[ext_resource type="Texture2D" uid="uid://cmxh4w4gkgdjm" path="res://assets/sprites/atlases/zombies/basic.png" id="1_yijc6"] +[ext_resource type="Texture2D" uid="uid://b18blso5pbc6a" path="res://assets/sprites/atlases/zombies/armor.png" id="1_k5duo"] [resource] -atlas = ExtResource("1_yijc6") +atlas = ExtResource("1_k5duo") region = Rect2(0, 0, 31, 33) diff --git a/assets/sprites/field.png b/assets/sprites/field.png new file mode 100644 index 0000000..83a8e0b Binary files /dev/null and b/assets/sprites/field.png differ diff --git a/assets/sprites/field.png.import b/assets/sprites/field.png.import new file mode 100644 index 0000000..9245ce8 --- /dev/null +++ b/assets/sprites/field.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ksxucobpgv7n" +path="res://.godot/imported/field.png-8fc12d6ddb4478900fc9b327337caa43.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/field.png" +dest_files=["res://.godot/imported/field.png-8fc12d6ddb4478900fc9b327337caa43.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/sprites/logo.png b/assets/sprites/logo.png new file mode 100644 index 0000000..600ff65 Binary files /dev/null and b/assets/sprites/logo.png differ diff --git a/assets/sprites/logo.png.import b/assets/sprites/logo.png.import new file mode 100644 index 0000000..9f91655 --- /dev/null +++ b/assets/sprites/logo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d0ivn6alu0t1d" +path="res://.godot/imported/logo.png-ec0d5908606a38766100cfc93f0dfde6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/logo.png" +dest_files=["res://.godot/imported/logo.png-ec0d5908606a38766100cfc93f0dfde6.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/sprites/vertical_logo.png b/assets/sprites/vertical_logo.png new file mode 100644 index 0000000..37de0b0 Binary files /dev/null and b/assets/sprites/vertical_logo.png differ diff --git a/assets/sprites/vertical_logo.png.import b/assets/sprites/vertical_logo.png.import new file mode 100644 index 0000000..1cce508 --- /dev/null +++ b/assets/sprites/vertical_logo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cfgkauyw7qful" +path="res://.godot/imported/vertical_logo.png-30a74afc1637ae5d91a97bcaec17648e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/vertical_logo.png" +dest_files=["res://.godot/imported/vertical_logo.png-30a74afc1637ae5d91a97bcaec17648e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/sprites/zombies/basic.png b/assets/sprites/zombies/basic.png index e25856a..462c8ca 100644 Binary files a/assets/sprites/zombies/basic.png and b/assets/sprites/zombies/basic.png differ diff --git a/assets/sprites/zombies/hobo.png b/assets/sprites/zombies/hobo.png index be8c292..eee9f11 100644 Binary files a/assets/sprites/zombies/hobo.png and b/assets/sprites/zombies/hobo.png differ diff --git a/assets/sprites/zombies/previews.png b/assets/sprites/zombies/previews.png new file mode 100644 index 0000000..cdfd0bd Binary files /dev/null and b/assets/sprites/zombies/previews.png differ diff --git a/assets/sprites/zombies/previews.png.import b/assets/sprites/zombies/previews.png.import new file mode 100644 index 0000000..4e0ece8 --- /dev/null +++ b/assets/sprites/zombies/previews.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://5gpf2sodhn6e" +path="res://.godot/imported/previews.png-bf5734315ff51e6cede135bafe2c4975.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/zombies/previews.png" +dest_files=["res://.godot/imported/previews.png-bf5734315ff51e6cede135bafe2c4975.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/sprites/zombies/Зомби_бочка.png b/assets/sprites/zombies/Зомби_бочка.png new file mode 100644 index 0000000..d2603f8 Binary files /dev/null and b/assets/sprites/zombies/Зомби_бочка.png differ diff --git a/assets/sprites/zombies/Зомби_бочка.png.import b/assets/sprites/zombies/Зомби_бочка.png.import new file mode 100644 index 0000000..fcfcabd --- /dev/null +++ b/assets/sprites/zombies/Зомби_бочка.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://diqdrt7crecji" +path="res://.godot/imported/Зомби_бочка.png-4c647d5c6d593289ec88504418492024.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sprites/zombies/Зомби_бочка.png" +dest_files=["res://.godot/imported/Зомби_бочка.png-4c647d5c6d593289ec88504418492024.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/default_bus_layout.tres b/default_bus_layout.tres index 3cde41a..1654afb 100644 --- a/default_bus_layout.tres +++ b/default_bus_layout.tres @@ -8,3 +8,9 @@ bus/1/mute = false bus/1/bypass_fx = false bus/1/volume_db = -0.130497 bus/1/send = &"Master" +bus/2/name = &"SFXBus" +bus/2/solo = false +bus/2/mute = false +bus/2/bypass_fx = false +bus/2/volume_db = 0.0 +bus/2/send = &"Master" diff --git a/export/deploy.ps1 b/export/deploy.ps1 new file mode 100644 index 0000000..aacc66b --- /dev/null +++ b/export/deploy.ps1 @@ -0,0 +1,14 @@ +# Step 1: Read the contents of "token.txt" into variable $tkn +$tkn = Get-Content -Path "token.txt" -Raw + +# Step 2: Prompt the user for version input +$ver = Read-Host "Enter version" + +# Step 3: Compress "build_folder" into a zip file named "lon$ver.zip" +$zipName = "lon$ver.zip" +Compress-Archive -Path "build_folder" -DestinationPath $zipName -Force + +& ".\deploy_tools\butler.exe" push $zipName "lon-team/liberation-of-neighbourville:windows" --userversion $ver +# Step 4: Execute deploy_tools\gjpush with required arguments +#& ".\deploy_tools\gjpush.exe" -t $tkn -g 1005720 -p 1012636 -r $ver $zipName +Remove-Item $zipName \ No newline at end of file diff --git a/export/deploy_tools/7z.dll b/export/deploy_tools/7z.dll new file mode 100644 index 0000000..ed9c15b Binary files /dev/null and b/export/deploy_tools/7z.dll differ diff --git a/export/deploy_tools/butler.exe b/export/deploy_tools/butler.exe new file mode 100644 index 0000000..a6adff0 Binary files /dev/null and b/export/deploy_tools/butler.exe differ diff --git a/export/deploy_tools/c7zip.dll b/export/deploy_tools/c7zip.dll new file mode 100644 index 0000000..20c6ec8 Binary files /dev/null and b/export/deploy_tools/c7zip.dll differ diff --git a/export/deploy_tools/gjpush.exe b/export/deploy_tools/gjpush.exe new file mode 100644 index 0000000..b45524f Binary files /dev/null and b/export/deploy_tools/gjpush.exe differ diff --git a/icon.ico b/icon.ico index 48a7f0a..0a36743 100644 Binary files a/icon.ico and b/icon.ico differ diff --git a/icon.png b/icon.png index ca346e0..bc2a14e 100644 Binary files a/icon.png and b/icon.png differ diff --git a/project.godot b/project.godot index e6bfbe8..552c3de 100644 --- a/project.godot +++ b/project.godot @@ -8,10 +8,15 @@ config_version=5 +[animation] + +warnings/check_invalid_track_paths=false +warnings/check_angle_interpolation_type_conflicting=false + [application] config/name="Liberation of the Neighbourville" -config/version="0.1.3" +config/version="0.2.5" run/main_scene="uid://bfstrli64u23y" config/features=PackedStringArray("4.4", "C#", "Forward Plus") config/icon="res://icon.png" @@ -22,8 +27,9 @@ config/windows_native_icon="res://icon.ico" LevelController="*res://scripts/LevelController.cs" Cursor="*res://scripts/Cursor.cs" GameRegistry="*res://scripts/systems/GameRegistry.cs" -Cheats="*res://scripts/debug/Cheats.cs" +Cheats="res://scripts/debug/Cheats.cs" AudioSequencer="*res://scenes/audio_sequencer.tscn" +SettingsSerializer="*res://scripts/SettingsSerializer.cs" [display] @@ -60,6 +66,16 @@ theme/custom_font="res://assets/fonts/pico12.ttf" [input] +ui_focus_next={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":93,"key_label":0,"unicode":1098,"location":0,"echo":false,"script":null) +] +} +ui_focus_prev={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":91,"key_label":0,"unicode":1093,"location":0,"echo":false,"script":null) +] +} cheat_add_sun={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194333,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) @@ -81,6 +97,21 @@ cheat_zombie_spawn={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194332,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] } +short_pause={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} +short_ff={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194306,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} +short_shovel={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) +] +} [internationalization] diff --git a/resources/animations/zombies/basic.res b/resources/animations/zombies/basic.res new file mode 100644 index 0000000..e02f886 Binary files /dev/null and b/resources/animations/zombies/basic.res differ diff --git a/resources/animations/zombies/basic_zombie_anim.res b/resources/animations/zombies/basic_zombie_anim.res new file mode 100644 index 0000000..6ea7db3 Binary files /dev/null and b/resources/animations/zombies/basic_zombie_anim.res differ diff --git a/resources/animations/zombies/basic_zombie_eating.res b/resources/animations/zombies/basic_zombie_eating.res index 24448b1..7ab8319 100644 Binary files a/resources/animations/zombies/basic_zombie_eating.res and b/resources/animations/zombies/basic_zombie_eating.res differ diff --git a/resources/animations/zombies/basic_zombie_tree.tres b/resources/animations/zombies/basic_zombie_tree.tres index c8c07ab..1d088e0 100644 --- a/resources/animations/zombies/basic_zombie_tree.tres +++ b/resources/animations/zombies/basic_zombie_tree.tres @@ -1,39 +1,53 @@ -[gd_resource type="AnimationNodeStateMachine" load_steps=9 format=3 uid="uid://dj0blope85bg7"] +[gd_resource type="AnimationNodeStateMachine" load_steps=10 format=3 uid="uid://dj0blope85bg7"] + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_w2cv7"] +animation = &"basic/death" [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_h0rfo"] -animation = &"basic_zombie/eat" +animation = &"basic/eating" [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_nog33"] -animation = &"basic_zombie/idle" +animation = &"basic/stand" [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_g2uel"] -animation = &"basic_zombie/walk" +animation = &"basic/walk" [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_vxhht"] advance_mode = 2 [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_r8rju"] +xfade_time = 0.5 +break_loop_at_end = true +switch_mode = 2 advance_mode = 2 +advance_expression = "can_process()" [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_y2ivb"] +xfade_time = 0.5 +break_loop_at_end = true +switch_mode = 2 advance_mode = 2 -advance_expression = "get(\"isEating\") == true" +advance_expression = "get(\"isEating\") == true and can_process()" [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7d3k4"] +xfade_time = 0.5 advance_mode = 2 advance_expression = "get(\"isEating\") == true" [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_kk4wi"] +xfade_time = 0.5 advance_mode = 2 advance_expression = "get(\"isEating\") == false" [resource] +states/Death/node = SubResource("AnimationNodeAnimation_w2cv7") +states/Death/position = Vector2(778, 100) +states/Eat/node = SubResource("AnimationNodeAnimation_h0rfo") +states/Eat/position = Vector2(575, 185) states/End/position = Vector2(977, 90) -states/basic_zombie_eat/node = SubResource("AnimationNodeAnimation_h0rfo") -states/basic_zombie_eat/position = Vector2(575, 185) -states/basic_zombie_idle/node = SubResource("AnimationNodeAnimation_nog33") -states/basic_zombie_idle/position = Vector2(366, 100) -states/basic_zombie_walk/node = SubResource("AnimationNodeAnimation_g2uel") -states/basic_zombie_walk/position = Vector2(575, 35) -transitions = ["Start", "basic_zombie_idle", SubResource("AnimationNodeStateMachineTransition_vxhht"), "basic_zombie_idle", "basic_zombie_walk", SubResource("AnimationNodeStateMachineTransition_r8rju"), "basic_zombie_idle", "basic_zombie_eat", SubResource("AnimationNodeStateMachineTransition_y2ivb"), "basic_zombie_walk", "basic_zombie_eat", SubResource("AnimationNodeStateMachineTransition_7d3k4"), "basic_zombie_eat", "basic_zombie_walk", SubResource("AnimationNodeStateMachineTransition_kk4wi")] -graph_offset = Vector2(13, 26) +states/Idle/node = SubResource("AnimationNodeAnimation_nog33") +states/Idle/position = Vector2(366, 100) +states/Walk/node = SubResource("AnimationNodeAnimation_g2uel") +states/Walk/position = Vector2(575, 35) +transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_vxhht"), "Idle", "Walk", SubResource("AnimationNodeStateMachineTransition_r8rju"), "Idle", "Eat", SubResource("AnimationNodeStateMachineTransition_y2ivb"), "Walk", "Eat", SubResource("AnimationNodeStateMachineTransition_7d3k4"), "Eat", "Walk", SubResource("AnimationNodeStateMachineTransition_kk4wi")] +graph_offset = Vector2(120, -30) diff --git a/resources/animations/zombies/basic_zombie_walk.res b/resources/animations/zombies/basic_zombie_walk.res index 0f6d641..7bf6d2e 100644 Binary files a/resources/animations/zombies/basic_zombie_walk.res and b/resources/animations/zombies/basic_zombie_walk.res differ diff --git a/resources/animations/zombies/hobo.res b/resources/animations/zombies/hobo.res new file mode 100644 index 0000000..7c046ef Binary files /dev/null and b/resources/animations/zombies/hobo.res differ diff --git a/resources/animations/zombies/hobo_zombie.res b/resources/animations/zombies/hobo_zombie.res new file mode 100644 index 0000000..f833f4d Binary files /dev/null and b/resources/animations/zombies/hobo_zombie.res differ diff --git a/resources/animations/zombies/hobo_zombie.res1406874708.tmp b/resources/animations/zombies/hobo_zombie.res1406874708.tmp new file mode 100644 index 0000000..630fe40 Binary files /dev/null and b/resources/animations/zombies/hobo_zombie.res1406874708.tmp differ diff --git a/resources/effects/GarlicEffect.tres b/resources/effects/GarlicEffect.tres index 5c9f170..5696f04 100644 --- a/resources/effects/GarlicEffect.tres +++ b/resources/effects/GarlicEffect.tres @@ -4,5 +4,5 @@ [resource] script = ExtResource("1_rfumy") -Duration = 0.25 +Duration = 1.0 Slot = "garlic" diff --git a/resources/effects/NerdusEffect.tres b/resources/effects/NerdusEffect.tres new file mode 100644 index 0000000..b2bb49f --- /dev/null +++ b/resources/effects/NerdusEffect.tres @@ -0,0 +1,8 @@ +[gd_resource type="Resource" load_steps=2 format=3 uid="uid://dme4nvp28otq6"] + +[ext_resource type="Script" uid="uid://bb6lv1djnqjaw" path="res://scripts/systems/effects/GarlicEffect.cs" id="1_bd12u"] + +[resource] +script = ExtResource("1_bd12u") +Duration = 0.25 +Slot = "garlic" diff --git a/resources/plants/Aloe.tres b/resources/plants/Aloe.tres index 9e2b333..1058daf 100644 --- a/resources/plants/Aloe.tres +++ b/resources/plants/Aloe.tres @@ -1,20 +1,8 @@ -[gd_resource type="Resource" script_class="PlantResource" load_steps=9 format=3 uid="uid://bf7vjtufjc8kt"] +[gd_resource type="Resource" script_class="PlantResource" load_steps=4 format=3 uid="uid://bf7vjtufjc8kt"] [ext_resource type="Texture2D" uid="uid://d4btl7vqi4v0q" path="res://assets/sprites/plants/aloe.tres" id="1_t4137"] [ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="1_vw2kg"] [ext_resource type="PackedScene" uid="uid://bw1w8jp0yeypy" path="res://scenes/entities/plants/aloe.tscn" id="2_6a4ia"] -[ext_resource type="Texture2D" uid="uid://c35dr3hiy66k0" path="res://assets/sprites/gui/ChooseYourSeeds/PremiumFrameField.tres" id="3_2s3af"] -[ext_resource type="Texture2D" uid="uid://31jc2e7dijas" path="res://assets/sprites/gui/PremiumPlantCard.tres" id="3_vfv8g"] -[ext_resource type="Script" uid="uid://3m7xks3xq3hl" path="res://scripts/components/gui/seedpackets/CustomSeedpacketFrame.cs" id="4_d5nqg"] - -[sub_resource type="LabelSettings" id="LabelSettings_2s3af"] - -[sub_resource type="Resource" id="Resource_5me4i"] -script = ExtResource("4_d5nqg") -frame = ExtResource("3_vfv8g") -font = SubResource("LabelSettings_2s3af") -almanachField = ExtResource("3_2s3af") -metadata/_custom_type_script = "uid://3m7xks3xq3hl" [resource] script = ExtResource("1_vw2kg") @@ -25,5 +13,5 @@ Scene = ExtResource("2_6a4ia") ReloadTime = 15.0 ReloadProgress = 0.0 Preview = ExtResource("1_t4137") -customFrame = SubResource("Resource_5me4i") Layer = 1 +Order = 6 diff --git a/resources/plants/Cucumber.tres b/resources/plants/Cucumber.tres new file mode 100644 index 0000000..73c491f --- /dev/null +++ b/resources/plants/Cucumber.tres @@ -0,0 +1,22 @@ +[gd_resource type="Resource" script_class="PlantResource" load_steps=5 format=3 uid="uid://cl5bsa2unhcl0"] + +[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="1_jrx81"] +[ext_resource type="Texture2D" uid="uid://bt76iudw2qgnv" path="res://assets/sprites/atlases/plants/cumbucer.png" id="1_tdg4d"] +[ext_resource type="PackedScene" uid="uid://cjoyh54cpjla7" path="res://scenes/entities/plants/cucumber.tscn" id="2_0mr6r"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_3gogt"] +atlas = ExtResource("1_tdg4d") +region = Rect2(2, 1, 41, 65) + +[resource] +script = ExtResource("1_jrx81") +name_key = "cucumber" +description_key = "cucumber_desc" +Cost = 75.0 +Scene = ExtResource("2_0mr6r") +ReloadTime = 5.0 +ReloadProgress = 0.0 +Preview = SubResource("AtlasTexture_3gogt") +Layer = 1 +Order = 8 +metadata/_custom_type_script = "uid://cyenlko1knygw" diff --git a/resources/plants/Garlic.tres b/resources/plants/Garlic.tres index 07baa57..0ad4a9a 100644 --- a/resources/plants/Garlic.tres +++ b/resources/plants/Garlic.tres @@ -14,3 +14,4 @@ ReloadTime = 7.5 ReloadProgress = 0.67 Preview = ExtResource("1_datic") Layer = 1 +Order = 7 diff --git a/resources/plants/Nerdus.tres b/resources/plants/Nerdus.tres new file mode 100644 index 0000000..beb0d1d --- /dev/null +++ b/resources/plants/Nerdus.tres @@ -0,0 +1,22 @@ +[gd_resource type="Resource" script_class="PlantResource" load_steps=5 format=3 uid="uid://do7m0lfki5ere"] + +[ext_resource type="Texture2D" uid="uid://b06e8xhdy77d1" path="res://assets/sprites/atlases/plants/nerdus.png" id="1_of51r"] +[ext_resource type="PackedScene" uid="uid://k5aj2slxar7w" path="res://scenes/entities/plants/nerdus.tscn" id="2_0i6qf"] +[ext_resource type="Script" uid="uid://cyenlko1knygw" path="res://scripts/resources/PlantResource.cs" id="3_30qd0"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_ivp5w"] +atlas = ExtResource("1_of51r") +region = Rect2(477, 9, 60, 59) + +[resource] +script = ExtResource("3_30qd0") +name_key = "nerdus" +description_key = "nerdus_desc" +Cost = 125.0 +Scene = ExtResource("2_0i6qf") +ReloadTime = 10.0 +ReloadProgress = 0.0 +Preview = SubResource("AtlasTexture_ivp5w") +Layer = 1 +Order = 11 +metadata/_custom_type_script = "uid://cyenlko1knygw" diff --git a/resources/plants/PotatoMine.tres b/resources/plants/PotatoMine.tres index 776ad20..6c6f453 100644 --- a/resources/plants/PotatoMine.tres +++ b/resources/plants/PotatoMine.tres @@ -14,3 +14,4 @@ ReloadTime = 25.0 ReloadProgress = 0.9 Preview = ExtResource("1_xk2pg") Layer = 1 +Order = 3 diff --git a/resources/plants/Snowpea.tres b/resources/plants/Snowpea.tres index 93d6bde..51db90a 100644 --- a/resources/plants/Snowpea.tres +++ b/resources/plants/Snowpea.tres @@ -14,3 +14,4 @@ ReloadTime = 5.0 ReloadProgress = 0.0 Preview = ExtResource("1_7fyy2") Layer = 1 +Order = 5 diff --git a/resources/plants/Spikeweed.tres b/resources/plants/Spikeweed.tres index cfd319b..977223b 100644 --- a/resources/plants/Spikeweed.tres +++ b/resources/plants/Spikeweed.tres @@ -14,3 +14,4 @@ ReloadTime = 5.0 ReloadProgress = 0.0 Preview = ExtResource("1_2ol2i") Layer = 1 +Order = 4 diff --git a/resources/plants/Sunflower.tres b/resources/plants/Sunflower.tres index 7347bf8..5d05e64 100644 --- a/resources/plants/Sunflower.tres +++ b/resources/plants/Sunflower.tres @@ -14,3 +14,4 @@ ReloadTime = 5.0 ReloadProgress = 1.0 Preview = ExtResource("1_8rd5i") Layer = 1 +Order = 1 diff --git a/resources/plants/Threepeater.tres b/resources/plants/Threepeater.tres index 4a62eef..d8f8fcb 100644 --- a/resources/plants/Threepeater.tres +++ b/resources/plants/Threepeater.tres @@ -14,3 +14,4 @@ ReloadTime = 5.0 ReloadProgress = 0.0 Preview = ExtResource("1_hinp6") Layer = 1 +Order = 10 diff --git a/resources/plants/Wallnut.tres b/resources/plants/Wallnut.tres index 63b6271..ea3bcaa 100644 --- a/resources/plants/Wallnut.tres +++ b/resources/plants/Wallnut.tres @@ -14,3 +14,4 @@ ReloadTime = 20.0 ReloadProgress = 0.0 Preview = ExtResource("1_2akap") Layer = 1 +Order = 2 diff --git a/resources/zombies/basic.tres b/resources/zombies/basic.tres index 2c5675a..7239564 100644 --- a/resources/zombies/basic.tres +++ b/resources/zombies/basic.tres @@ -1,8 +1,12 @@ -[gd_resource type="Resource" script_class="ZombieResource" load_steps=4 format=3 uid="uid://buvacn56kyy2p"] +[gd_resource type="Resource" script_class="ZombieResource" load_steps=5 format=3 uid="uid://buvacn56kyy2p"] [ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_c2mq3"] [ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/ZombieResource.cs" id="1_k277m"] -[ext_resource type="Texture2D" uid="uid://bwdqbrnn7ygtr" path="res://assets/sprites/atlases/zombies/Зондби.png" id="1_l6de4"] +[ext_resource type="Texture2D" uid="uid://5gpf2sodhn6e" path="res://assets/sprites/zombies/previews.png" id="1_l6de4"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_wu2q8"] +atlas = ExtResource("1_l6de4") +region = Rect2(0, 0, 43, 88) [resource] script = ExtResource("1_k277m") @@ -12,6 +16,7 @@ Cost = 1.0 Scene = ExtResource("1_c2mq3") ReloadTime = 1.0 ReloadProgress = 0.0 -Preview = ExtResource("1_l6de4") +Preview = SubResource("AtlasTexture_wu2q8") Layer = 1 +Order = 0 metadata/_custom_type_script = "uid://cqxj7o8hdm82n" diff --git a/resources/zombies/buckethead.tres b/resources/zombies/buckethead.tres index b342cd9..02c4457 100644 --- a/resources/zombies/buckethead.tres +++ b/resources/zombies/buckethead.tres @@ -1,8 +1,12 @@ -[gd_resource type="Resource" script_class="ZombieResource" load_steps=4 format=3 uid="uid://dkhjlu7u0vny6"] +[gd_resource type="Resource" script_class="ZombieResource" load_steps=5 format=3 uid="uid://dkhjlu7u0vny6"] [ext_resource type="PackedScene" uid="uid://xu4i6tmkv00a" path="res://scenes/entities/Zombies/bucket_zombie.tscn" id="1_lhcag"] [ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/ZombieResource.cs" id="1_sngfh"] -[ext_resource type="Texture2D" uid="uid://bwdqbrnn7ygtr" path="res://assets/sprites/atlases/zombies/Зондби.png" id="1_ufs7s"] +[ext_resource type="Texture2D" uid="uid://5gpf2sodhn6e" path="res://assets/sprites/zombies/previews.png" id="1_ufs7s"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_drksh"] +atlas = ExtResource("1_ufs7s") +region = Rect2(137, 0, 47, 101) [resource] script = ExtResource("1_sngfh") @@ -12,6 +16,7 @@ Cost = 5.0 Scene = ExtResource("1_lhcag") ReloadTime = 1.0 ReloadProgress = 0.0 -Preview = ExtResource("1_ufs7s") +Preview = SubResource("AtlasTexture_drksh") Layer = 1 +Order = 2 metadata/_custom_type_script = "uid://cqxj7o8hdm82n" diff --git a/resources/zombies/conehead.tres b/resources/zombies/conehead.tres index 36b66d9..bbf134c 100644 --- a/resources/zombies/conehead.tres +++ b/resources/zombies/conehead.tres @@ -1,9 +1,13 @@ -[gd_resource type="Resource" script_class="ZombieResource" load_steps=4 format=3 uid="uid://nceohd32fkxk"] +[gd_resource type="Resource" script_class="ZombieResource" load_steps=5 format=3 uid="uid://nceohd32fkxk"] -[ext_resource type="Texture2D" uid="uid://bwdqbrnn7ygtr" path="res://assets/sprites/atlases/zombies/Зондби.png" id="1_f7g7v"] +[ext_resource type="Texture2D" uid="uid://5gpf2sodhn6e" path="res://assets/sprites/zombies/previews.png" id="1_f7g7v"] [ext_resource type="PackedScene" uid="uid://hhjbqkjqpt7x" path="res://scenes/entities/Zombies/cone_zombie.tscn" id="1_llf5l"] [ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/ZombieResource.cs" id="1_sw7hj"] +[sub_resource type="AtlasTexture" id="AtlasTexture_q44xp"] +atlas = ExtResource("1_f7g7v") +region = Rect2(92, 0, 45, 106) + [resource] script = ExtResource("1_sw7hj") name_key = "conehead" @@ -12,6 +16,7 @@ Cost = 2.0 Scene = ExtResource("1_llf5l") ReloadTime = 1.0 ReloadProgress = 0.0 -Preview = ExtResource("1_f7g7v") +Preview = SubResource("AtlasTexture_q44xp") Layer = 1 +Order = 1 metadata/_custom_type_script = "uid://cqxj7o8hdm82n" diff --git a/resources/zombies/door_zombie.tres b/resources/zombies/door_zombie.tres new file mode 100644 index 0000000..dfe80d9 --- /dev/null +++ b/resources/zombies/door_zombie.tres @@ -0,0 +1,16 @@ +[gd_resource type="Resource" script_class="ZombieResource" load_steps=3 format=3 uid="uid://cugwy5bw4wljr"] + +[ext_resource type="PackedScene" uid="uid://p5jhgg2r7e07" path="res://scenes/entities/Zombies/door_zombie.tscn" id="1_3664b"] +[ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/ZombieResource.cs" id="3_bydiv"] + +[resource] +script = ExtResource("3_bydiv") +name_key = "doorz" +description_key = "doorz_desc" +Cost = 4.5 +Scene = ExtResource("1_3664b") +ReloadTime = 1.0 +ReloadProgress = 0.0 +Layer = 1 +Order = 4 +metadata/_custom_type_script = "uid://cqxj7o8hdm82n" diff --git a/resources/zombies/hobo.tres b/resources/zombies/hobo.tres index 6736d4f..38c432e 100644 --- a/resources/zombies/hobo.tres +++ b/resources/zombies/hobo.tres @@ -1,9 +1,13 @@ -[gd_resource type="Resource" script_class="ZombieResource" load_steps=4 format=3 uid="uid://c38vfdw5b60xw"] +[gd_resource type="Resource" script_class="ZombieResource" load_steps=5 format=3 uid="uid://c38vfdw5b60xw"] [ext_resource type="PackedScene" uid="uid://bgqmwsb6ynm81" path="res://scenes/entities/Zombies/hobo.tscn" id="1_4myt6"] -[ext_resource type="Texture2D" uid="uid://bwdqbrnn7ygtr" path="res://assets/sprites/atlases/zombies/Зондби.png" id="1_nt7w3"] +[ext_resource type="Texture2D" uid="uid://5gpf2sodhn6e" path="res://assets/sprites/zombies/previews.png" id="1_nt7w3"] [ext_resource type="Script" uid="uid://cqxj7o8hdm82n" path="res://scripts/resources/ZombieResource.cs" id="1_u5qpq"] +[sub_resource type="AtlasTexture" id="AtlasTexture_73ahc"] +atlas = ExtResource("1_nt7w3") +region = Rect2(43, 0, 49, 95) + [resource] script = ExtResource("1_u5qpq") name_key = "hobo" @@ -12,6 +16,7 @@ Cost = 7.0 Scene = ExtResource("1_4myt6") ReloadTime = 1.0 ReloadProgress = 0.0 -Preview = ExtResource("1_nt7w3") +Preview = SubResource("AtlasTexture_73ahc") Layer = 1 +Order = 5 metadata/_custom_type_script = "uid://cqxj7o8hdm82n" diff --git a/scenes/audio_sequencer.tscn b/scenes/audio_sequencer.tscn index d74e028..a9df5dc 100644 --- a/scenes/audio_sequencer.tscn +++ b/scenes/audio_sequencer.tscn @@ -4,8 +4,9 @@ [ext_resource type="Script" uid="uid://c1x4n4nqyq72f" path="res://scripts/audio/ChannelSettings.cs" id="2_npxdp"] [sub_resource type="Resource" id="Resource_iuccj"] +resource_local_to_scene = true script = ExtResource("2_npxdp") -restartTreshold = 0.3 +restartTreshold = 0.0 metadata/_custom_type_script = "uid://c1x4n4nqyq72f" [node name="AudioSequencer" type="Node"] diff --git a/scenes/debug_lvl.tscn b/scenes/debug_lvl.tscn index b48402c..e216c3e 100644 --- a/scenes/debug_lvl.tscn +++ b/scenes/debug_lvl.tscn @@ -1,14 +1,14 @@ [gd_scene load_steps=12 format=3 uid="uid://crxsvv7drckpw"] -[ext_resource type="Script" uid="uid://bndu1h5kgcde8" path="res://scripts/components/level/RuntimeLevelData.cs" id="1_i3bf5"] +[ext_resource type="Script" uid="uid://bndu1h5kgcde8" path="res://scripts/level/RuntimeLevelData.cs" id="1_i3bf5"] [ext_resource type="Texture2D" uid="uid://b0tb2hjum40aw" path="res://assets/sprites/background_summer.png" id="2_vmxhy"] -[ext_resource type="Script" uid="uid://bso32xkw738sy" path="res://scripts/components/level/PoolContainer.cs" id="3_1y18w"] +[ext_resource type="Script" uid="uid://bso32xkw738sy" path="res://scripts/level/PoolContainer.cs" id="3_1y18w"] [ext_resource type="PackedScene" uid="uid://dpxxjfd5lv5sv" path="res://scenes/gui/choose_your_seeds.tscn" id="5_5e78h"] [ext_resource type="PackedScene" uid="uid://devn21c7luf45" path="res://scenes/level components/field_controller.tscn" id="5_lwpg6"] [ext_resource type="PackedScene" uid="uid://cfnmspei3k4p7" path="res://scenes/gui/runtime_gui.tscn" id="6_0baou"] [ext_resource type="PackedScene" uid="uid://bpekho7leatr5" path="res://scenes/sun.tscn" id="6_ay12k"] -[ext_resource type="Script" uid="uid://cslqjdd5wq4rc" path="res://scripts/components/level/SunSpawner.cs" id="6_lkguy"] -[ext_resource type="Script" uid="uid://blpu7t8tf6277" path="res://scripts/components/particles/FallFloor.cs" id="10_q4fsb"] +[ext_resource type="Script" uid="uid://cslqjdd5wq4rc" path="res://scripts/level/SunSpawner.cs" id="6_lkguy"] +[ext_resource type="Script" uid="uid://blpu7t8tf6277" path="res://scripts/particles/FallFloor.cs" id="10_q4fsb"] [ext_resource type="PackedScene" uid="uid://bgqmwsb6ynm81" path="res://scenes/entities/Zombies/hobo.tscn" id="10_tbxxq"] [sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_tbxxq"] diff --git a/scenes/entities/Zombies/bucket_zombie.tscn b/scenes/entities/Zombies/bucket_zombie.tscn index a0a21f2..b30d9b1 100644 --- a/scenes/entities/Zombies/bucket_zombie.tscn +++ b/scenes/entities/Zombies/bucket_zombie.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=3 uid="uid://xu4i6tmkv00a"] +[gd_scene load_steps=14 format=3 uid="uid://xu4i6tmkv00a"] [ext_resource type="PackedScene" uid="uid://hhjbqkjqpt7x" path="res://scenes/entities/Zombies/cone_zombie.tscn" id="1_mwqpo"] [ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_3mrqj"] @@ -8,6 +8,7 @@ [ext_resource type="AudioStream" uid="uid://bu1egfsyplpx4" path="res://assets/audio/sfx/metalhit_generic.tres" id="5_lt6ps"] [ext_resource type="Texture2D" uid="uid://cmmpfi8ug43l2" path="res://assets/sprites/bucket3.tres" id="5_v1iwd"] [ext_resource type="AudioStream" uid="uid://w0qfwds4o3ti" path="res://assets/audio/sfx/hit_generic.tres" id="6_kedip"] +[ext_resource type="Texture2D" uid="uid://dacgbwohpmeed" path="res://assets/sprites/zombies/basic.png" id="6_lea3a"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_wdi07"] resource_local_to_scene = true @@ -15,14 +16,15 @@ shader = ExtResource("2_3mrqj") shader_parameter/blend_color = Color(1, 1, 1, 1) shader_parameter/amount = 0.0 -[sub_resource type="Resource" id="Resource_2bm8y"] -resource_local_to_scene = true -script = ExtResource("4_1s2fn") -flat_value = 10.0 -percentage_value = 0.0 -mult_value = 1.0 +[sub_resource type="AtlasTexture" id="AtlasTexture_wfem3"] +atlas = ExtResource("6_lea3a") +region = Rect2(24, 2, 9, 9) -[sub_resource type="Resource" id="Resource_lt6ps"] +[sub_resource type="AtlasTexture" id="AtlasTexture_auqeq"] +atlas = ExtResource("6_lea3a") +region = Rect2(0, 32, 9, 15) + +[sub_resource type="Resource" id="Resource_v1iwd"] resource_local_to_scene = true script = ExtResource("4_1s2fn") flat_value = 0.2 @@ -34,23 +36,116 @@ mult_value = 1.0 [node name="CanvasGroup" parent="." index="0"] material = SubResource("ShaderMaterial_wdi07") -[node name="Hat" parent="CanvasGroup" index="1"] -position = Vector2(-13, -82) +[node name="Zombie" parent="CanvasGroup/basic_zombie_walk" index="0"] +use_parent_material = false -[node name="Sprite" parent="CanvasGroup/Hat" index="0"] -position = Vector2(1, 0) +[node name="Butt" parent="CanvasGroup/basic_zombie_walk/Zombie" index="0"] +use_parent_material = false +scale = Vector2(0.999912, 0.999912) + +[node name="Butt" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="0"] +use_parent_material = false + +[node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"] +use_parent_material = false +scale = Vector2(0.999835, 0.999835) + +[node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] +scale = Vector2(0.999833, 0.999833) + +[node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] +scale = Vector2(0.999834, 0.999834) + +[node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"] +use_parent_material = false +scale = Vector2(0.999835, 0.999835) + +[node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"] +scale = Vector2(0.999834, 0.999834) + +[node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] +scale = Vector2(0.999829, 0.999829) + +[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] +use_parent_material = false +scale = Vector2(0.999829, 0.999829) + +[node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] +use_parent_material = false +scale = Vector2(0.999825, 0.999825) + +[node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] +scale = Vector2(0.999827, 0.999827) + +[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"] +scale = Vector2(0.999828, 0.999828) + +[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] +rotation = 0.140011 +skew = -0.000141382 + +[node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"] +position = Vector2(-16, -8) +scale = Vector2(1, 1) + +[node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"] +position = Vector2(-4, -9) +scale = Vector2(1, 1) + +[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] +position = Vector2(-3.00172, 2.99709) +rotation = 0.0135876 +scale = Vector2(0.999828, 0.999828) + +[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] +scale = Vector2(0.999828, 0.999828) + +[node name="Hat" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="4"] +position = Vector2(-6, -8) + +[node name="Sprite" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat" index="0"] +position = Vector2(0.994479, -10.0058) texture = ExtResource("3_0nlp0") degradationStages = Array[Texture]([ExtResource("3_0nlp0"), ExtResource("4_xx7fu"), ExtResource("5_v1iwd")]) -[node name="Eatbox" parent="." index="2"] -_damage = SubResource("Resource_2bm8y") +[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="4"] +scale = Vector2(0.999829, 0.999829) -[node name="Mover" parent="." index="5"] -_speed = SubResource("Resource_lt6ps") +[node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] +rotation = 0.131641 +scale = Vector2(0.999999, 0.999999) -[node name="Armor" parent="." index="7"] -MaxHP = 385 +[node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"] +show_behind_parent = false +position = Vector2(-0.99983, 12.9978) +rotation = -0.0580983 +scale = Vector2(0.999657, 0.999657) -[node name="HitPlayer" parent="." index="8"] +[node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] +scale = Vector2(0.999829, 0.999829) + +[node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] +scale = Vector2(0.999827, 0.999827) + +[node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand" index="0"] +texture = SubResource("AtlasTexture_wfem3") +centered = false +offset = Vector2(-4, 0) +metadata/_edit_lock_ = true + +[node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="1"] +texture = SubResource("AtlasTexture_auqeq") +centered = false +offset = Vector2(-5, 0) +metadata/_edit_lock_ = true + +[node name="Mover" parent="." index="4"] +_speed = SubResource("Resource_v1iwd") +_speedControlMult = 0.987455 + +[node name="Armor" parent="." index="6"] +MaxHP = 375.0 + +[node name="HitPlayer" parent="." index="7"] playlist = Array[AudioStream]([ExtResource("5_lt6ps"), ExtResource("6_kedip")]) channels = Array[String](["metal_hit", "hit"]) diff --git a/scenes/entities/Zombies/cone_zombie.tscn b/scenes/entities/Zombies/cone_zombie.tscn index ed27754..0e047e3 100644 --- a/scenes/entities/Zombies/cone_zombie.tscn +++ b/scenes/entities/Zombies/cone_zombie.tscn @@ -2,11 +2,11 @@ [ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_3dq4c"] [ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_2dq8e"] -[ext_resource type="Script" uid="uid://fd4im1fmwc5n" path="res://scripts/components/Armor.cs" id="3_5s7in"] -[ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/components/particles/FallParticle.cs" id="3_w70im"] +[ext_resource type="Script" uid="uid://fd4im1fmwc5n" path="res://scripts/Armor.cs" id="3_5s7in"] +[ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/particles/FallParticle.cs" id="3_w70im"] [ext_resource type="Texture2D" uid="uid://ceqvdmude7cgg" path="res://assets/sprites/cone1.tres" id="4_qdhik"] [ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="4_qof5v"] -[ext_resource type="Script" uid="uid://bbw848msxb4re" path="res://scripts/components/DegradingSprite.cs" id="5_ickyd"] +[ext_resource type="Script" uid="uid://bbw848msxb4re" path="res://scripts/DegradingSprite.cs" id="5_ickyd"] [ext_resource type="Texture2D" uid="uid://cl5ekw72wi75c" path="res://assets/sprites/cone2.tres" id="6_b6mal"] [ext_resource type="AudioStream" uid="uid://bmupd3v3gvsca" path="res://assets/audio/sfx/plastichit_generic.tres" id="7_0amn8"] [ext_resource type="Texture2D" uid="uid://cnn81r1y0xwod" path="res://assets/sprites/cone3.tres" id="7_011r0"] @@ -20,14 +20,14 @@ shader_parameter/amount = 0.0 [sub_resource type="CircleShape2D" id="CircleShape2D_67t4t"] -[sub_resource type="Resource" id="Resource_w70im"] +[sub_resource type="Resource" id="Resource_011r0"] resource_local_to_scene = true script = ExtResource("4_qof5v") -flat_value = 10.0 +flat_value = 5.0 percentage_value = 0.0 mult_value = 1.0 -[sub_resource type="Resource" id="Resource_qof5v"] +[sub_resource type="Resource" id="Resource_b6mal"] resource_local_to_scene = true script = ExtResource("4_qof5v") flat_value = 0.2 @@ -40,45 +40,118 @@ _armor = NodePath("Armor") [node name="CanvasGroup" parent="." index="0"] material = SubResource("ShaderMaterial_sat5k") -[node name="Hat" type="RigidBody2D" parent="CanvasGroup" index="1" node_paths=PackedStringArray("data")] -position = Vector2(-9, -76) +[node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"] +scale = Vector2(0.999832, 0.999832) + +[node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] +scale = Vector2(0.999835, 0.999835) + +[node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] +scale = Vector2(0.999836, 0.999836) + +[node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"] +scale = Vector2(0.999834, 0.999834) + +[node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"] +scale = Vector2(0.999836, 0.999836) + +[node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] +scale = Vector2(0.999828, 0.999828) + +[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] +scale = Vector2(0.999829, 0.999829) + +[node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] +scale = Vector2(0.99983, 0.99983) + +[node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] +scale = Vector2(0.99983, 0.99983) + +[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"] +scale = Vector2(0.99983, 0.99983) + +[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] +rotation = -0.146474 +skew = -9.9659e-05 + +[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"] +scale = Vector2(0.999827, 0.999827) + +[node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"] +position = Vector2(-16, -7.99999) +scale = Vector2(1, 1) + +[node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"] +position = Vector2(-4, -9) +scale = Vector2(1, 1) + +[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] +position = Vector2(-2.8181, 2.56097) +rotation = -0.102313 +scale = Vector2(0.999828, 0.999828) + +[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] +scale = Vector2(0.999828, 0.999828) + +[node name="Hat" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="4" node_paths=PackedStringArray("data")] +position = Vector2(-2.5, -13.5) +scale = Vector2(1.00086, 1.00086) collision_layer = 128 collision_mask = 64 mass = 0.5 center_of_mass_mode = 1 freeze = true script = ExtResource("3_w70im") -data = NodePath("../..") +data = NodePath("../../../../../../..") maxAngle = 45.0 minTorque = -45.0 maxTorque = 45.0 Impulse = 100.0 -[node name="Sprite" type="Sprite2D" parent="CanvasGroup/Hat" index="0" node_paths=PackedStringArray("armor")] +[node name="Sprite" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat" index="0" node_paths=PackedStringArray("armor")] position = Vector2(-1, -12) texture = ExtResource("4_qdhik") script = ExtResource("5_ickyd") -armor = NodePath("../../../Armor") +armor = NodePath("../../../../../../../../Armor") degradationStages = Array[Texture]([ExtResource("4_qdhik"), ExtResource("6_b6mal"), ExtResource("7_011r0")]) thresholdPercentage = Array[float]([1.0, 0.667, 0.333]) -[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/Hat" index="1"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat" index="1"] position = Vector2(1, -6) shape = SubResource("CircleShape2D_67t4t") +[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="4"] +scale = Vector2(0.999827, 0.999827) + +[node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] +rotation = -0.15525 +scale = Vector2(1, 1) + +[node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"] +position = Vector2(-0.999828, 12.9978) +rotation = -0.127972 +scale = Vector2(0.999657, 0.999657) + +[node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] +scale = Vector2(0.99983, 0.99983) + +[node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] +scale = Vector2(0.999827, 0.999827) + [node name="Eatbox" parent="." index="2"] -_damage = SubResource("Resource_w70im") +_damage = SubResource("Resource_011r0") -[node name="Mover" parent="." index="5"] -_speed = SubResource("Resource_qof5v") +[node name="Mover" parent="." index="4"] +_speed = SubResource("Resource_b6mal") +_speedControlMult = 0.899509 -[node name="Armor" type="Node" parent="." index="7"] +[node name="Armor" type="Node" parent="." index="6"] script = ExtResource("3_5s7in") -MaxHP = 130 +MaxHP = 135.0 -[node name="HitPlayer" parent="." index="8"] +[node name="HitPlayer" parent="." index="7"] playlist = Array[AudioStream]([ExtResource("7_0amn8"), ExtResource("7_67t4t")]) channels = Array[String](["plastic_hit", "hit"]) [connection signal="ArmorLost" from="Armor" to="HitPlayer" method="Next"] -[connection signal="ArmorLost" from="Armor" to="CanvasGroup/Hat" method="FallOff"] +[connection signal="ArmorLost" from="Armor" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Hat" method="FallOff"] diff --git a/scenes/entities/Zombies/door_zombie.tscn b/scenes/entities/Zombies/door_zombie.tscn new file mode 100644 index 0000000..0843da6 --- /dev/null +++ b/scenes/entities/Zombies/door_zombie.tscn @@ -0,0 +1,186 @@ +[gd_scene load_steps=19 format=3 uid="uid://p5jhgg2r7e07"] + +[ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_k7yv2"] +[ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_g7fge"] +[ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/zombies/RuntimeZombieData.cs" id="2_uhol2"] +[ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="3_uvlkc"] +[ext_resource type="Texture2D" uid="uid://b18blso5pbc6a" path="res://assets/sprites/atlases/zombies/armor.png" id="4_ed67f"] +[ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/particles/FallParticle.cs" id="4_woxi6"] +[ext_resource type="Script" uid="uid://fd4im1fmwc5n" path="res://scripts/Armor.cs" id="5_ed67f"] +[ext_resource type="Script" uid="uid://bbw848msxb4re" path="res://scripts/DegradingSprite.cs" id="6_woxi6"] +[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="7_tj3uj"] +[ext_resource type="Script" uid="uid://d3l8e8ko5r5i3" path="res://scripts/ArmorHPObserver.cs" id="7_uhol2"] +[ext_resource type="AudioStream" uid="uid://bu1egfsyplpx4" path="res://assets/audio/sfx/metalhit_generic.tres" id="8_uhol2"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ed67f"] +size = Vector2(20, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_woxi6"] +atlas = ExtResource("4_ed67f") +region = Rect2(0, 71, 48, 88) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yhtii"] +atlas = ExtResource("4_ed67f") +region = Rect2(48, 71, 48, 88) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tj3uj"] +atlas = ExtResource("4_ed67f") +region = Rect2(96, 71, 47, 88) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_p0ieu"] +resource_local_to_scene = true +shader = ExtResource("2_g7fge") +shader_parameter/blend_color = Color(0.73, 0.73, 0.73, 1) +shader_parameter/amount = 0.0 + +[sub_resource type="Resource" id="Resource_ed67f"] +resource_local_to_scene = true +script = ExtResource("3_uvlkc") +flat_value = 5.0 +percentage_value = 0.0 +mult_value = 1.0 + +[sub_resource type="Resource" id="Resource_woxi6"] +resource_local_to_scene = true +script = ExtResource("3_uvlkc") +flat_value = 0.2 +percentage_value = 0.0 +mult_value = 1.0 + +[node name="DoorZombie" instance=ExtResource("1_k7yv2")] + +[node name="Shield" type="Node2D" parent="." index="0" node_paths=PackedStringArray("_armor")] +position = Vector2(-29, 0) +script = ExtResource("2_uhol2") +_armor = NodePath("MainHP") +metadata/_custom_type_script = "uid://3tw88wj1nrj1" + +[node name="Hitbox" type="Area2D" parent="Shield" index="0"] +collision_layer = 8 +collision_mask = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Shield/Hitbox" index="0"] +position = Vector2(0, -25) +shape = SubResource("RectangleShape2D_ed67f") + +[node name="MainHP" type="Node" parent="Shield" index="1"] +script = ExtResource("5_ed67f") +MaxHP = 375.0 +metadata/_custom_type_script = "uid://fd4im1fmwc5n" + +[node name="Particle" type="RigidBody2D" parent="Shield" index="2" node_paths=PackedStringArray("data")] +use_parent_material = true +position = Vector2(0, -43) +collision_layer = 128 +collision_mask = 64 +freeze = true +script = ExtResource("4_woxi6") +data = NodePath("..") +minTorque = 100.0 +maxTorque = -100.0 + +[node name="Sprite2D" type="Sprite2D" parent="Shield/Particle" index="0" node_paths=PackedStringArray("armor")] +z_index = 1 +use_parent_material = true +texture = SubResource("AtlasTexture_woxi6") +script = ExtResource("6_woxi6") +armor = NodePath("../../MainHP") +degradationStages = Array[Texture2D]([SubResource("AtlasTexture_woxi6"), SubResource("AtlasTexture_yhtii"), SubResource("AtlasTexture_tj3uj")]) +thresholdPercentage = Array[float]([1.0, 0.667, 0.333]) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Shield/Particle" index="1"] +position = Vector2(0, 18) +shape = SubResource("RectangleShape2D_ed67f") + +[node name="Observer" type="Node" parent="Shield/Particle" index="2" node_paths=PackedStringArray("_observedArmor")] +script = ExtResource("7_uhol2") +_threshold = 0.0 +_observedArmor = NodePath("../../MainHP") + +[node name="ChannelPlayer" type="Node" parent="Shield" index="3"] +script = ExtResource("7_tj3uj") +audioStream = ExtResource("8_uhol2") +channel = "metalhit" +metadata/_custom_type_script = "uid://c36bj8u7jghc7" + +[node name="CanvasGroup" parent="." index="1"] +material = SubResource("ShaderMaterial_p0ieu") + +[node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"] +scale = Vector2(0.99983, 0.99983) + +[node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] +scale = Vector2(0.999832, 0.999832) + +[node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] +scale = Vector2(0.999831, 0.999831) + +[node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"] +scale = Vector2(0.999834, 0.999834) + +[node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"] +scale = Vector2(0.999833, 0.999833) + +[node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] +scale = Vector2(0.999829, 0.999829) + +[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] +scale = Vector2(0.999831, 0.999831) + +[node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] +scale = Vector2(0.99983, 0.99983) + +[node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] +scale = Vector2(0.999828, 0.999828) + +[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"] +scale = Vector2(0.99983, 0.99983) + +[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] +rotation = 0.163815 +skew = -0.000518203 + +[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3"] +scale = Vector2(0.999829, 0.999829) + +[node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"] +position = Vector2(-16, -8) + +[node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"] +position = Vector2(-4, -9) + +[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] +position = Vector2(-3.00201, 2.99659) +rotation = 0.0158977 +scale = Vector2(0.99983, 0.99983) + +[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] +scale = Vector2(0.99983, 0.99983) + +[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="4"] +scale = Vector2(0.999831, 0.999831) + +[node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] +rotation = 0.154022 +scale = Vector2(0.999998, 0.999998) + +[node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"] +position = Vector2(-0.99983, 12.9978) +rotation = -0.0679757 +scale = Vector2(0.999658, 0.999658) + +[node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] +scale = Vector2(0.999828, 0.999828) + +[node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] +scale = Vector2(0.999828, 0.999828) + +[node name="Eatbox" parent="." index="3"] +_damage = SubResource("Resource_ed67f") + +[node name="Mover" parent="." index="5"] +_speed = SubResource("Resource_woxi6") +_speedControlMult = 1.31004 + +[connection signal="OnDamaged" from="Shield" to="Shield/ChannelPlayer" method="Play"] +[connection signal="ThresholdReached" from="Shield/Particle/Observer" to="Shield/Particle" method="FallOff"] diff --git a/scenes/entities/Zombies/hobo.tscn b/scenes/entities/Zombies/hobo.tscn index 8751989..3eb6cf7 100644 --- a/scenes/entities/Zombies/hobo.tscn +++ b/scenes/entities/Zombies/hobo.tscn @@ -1,22 +1,24 @@ -[gd_scene load_steps=48 format=3 uid="uid://bgqmwsb6ynm81"] +[gd_scene load_steps=64 format=3 uid="uid://bgqmwsb6ynm81"] [ext_resource type="PackedScene" uid="uid://co11v3w8hbwgf" path="res://scenes/entities/Zombies/zombie.tscn" id="1_fnu7s"] [ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_6qr4h"] -[ext_resource type="Script" uid="uid://bcc7skl7ts6sh" path="res://scripts/systems/effects/Effect.cs" id="2_txjqc"] -[ext_resource type="Texture2D" uid="uid://cse1504ao4g8e" path="res://assets/sprites/atlases/zombies/hobo.png" id="3_6qr4h"] +[ext_resource type="Script" uid="uid://bcc7skl7ts6sh" path="res://scripts/systems/effects/Effect.cs" id="2_vn3j1"] [ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://resources/effects/GarlicEffect.tres" id="3_b583s"] -[ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/components/particles/FallParticle.cs" id="3_tu6af"] -[ext_resource type="AnimationLibrary" uid="uid://cuh2kyb21hmkm" path="res://resources/animations/zombies/basic_zombie.res" id="4_02fim"] -[ext_resource type="Script" uid="uid://c5v2og85t7s6j" path="res://scripts/components/zombies/behaviours/HoboBehaviour.cs" id="4_5selg"] +[ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/particles/FallParticle.cs" id="3_tu6af"] +[ext_resource type="Script" uid="uid://c5v2og85t7s6j" path="res://scripts/zombies/behaviours/HoboBehaviour.cs" id="4_5selg"] [ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="4_c1y3b"] -[ext_resource type="Script" uid="uid://fd4im1fmwc5n" path="res://scripts/components/Armor.cs" id="4_w8pya"] -[ext_resource type="Script" uid="uid://bbw848msxb4re" path="res://scripts/components/DegradingSprite.cs" id="5_ndwp0"] +[ext_resource type="Script" uid="uid://fd4im1fmwc5n" path="res://scripts/Armor.cs" id="4_w8pya"] +[ext_resource type="Texture2D" uid="uid://dri70dxyks7xh" path="res://assets/sprites/zombies/hobo.png" id="5_b583s"] +[ext_resource type="Script" uid="uid://bbw848msxb4re" path="res://scripts/DegradingSprite.cs" id="5_ndwp0"] [ext_resource type="Texture2D" uid="uid://8h5vg1pk32b2" path="res://assets/sprites/garbage_can1.tres" id="6_i6nje"] [ext_resource type="Texture2D" uid="uid://cogfbn4re3kob" path="res://assets/sprites/garbage_can2.tres" id="7_txjqc"] +[ext_resource type="AnimationLibrary" uid="uid://ceb3khu7rwgy8" path="res://resources/animations/zombies/basic.res" id="7_vn3j1"] [ext_resource type="AudioStream" uid="uid://bu1egfsyplpx4" path="res://assets/audio/sfx/metalhit_generic.tres" id="8_4248q"] [ext_resource type="Texture2D" uid="uid://n2j2k2aijr7j" path="res://assets/sprites/garbage_can3.tres" id="8_b583s"] +[ext_resource type="AnimationLibrary" uid="uid://c0tlm0ta4dgbk" path="res://resources/animations/zombies/hobo.res" id="8_yb81c"] [ext_resource type="AudioStream" uid="uid://w0qfwds4o3ti" path="res://assets/audio/sfx/hit_generic.tres" id="9_tu6af"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="11_7jlle"] +[ext_resource type="Script" uid="uid://d3l8e8ko5r5i3" path="res://scripts/ArmorHPObserver.cs" id="12_vn3j1"] [ext_resource type="AudioStream" uid="uid://ch55p7qbaawtp" path="res://assets/audio/sfx/argh.tres" id="12_w1b1s"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_w8pya"] @@ -25,43 +27,102 @@ shader = ExtResource("2_6qr4h") shader_parameter/blend_color = Color(1, 1, 1, 1) shader_parameter/amount = 0.0 -[sub_resource type="AtlasTexture" id="AtlasTexture_w8pya"] -atlas = ExtResource("3_6qr4h") -region = Rect2(0, 15, 40, 49) +[sub_resource type="AtlasTexture" id="AtlasTexture_txjqc"] +atlas = ExtResource("5_b583s") +region = Rect2(115, 52, 17, 9) + +[sub_resource type="AtlasTexture" id="AtlasTexture_b583s"] +atlas = ExtResource("5_b583s") +region = Rect2(86, 50, 10, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_uoit3"] +atlas = ExtResource("5_b583s") +region = Rect2(115, 52, 17, 9) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vn3j1"] +atlas = ExtResource("5_b583s") +region = Rect2(101, 50, 10, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yb81c"] +atlas = ExtResource("5_b583s") +region = Rect2(117, 1, 8, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nlwsb"] +atlas = ExtResource("5_b583s") +region = Rect2(129, 4, 7, 10) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8y6c0"] +atlas = ExtResource("5_b583s") +region = Rect2(113, 22, 19, 13) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nc6p3"] +atlas = ExtResource("5_b583s") +region = Rect2(80, 30, 7, 18) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y0p2l"] +atlas = ExtResource("5_b583s") +region = Rect2(101, 37, 9, 11) + +[sub_resource type="AtlasTexture" id="AtlasTexture_op0h6"] +atlas = ExtResource("5_b583s") +region = Rect2(91, 32, 9, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0s5wm"] +atlas = ExtResource("5_b583s") +region = Rect2(137, 19, 29, 39) [sub_resource type="AtlasTexture" id="AtlasTexture_5selg"] -atlas = ExtResource("3_6qr4h") -region = Rect2(3, 0, 35, 11) +atlas = ExtResource("5_b583s") +region = Rect2(0, 29, 35, 11) [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_4248q"] radius = 17.0 height = 48.0 -[sub_resource type="Resource" id="Resource_qg8rq"] -resource_local_to_scene = true -script = ExtResource("4_c1y3b") -flat_value = 10.0 -percentage_value = 0.0 -mult_value = 1.0 +[sub_resource type="AtlasTexture" id="AtlasTexture_pjhfy"] +atlas = ExtResource("5_b583s") +region = Rect2(80, 0, 32, 30) -[sub_resource type="Animation" id="Animation_qv5y7"] -length = 0.001 +[sub_resource type="AtlasTexture" id="AtlasTexture_7cvmi"] +atlas = ExtResource("5_b583s") +region = Rect2(38, 22, 22, 13) + +[sub_resource type="AtlasTexture" id="AtlasTexture_n380g"] +atlas = ExtResource("5_b583s") +region = Rect2(34, 38, 45, 27) + +[sub_resource type="CircleShape2D" id="CircleShape2D_vn3j1"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_tebih"] +atlas = ExtResource("5_b583s") +region = Rect2(34, 0, 6, 19) + +[sub_resource type="AtlasTexture" id="AtlasTexture_auxav"] +atlas = ExtResource("5_b583s") +region = Rect2(43, 0, 9, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_dntsa"] +atlas = ExtResource("5_b583s") +region = Rect2(55, 0, 9, 10) + +[sub_resource type="Animation" id="Animation_vn3j1"] +resource_name = "RESET" tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("CanvasGroup/Sprite:self_modulate") +tracks/0/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm:position") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, -"values": [Color(1, 1, 1, 1)] +"values": [Vector2(-2, 14)] } tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true -tracks/1/path = NodePath("Mover:_speedControlMult") +tracks/1/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm:rotation") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { @@ -70,161 +131,616 @@ tracks/1/keys = { "update": 0, "values": [0.0] } - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_sq25x"] -_data = { -&"RESET": SubResource("Animation_qv5y7") -} - -[sub_resource type="Animation" id="Animation_w8pya"] -length = 2.0 -tracks/0/type = "method" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Mover") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(1.93333), -"transitions": PackedFloat32Array(1), -"values": [{ -"args": [3.0], -"method": &"SetSpeedMult" -}] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("CanvasGroup/Sprite:self_modulate") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0, 2), -"transitions": PackedFloat32Array(1, 1), -"update": 0, -"values": [Color(1, 1, 1, 1), Color(1, 0, 0, 1)] -} tracks/2/type = "value" tracks/2/imported = false tracks/2/enabled = true -tracks/2/path = NodePath("Mover:_speedControlMult") +tracks/2/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand:position") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { -"times": PackedFloat32Array(0, 2), -"transitions": PackedFloat32Array(1, 1), -"update": 1, -"values": [0.0, 1.0] -} -tracks/3/type = "method" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("RipPlayer") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(1.96667), -"transitions": PackedFloat32Array(1), -"values": [{ -"args": [], -"method": &"Play" -}] -} - -[sub_resource type="Animation" id="Animation_5selg"] -resource_name = "walk" -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Mover:_speedControlMult") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, -"values": [1.0] +"values": [Vector2(-1, 13)] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand:rotation") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("Zombie/Butt/Body/LeftUpperArm:position") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, -20)] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("Zombie/Butt/Body/LeftUpperArm:rotation") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/6/type = "value" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("Zombie/Butt/Body/Head/LeftEye:position") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-4, -9)] +} +tracks/7/type = "value" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath("Zombie/Butt/Body/Head/LeftEye:rotation") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/8/type = "value" +tracks/8/imported = false +tracks/8/enabled = true +tracks/8/path = NodePath("Zombie/Butt/Body/Head/RightEye:position") +tracks/8/interp = 1 +tracks/8/loop_wrap = true +tracks/8/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-16, -8)] +} +tracks/9/type = "value" +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/path = NodePath("Zombie/Butt/Body/Head/RightEye:rotation") +tracks/9/interp = 1 +tracks/9/loop_wrap = true +tracks/9/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/10/type = "value" +tracks/10/imported = false +tracks/10/enabled = true +tracks/10/path = NodePath("Zombie/Butt/Body/Head/Jaw:position") +tracks/10/interp = 1 +tracks/10/loop_wrap = true +tracks/10/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-3, 3)] +} +tracks/11/type = "value" +tracks/11/imported = false +tracks/11/enabled = true +tracks/11/path = NodePath("Zombie/Butt/Body/Head/Jaw:rotation") +tracks/11/interp = 1 +tracks/11/loop_wrap = true +tracks/11/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/12/type = "value" +tracks/12/imported = false +tracks/12/enabled = true +tracks/12/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand:position") +tracks/12/interp = 1 +tracks/12/loop_wrap = true +tracks/12/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, 13)] +} +tracks/13/type = "value" +tracks/13/imported = false +tracks/13/enabled = true +tracks/13/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand:rotation") +tracks/13/interp = 1 +tracks/13/loop_wrap = true +tracks/13/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/14/type = "value" +tracks/14/imported = false +tracks/14/enabled = true +tracks/14/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm:position") +tracks/14/interp = 1 +tracks/14/loop_wrap = true +tracks/14/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 15)] +} +tracks/15/type = "value" +tracks/15/imported = false +tracks/15/enabled = true +tracks/15/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm:rotation") +tracks/15/interp = 1 +tracks/15/loop_wrap = true +tracks/15/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/16/type = "value" +tracks/16/imported = false +tracks/16/enabled = true +tracks/16/path = NodePath("Zombie/Butt/Body/RightUpperArm:position") +tracks/16/interp = 1 +tracks/16/loop_wrap = true +tracks/16/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-14, -23)] +} +tracks/17/type = "value" +tracks/17/imported = false +tracks/17/enabled = true +tracks/17/path = NodePath("Zombie/Butt/Body/RightUpperArm:rotation") +tracks/17/interp = 1 +tracks/17/loop_wrap = true +tracks/17/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/18/type = "value" +tracks/18/imported = false +tracks/18/enabled = true +tracks/18/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot:position") +tracks/18/interp = 1 +tracks/18/loop_wrap = true +tracks/18/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(6, 10)] +} +tracks/19/type = "value" +tracks/19/imported = false +tracks/19/enabled = true +tracks/19/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot:rotation") +tracks/19/interp = 1 +tracks/19/loop_wrap = true +tracks/19/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/20/type = "value" +tracks/20/imported = false +tracks/20/enabled = true +tracks/20/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg:position") +tracks/20/interp = 1 +tracks/20/loop_wrap = true +tracks/20/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, 13)] +} +tracks/21/type = "value" +tracks/21/imported = false +tracks/21/enabled = true +tracks/21/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg:rotation") +tracks/21/interp = 1 +tracks/21/loop_wrap = true +tracks/21/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/22/type = "value" +tracks/22/imported = false +tracks/22/enabled = true +tracks/22/path = NodePath("Zombie/Butt/LeftUpperLeg:position") +tracks/22/interp = 1 +tracks/22/loop_wrap = true +tracks/22/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(6, 4)] +} +tracks/23/type = "value" +tracks/23/imported = false +tracks/23/enabled = true +tracks/23/path = NodePath("Zombie/Butt/LeftUpperLeg:rotation") +tracks/23/interp = 1 +tracks/23/loop_wrap = true +tracks/23/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/24/type = "value" +tracks/24/imported = false +tracks/24/enabled = true +tracks/24/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot:position") +tracks/24/interp = 1 +tracks/24/loop_wrap = true +tracks/24/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 14)] +} +tracks/25/type = "value" +tracks/25/imported = false +tracks/25/enabled = true +tracks/25/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot:rotation") +tracks/25/interp = 1 +tracks/25/loop_wrap = true +tracks/25/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/26/type = "value" +tracks/26/imported = false +tracks/26/enabled = true +tracks/26/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg:position") +tracks/26/interp = 1 +tracks/26/loop_wrap = true +tracks/26/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 12)] +} +tracks/27/type = "value" +tracks/27/imported = false +tracks/27/enabled = true +tracks/27/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg:rotation") +tracks/27/interp = 1 +tracks/27/loop_wrap = true +tracks/27/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/28/type = "value" +tracks/28/imported = false +tracks/28/enabled = true +tracks/28/path = NodePath("Zombie/Butt/RightUpperLeg:position") +tracks/28/interp = 1 +tracks/28/loop_wrap = true +tracks/28/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-6, 3)] +} +tracks/29/type = "value" +tracks/29/imported = false +tracks/29/enabled = true +tracks/29/path = NodePath("Zombie/Butt/RightUpperLeg:rotation") +tracks/29/interp = 1 +tracks/29/loop_wrap = true +tracks/29/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/30/type = "value" +tracks/30/imported = false +tracks/30/enabled = true +tracks/30/path = NodePath("Zombie/Butt:position") +tracks/30/interp = 1 +tracks/30/loop_wrap = true +tracks/30/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(5, -35)] +} +tracks/31/type = "value" +tracks/31/imported = false +tracks/31/enabled = true +tracks/31/path = NodePath("Zombie/Butt:rotation") +tracks/31/interp = 1 +tracks/31/loop_wrap = true +tracks/31/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/32/type = "value" +tracks/32/imported = false +tracks/32/enabled = true +tracks/32/path = NodePath("Zombie/Butt/Body:position") +tracks/32/interp = 1 +tracks/32/loop_wrap = true +tracks/32/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1, -2)] +} +tracks/33/type = "value" +tracks/33/imported = false +tracks/33/enabled = true +tracks/33/path = NodePath("Zombie/Butt/Body:rotation") +tracks/33/interp = 1 +tracks/33/loop_wrap = true +tracks/33/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/34/type = "value" +tracks/34/imported = false +tracks/34/enabled = true +tracks/34/path = NodePath("Zombie:position") +tracks/34/interp = 1 +tracks/34/loop_wrap = true +tracks/34/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(0, 0)] +} +tracks/35/type = "value" +tracks/35/imported = false +tracks/35/enabled = true +tracks/35/path = NodePath("Zombie:rotation") +tracks/35/interp = 1 +tracks/35/loop_wrap = true +tracks/35/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/36/type = "value" +tracks/36/imported = false +tracks/36/enabled = true +tracks/36/path = NodePath("Zombie/Butt/Body/Head:position") +tracks/36/interp = 1 +tracks/36/loop_wrap = true +tracks/36/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-10, -25)] +} +tracks/37/type = "value" +tracks/37/imported = false +tracks/37/enabled = true +tracks/37/path = NodePath("Zombie/Butt/Body/Head:rotation") +tracks/37/interp = 1 +tracks/37/loop_wrap = true +tracks/37/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/38/type = "value" +tracks/38/imported = false +tracks/38/enabled = true +tracks/38/path = NodePath("Zombie/Butt/Body/Head:visible") +tracks/38/interp = 1 +tracks/38/loop_wrap = true +tracks/38/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/39/type = "value" +tracks/39/imported = false +tracks/39/enabled = true +tracks/39/path = NodePath("Zombie/Butt/Body/Head/TrashcanLid:position") +tracks/39/interp = 1 +tracks/39/loop_wrap = true +tracks/39/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-0.0022974, -17.0131)] +} +tracks/40/type = "value" +tracks/40/imported = false +tracks/40/enabled = true +tracks/40/path = NodePath("Zombie/Butt/Body/Head/TrashcanLid:rotation") +tracks/40/interp = 1 +tracks/40/loop_wrap = true +tracks/40/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/41/type = "value" +tracks/41/imported = false +tracks/41/enabled = true +tracks/41/path = NodePath("Zombie/Butt/Body/Head/TrashcanLid:visible") +tracks/41/interp = 1 +tracks/41/loop_wrap = true +tracks/41/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/42/type = "value" +tracks/42/imported = false +tracks/42/enabled = true +tracks/42/path = NodePath("Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm/Left_Hand:texture") +tracks/42/interp = 1 +tracks/42/loop_wrap = true +tracks/42/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [SubResource("AtlasTexture_dntsa")] +} +tracks/43/type = "value" +tracks/43/imported = false +tracks/43/enabled = true +tracks/43/path = NodePath("../../Mover:_speedControlMult") +tracks/43/interp = 1 +tracks/43/loop_wrap = true +tracks/43/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/44/type = "value" +tracks/44/imported = false +tracks/44/enabled = true +tracks/44/path = NodePath("Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm/Left_Hand:offset") +tracks/44/interp = 1 +tracks/44/loop_wrap = true +tracks/44/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-4, -1)] } -[sub_resource type="AnimationLibrary" id="AnimationLibrary_5selg"] +[sub_resource type="AnimationLibrary" id="AnimationLibrary_x5uj2"] _data = { -&"can_destroy": SubResource("Animation_w8pya"), -&"run": SubResource("Animation_5selg") +&"RESET": SubResource("Animation_vn3j1") } +[sub_resource type="Resource" id="Resource_n380g"] +resource_local_to_scene = true +script = ExtResource("4_c1y3b") +flat_value = 5.0 +percentage_value = 0.0 +mult_value = 1.0 + [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2q05d"] -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_h0rfo"] -animation = &"basic_zombie/eat" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_nog33"] -animation = &"basic_zombie/idle" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_g2uel"] -animation = &"basic_zombie/walk" +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vn3j1"] +animation = &"basic/death" [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_02fim"] -animation = &"hobo_zombie/can_destroy" +animation = &"basic/stand" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_yb81c"] +animation = &"basic/eating" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_h0rfo"] +animation = &"hobo/eating_without_arms" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_nog33"] +animation = &"basic/stand" [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_c1y3b"] -animation = &"hobo_zombie/run" +animation = &"basic/walk" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_g2uel"] +animation = &"hobo/Jump_walking" [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_vxhht"] advance_mode = 2 -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_y2ivb"] +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_n380g"] +xfade_time = 0.5 advance_mode = 2 -advance_expression = "get(\"isEating\") == true" +advance_expression = "get(\"isEating\")" -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7d3k4"] +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_nlwsb"] +xfade_time = 0.5 advance_mode = 2 -advance_expression = "get(\"isEating\") == true" +advance_expression = "get(\"isEating\") == false" -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_qg8rq"] +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8y6c0"] +xfade_time = 0.5 advance_mode = 2 -advance_expression = "get(\"canDestroyed\") == false" +advance_expression = "get(\"isEating\")" -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4248q"] +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_nc6p3"] +xfade_time = 0.5 advance_mode = 2 -advance_expression = "get(\"canDestroyed\") == true" +advance_expression = "get(\"isEating\") == false" -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_tu6af"] -advance_mode = 2 -advance_expression = "get(\"isEating\") == true" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_yalvk"] -advance_mode = 2 -advance_expression = "get(\"canDestroyed\") == true and get(\"isEating\") == false" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7jlle"] +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_y0p2l"] +break_loop_at_end = true switch_mode = 2 advance_mode = 2 -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_w1b1s"] +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_uoit3"] +xfade_time = 0.5 advance_mode = 2 -advance_expression = "get(\"canDestroyed\") == false and get(\"isEating\") == false" +advance_expression = "get(\"isEating\") == false and can_process()" -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_02fim"] +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_vn3j1"] +xfade_time = 0.5 advance_mode = 2 -advance_expression = "get(\"canDestroyed\") == true" +advance_expression = "get(\"isEating\") and can_process()" [sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_xg3p6"] -states/End/position = Vector2(1183, 100) -states/basic_zombie_eat/node = SubResource("AnimationNodeAnimation_h0rfo") -states/basic_zombie_eat/position = Vector2(711, 206) -states/basic_zombie_idle/node = SubResource("AnimationNodeAnimation_nog33") -states/basic_zombie_idle/position = Vector2(368, 100) -states/basic_zombie_walk/node = SubResource("AnimationNodeAnimation_g2uel") -states/basic_zombie_walk/position = Vector2(711, -21) -states/hobo_zombie_can_destroy/node = SubResource("AnimationNodeAnimation_02fim") -states/hobo_zombie_can_destroy/position = Vector2(368, 206) -states/hobo_zombie_run/node = SubResource("AnimationNodeAnimation_c1y3b") -states/hobo_zombie_run/position = Vector2(866, 89) -transitions = ["Start", "basic_zombie_idle", SubResource("AnimationNodeStateMachineTransition_vxhht"), "basic_zombie_idle", "basic_zombie_eat", SubResource("AnimationNodeStateMachineTransition_y2ivb"), "basic_zombie_walk", "basic_zombie_eat", SubResource("AnimationNodeStateMachineTransition_7d3k4"), "basic_zombie_idle", "basic_zombie_walk", SubResource("AnimationNodeStateMachineTransition_qg8rq"), "basic_zombie_idle", "hobo_zombie_run", SubResource("AnimationNodeStateMachineTransition_4248q"), "hobo_zombie_run", "basic_zombie_eat", SubResource("AnimationNodeStateMachineTransition_tu6af"), "basic_zombie_eat", "hobo_zombie_run", SubResource("AnimationNodeStateMachineTransition_yalvk"), "hobo_zombie_can_destroy", "basic_zombie_idle", SubResource("AnimationNodeStateMachineTransition_7jlle"), "basic_zombie_eat", "basic_zombie_walk", SubResource("AnimationNodeStateMachineTransition_w1b1s"), "basic_zombie_walk", "hobo_zombie_run", SubResource("AnimationNodeStateMachineTransition_02fim")] -graph_offset = Vector2(210, 91) +states/Death/node = SubResource("AnimationNodeAnimation_vn3j1") +states/Death/position = Vector2(745, 220) +states/Destroy/node = SubResource("AnimationNodeAnimation_02fim") +states/Destroy/position = Vector2(773, 67) +states/Eat/node = SubResource("AnimationNodeAnimation_yb81c") +states/Eat/position = Vector2(942, 145) +states/Eat_with_can/node = SubResource("AnimationNodeAnimation_h0rfo") +states/Eat_with_can/position = Vector2(583, 145) +states/End/position = Vector2(1185, 100) +states/Idle/node = SubResource("AnimationNodeAnimation_nog33") +states/Idle/position = Vector2(368, 100) +states/Run/node = SubResource("AnimationNodeAnimation_c1y3b") +states/Run/position = Vector2(942, -3) +states/Walk/node = SubResource("AnimationNodeAnimation_g2uel") +states/Walk/position = Vector2(583, -3) +transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_vxhht"), "Walk", "Eat_with_can", SubResource("AnimationNodeStateMachineTransition_n380g"), "Eat_with_can", "Walk", SubResource("AnimationNodeStateMachineTransition_nlwsb"), "Run", "Eat", SubResource("AnimationNodeStateMachineTransition_8y6c0"), "Eat", "Run", SubResource("AnimationNodeStateMachineTransition_nc6p3"), "Destroy", "Run", SubResource("AnimationNodeStateMachineTransition_y0p2l"), "Idle", "Walk", SubResource("AnimationNodeStateMachineTransition_uoit3"), "Idle", "Eat_with_can", SubResource("AnimationNodeStateMachineTransition_vn3j1")] +graph_offset = Vector2(274, -18) [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_txjqc"] -graph_offset = Vector2(-447, 53) nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_2q05d") nodes/TimeScale/position = Vector2(60, 120) nodes/Tree/node = SubResource("AnimationNodeStateMachine_xg3p6") @@ -234,64 +750,226 @@ node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] [sub_resource type="Resource" id="Resource_4248q"] resource_local_to_scene = true script = ExtResource("4_c1y3b") -flat_value = 0.2 +flat_value = 0.4 percentage_value = 0.0 mult_value = 1.0 [node name="Hobo" node_paths=PackedStringArray("_armor") instance=ExtResource("1_fnu7s")] _armor = NodePath("CanArmor") MaxHP = 130.0 -_effectImmunities = Array[ExtResource("2_txjqc")]([ExtResource("3_b583s")]) +_effectImmunities = Array[ExtResource("2_vn3j1")]([ExtResource("3_b583s")]) [node name="CanvasGroup" parent="." index="0"] material = SubResource("ShaderMaterial_w8pya") -[node name="Can" type="RigidBody2D" parent="CanvasGroup" index="1" node_paths=PackedStringArray("data")] +[node name="Butt" parent="CanvasGroup/basic_zombie_walk/Zombie" index="0"] +scale = Vector2(0.999902, 0.999902) + +[node name="Butt" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="0"] +texture = SubResource("AtlasTexture_txjqc") + +[node name="RightUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="1"] +scale = Vector2(0.99983, 0.99983) + +[node name="Right_Upper_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="0"] +texture = SubResource("AtlasTexture_b583s") + +[node name="RightLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg" index="1"] +scale = Vector2(0.999829, 0.999829) + +[node name="RightFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="0"] +scale = Vector2(0.999827, 0.999827) + +[node name="Right_Foot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot" index="0"] +texture = SubResource("AtlasTexture_uoit3") + +[node name="Right_Lower_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg" index="1"] +texture = SubResource("AtlasTexture_vn3j1") + +[node name="LeftUpperLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="2"] +scale = Vector2(0.999827, 0.999827) + +[node name="Left_Upper_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="0"] +texture = SubResource("AtlasTexture_yb81c") + +[node name="LeftLowerLeg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg" index="1"] +scale = Vector2(0.999831, 0.999831) + +[node name="Left_Lower_Leg" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="0"] +texture = SubResource("AtlasTexture_nlwsb") + +[node name="LeftFoot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg" index="1"] +scale = Vector2(0.999817, 0.999817) + +[node name="Left_Foot" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot" index="0"] +texture = SubResource("AtlasTexture_8y6c0") + +[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt" index="3"] +scale = Vector2(0.999826, 0.999826) + +[node name="RightUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="0"] +scale = Vector2(0.999828, 0.999828) + +[node name="Right_Upper_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="0"] +texture = SubResource("AtlasTexture_nc6p3") + +[node name="RightLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm" index="1"] +scale = Vector2(0.999818, 0.999818) + +[node name="RightHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="0"] +scale = Vector2(0.999828, 0.999828) + +[node name="Right_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand" index="0"] +texture = SubResource("AtlasTexture_y0p2l") + +[node name="Right_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm" index="1"] +texture = SubResource("AtlasTexture_op0h6") + +[node name="Body" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="1"] +texture = SubResource("AtlasTexture_0s5wm") + +[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="2"] +rotation = 0.00923548 +scale = Vector2(1e-05, 1e-05) + +[node name="Tie" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Tie" index="0"] +visible = false + +[node name="Can" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="3" node_paths=PackedStringArray("data")] +scale = Vector2(1.00027, 1.00027) collision_layer = 128 collision_mask = 64 freeze = true script = ExtResource("3_tu6af") -data = NodePath("../..") +data = NodePath("../../../../../..") maxAngle = 45.0 minTorque = -45.0 maxTorque = 45.0 Impulse = 100.0 -[node name="Sprite2D" type="Sprite2D" parent="CanvasGroup/Can" index="0" node_paths=PackedStringArray("armor")] -position = Vector2(-4, -40) -texture = SubResource("AtlasTexture_w8pya") +[node name="Sprite2D" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can" index="0" node_paths=PackedStringArray("armor")] +position = Vector2(-5.9999, -4.5002) +texture = ExtResource("6_i6nje") script = ExtResource("5_ndwp0") -armor = NodePath("../../../CanArmor") +armor = NodePath("../../../../../../../CanArmor") degradationStages = Array[Texture2D]([ExtResource("6_i6nje"), ExtResource("7_txjqc"), ExtResource("8_b583s")]) thresholdPercentage = Array[float]([1.0, 0.667, 0.333]) -[node name="Sprite2D2" type="Sprite2D" parent="CanvasGroup/Can" index="1"] +[node name="Sprite2D2" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can" index="1"] z_index = -1 -position = Vector2(-6, -63) +position = Vector2(-7.4999, -27.5002) texture = SubResource("AtlasTexture_5selg") -[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/Can" index="2"] -position = Vector2(-3, -40) +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can" index="2"] +position = Vector2(-4.9999, -5.0002) shape = SubResource("CapsuleShape2D_4248q") -[node name="Eatbox" parent="." index="2"] -_damage = SubResource("Resource_qg8rq") +[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="4"] +scale = Vector2(0.999827, 0.999827) -[node name="AnimationPlayer" parent="." index="3"] +[node name="Head" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" index="0"] +texture = SubResource("AtlasTexture_pjhfy") + +[node name="Right_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="0"] +position = Vector2(-16, -8) +scale = Vector2(1, 1) + +[node name="Left_Eye" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="1"] +position = Vector2(-4, -9) +scale = Vector2(1, 1) + +[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="2"] +position = Vector2(-3, 3) +rotation = -0.0150209 +scale = Vector2(0.999828, 0.999828) +texture = SubResource("AtlasTexture_7cvmi") +offset = Vector2(-14, -2) + +[node name="TrashcanLid" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head" index="3" node_paths=PackedStringArray("data")] +position = Vector2(-3, 3) +scale = Vector2(0.999826, 0.999826) +collision_layer = 128 +collision_mask = 64 +freeze = true +script = ExtResource("3_tu6af") +data = NodePath("../../../../../../../../..") + +[node name="Trashcan_lid" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid" index="0"] +z_index = -1 +position = Vector2(2.99822, -20.0166) +scale = Vector2(1, 1) +texture = SubResource("AtlasTexture_n380g") +offset = Vector2(-0.5, -0.5) +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid" index="1"] +position = Vector2(2.99791, -20.018) +shape = SubResource("CircleShape2D_vn3j1") + +[node name="Observer" type="Node" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid" index="2" node_paths=PackedStringArray("_observedArmor")] +script = ExtResource("12_vn3j1") +_threshold = 0.333 +_observedArmor = NodePath("../../../../../../../../../../CanArmor") + +[node name="Jaw" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="1"] +scale = Vector2(0.999828, 0.999828) + +[node name="TrashcanLid" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" index="4"] +position = Vector2(-0.0022974, -17.0131) +scale = Vector2(0.999828, 0.999828) +rest = Transform2D(1, 0, 0, 1, -0.0022974, -17.0131) +auto_calculate_length_and_angle = false +length = 12.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false + +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/TrashcanLid" index="0"] +remote_path = NodePath("../../HeadParticle/Head/TrashcanLid/Trashcan_lid") + +[node name="LeftUpperArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body" index="5"] +scale = Vector2(0.999826, 0.999826) + +[node name="Left_Upper_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="0"] +texture = SubResource("AtlasTexture_tebih") + +[node name="Left_Lower_Arm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" index="0"] +rotation = 0.00833116 +scale = Vector2(0.999997, 0.999997) +texture = SubResource("AtlasTexture_auxav") + +[node name="Left_Hand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm" index="0"] +position = Vector2(-0.99983, 12.9978) +rotation = -9.31647e-10 +scale = Vector2(0.999652, 0.999652) +texture = SubResource("AtlasTexture_dntsa") + +[node name="LeftLowerArm" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" index="2"] +scale = Vector2(0.999827, 0.999827) + +[node name="LeftHand" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm" index="0"] +scale = Vector2(0.999822, 0.999822) + +[node name="AnimationPlayer" parent="CanvasGroup/basic_zombie_walk" index="1"] libraries = { -&"": SubResource("AnimationLibrary_sq25x"), -&"basic_zombie": ExtResource("4_02fim"), -&"hobo_zombie": SubResource("AnimationLibrary_5selg") +&"": SubResource("AnimationLibrary_x5uj2"), +&"basic": ExtResource("7_vn3j1"), +&"hobo": ExtResource("8_yb81c") } -autoplay = "baisc_zombie/walk" -speed_scale = 3.0 -[node name="AnimationTree" parent="." index="4"] +[node name="Eatbox" parent="." index="2"] +_damage = SubResource("Resource_n380g") + +[node name="AnimationTree" parent="." index="3"] tree_root = SubResource("AnimationNodeBlendTree_txjqc") advance_expression_base_node = NodePath("../Behaviour") -[node name="Mover" parent="." index="5"] +[node name="Mover" parent="." index="4"] _speed = SubResource("Resource_4248q") +_speedControlMult = 0.0 + +[node name="HitPlayer" parent="." index="6"] +playlist = Array[AudioStream]([ExtResource("8_4248q"), ExtResource("9_tu6af")]) +channels = Array[String](["metal_hit", "hit"]) [node name="CanArmor" type="Node" parent="." index="7"] script = ExtResource("4_w8pya") @@ -303,16 +981,14 @@ script = ExtResource("4_5selg") _eatBox = NodePath("../Eatbox") _animationTree = NodePath("../AnimationTree") -[node name="HitPlayer" parent="." index="9"] -playlist = Array[AudioStream]([ExtResource("8_4248q"), ExtResource("9_tu6af")]) -channels = Array[String](["metal_hit", "hit"]) - [node name="RipPlayer" type="Node" parent="." index="11"] script = ExtResource("11_7jlle") audioStream = ExtResource("12_w1b1s") channel = "anger" metadata/_custom_type_script = "uid://c36bj8u7jghc7" +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid" method="FallOff"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head/TrashcanLid/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/TrashcanLid/RemoteTransform2D" method="queue_free"] [connection signal="ArmorLost" from="CanArmor" to="HitPlayer" method="Next"] -[connection signal="ArmorLost" from="CanArmor" to="CanvasGroup/Can" method="FallOff"] +[connection signal="ArmorLost" from="CanArmor" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Can" method="FallOff"] [connection signal="ArmorLost" from="CanArmor" to="Behaviour" method="Trashed"] diff --git a/scenes/entities/Zombies/zombie.tscn b/scenes/entities/Zombies/zombie.tscn index 60dabed..c34c110 100644 --- a/scenes/entities/Zombies/zombie.tscn +++ b/scenes/entities/Zombies/zombie.tscn @@ -1,19 +1,21 @@ -[gd_scene load_steps=32 format=3 uid="uid://co11v3w8hbwgf"] +[gd_scene load_steps=61 format=3 uid="uid://co11v3w8hbwgf"] -[ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/components/zombies/RuntimeZombieData.cs" id="1_qq3f1"] -[ext_resource type="Texture2D" uid="uid://bwdqbrnn7ygtr" path="res://assets/sprites/atlases/zombies/Зондби.png" id="2_4pdxh"] +[ext_resource type="Script" uid="uid://dildme6epx8l4" path="res://scripts/zombies/RuntimeZombieData.cs" id="1_qq3f1"] [ext_resource type="AudioStream" uid="uid://dt13iugnnx4op" path="res://assets/audio/sfx/yuck_generic.tres" id="2_hh4qh"] [ext_resource type="Shader" uid="uid://d0eo5uuj222c4" path="res://assets/shaders/CG_color_blender.gdshader" id="2_srwwe"] -[ext_resource type="Script" uid="uid://dqyony6jxt2p0" path="res://scripts/components/zombies/EatBox.cs" id="3_2aulo"] +[ext_resource type="Script" uid="uid://dqyony6jxt2p0" path="res://scripts/zombies/EatBox.cs" id="3_2aulo"] [ext_resource type="AudioStream" uid="uid://bjotp63arocci" path="res://assets/audio/sfx/frozen.mp3" id="3_ltj46"] -[ext_resource type="Script" uid="uid://c5vfccegyy01t" path="res://scripts/components/FlashComponent.cs" id="3_rao3m"] -[ext_resource type="Script" uid="uid://7hdj2k14lfe4" path="res://scripts/components/zombies/ZombieMover.cs" id="4_u5syx"] -[ext_resource type="AnimationLibrary" uid="uid://cuh2kyb21hmkm" path="res://resources/animations/zombies/basic_zombie.res" id="6_ckb7n"] +[ext_resource type="Script" uid="uid://c5vfccegyy01t" path="res://scripts/FlashComponent.cs" id="3_rao3m"] +[ext_resource type="Script" uid="uid://7hdj2k14lfe4" path="res://scripts/zombies/ZombieMover.cs" id="4_u5syx"] +[ext_resource type="Texture2D" uid="uid://dacgbwohpmeed" path="res://assets/sprites/zombies/basic.png" id="6_xnora"] [ext_resource type="Script" uid="uid://c3cfnrmnnuqms" path="res://addons/floatmodifiers/FloatModifiers.cs" id="7_b3p4o"] +[ext_resource type="Script" uid="uid://dt5uj25u0g6y3" path="res://scripts/particles/FallParticle.cs" id="7_dn8ha"] [ext_resource type="AnimationNodeStateMachine" uid="uid://dj0blope85bg7" path="res://resources/animations/zombies/basic_zombie_tree.tres" id="8_ckb7n"] +[ext_resource type="Script" uid="uid://dau0tfmlfiqmo" path="res://scripts/EntityHPObserver.cs" id="8_mc1kl"] +[ext_resource type="Texture2D" uid="uid://dri70dxyks7xh" path="res://assets/sprites/zombies/hobo.png" id="9_b51fx"] +[ext_resource type="AnimationLibrary" uid="uid://ceb3khu7rwgy8" path="res://resources/animations/zombies/basic.res" id="9_y6afe"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="10_ruqsf"] -[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/components/TimeScalableAnimationTree.cs" id="11_ccrjo"] -[ext_resource type="AudioStream" uid="uid://dyid55nhflwyn" path="res://assets/audio/sfx/chomp_generic.tres" id="11_vjrlo"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="11_ccrjo"] [ext_resource type="AudioStream" uid="uid://bg76miyscfvhu" path="res://assets/audio/sfx/groan.tres" id="12_ad42i"] [ext_resource type="Script" uid="uid://cnn0ymuhypdff" path="res://scripts/audio/ChannelPlaylist.cs" id="12_he8da"] [ext_resource type="AudioStream" uid="uid://w0qfwds4o3ti" path="res://assets/audio/sfx/hit_generic.tres" id="12_vjrlo"] @@ -21,6 +23,7 @@ [ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://resources/effects/GarlicEffect.tres" id="18_2q05d"] [ext_resource type="Resource" uid="uid://7uj0oe656jfx" path="res://resources/effects/SnowSlow.tres" id="19_ccrjo"] [ext_resource type="Script" uid="uid://c1x4n4nqyq72f" path="res://scripts/audio/ChannelSettings.cs" id="21_xnora"] +[ext_resource type="Script" uid="uid://dk32ln8c2574d" path="res://scripts/ZombieKillHandler.cs" id="23_mc1kl"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_63ls2"] resource_local_to_scene = true @@ -28,38 +31,739 @@ shader = ExtResource("2_srwwe") shader_parameter/blend_color = Color(0.73, 0.73, 0.73, 1) shader_parameter/amount = 0.0 -[sub_resource type="RectangleShape2D" id="RectangleShape2D_hxyad"] -size = Vector2(2, 48) +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_wn68q"] +tip_nodepath = NodePath("Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 17 +joint_data/0/bone2d_node = NodePath("Butt/Body/LeftUpperArm/LeftLowerArm") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = true +joint_data/0/constraint_angle_min = 0.0 +joint_data/0/constraint_angle_max = 90.0 +joint_data/0/constraint_angle_invert = false +joint_data/0/constraint_in_localspace = true +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 16 +joint_data/1/bone2d_node = NodePath("Butt/Body/LeftUpperArm") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = false +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false -[sub_resource type="Resource" id="Resource_ruqsf"] -resource_local_to_scene = true -script = ExtResource("7_b3p4o") -flat_value = 10.0 -percentage_value = 0.0 -mult_value = 1.0 +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_x5uj2"] +tip_nodepath = NodePath("Butt/Body/RightUpperArm/RightLowerArm/RightHand") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 8 +joint_data/0/bone2d_node = NodePath("Butt/Body/RightUpperArm") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = false +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 9 +joint_data/1/bone2d_node = NodePath("Butt/Body/RightUpperArm/RightLowerArm") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = true +joint_data/1/constraint_angle_min = 0.0 +joint_data/1/constraint_angle_max = 90.0 +joint_data/1/constraint_angle_invert = false +joint_data/1/constraint_in_localspace = true +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false -[sub_resource type="RectangleShape2D" id="RectangleShape2D_r4ug6"] -size = Vector2(16, 48) +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_vcc72"] +tip_nodepath = NodePath("Butt/RightUpperLeg/RightLowerLeg/RightFoot") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 1 +joint_data/0/bone2d_node = NodePath("Butt/RightUpperLeg") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = true +joint_data/0/constraint_angle_min = -90.0 +joint_data/0/constraint_angle_max = 90.0 +joint_data/0/constraint_angle_invert = true +joint_data/0/constraint_in_localspace = true +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 2 +joint_data/1/bone2d_node = NodePath("Butt/RightUpperLeg/RightLowerLeg") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = true +joint_data/1/constraint_angle_min = 0.0 +joint_data/1/constraint_angle_max = 160.0 +joint_data/1/constraint_angle_invert = false +joint_data/1/constraint_in_localspace = true +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false -[sub_resource type="Animation" id="Animation_qv5y7"] -length = 0.001 +[sub_resource type="SkeletonModification2DCCDIK" id="SkeletonModification2DCCDIK_kto0i"] +tip_nodepath = NodePath("Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot") +ccdik_data_chain_length = 2 +joint_data/0/bone_index = 4 +joint_data/0/bone2d_node = NodePath("Butt/LeftUpperLeg") +joint_data/0/rotate_from_joint = false +joint_data/0/enable_constraint = true +joint_data/0/constraint_angle_min = -90.0 +joint_data/0/constraint_angle_max = 90.0 +joint_data/0/constraint_angle_invert = true +joint_data/0/constraint_in_localspace = true +joint_data/0/editor_draw_gizmo = true +joint_data/1/bone_index = 5 +joint_data/1/bone2d_node = NodePath("Butt/LeftUpperLeg/LeftLowerLeg") +joint_data/1/rotate_from_joint = false +joint_data/1/enable_constraint = true +joint_data/1/constraint_angle_min = -90.0 +joint_data/1/constraint_angle_max = 0.0 +joint_data/1/constraint_angle_invert = true +joint_data/1/constraint_in_localspace = true +joint_data/1/editor_draw_gizmo = true +editor/draw_gizmo = false + +[sub_resource type="SkeletonModificationStack2D" id="SkeletonModificationStack2D_wn68q"] +modification_count = 4 +modifications/0 = SubResource("SkeletonModification2DCCDIK_wn68q") +modifications/1 = SubResource("SkeletonModification2DCCDIK_x5uj2") +modifications/2 = SubResource("SkeletonModification2DCCDIK_vcc72") +modifications/3 = SubResource("SkeletonModification2DCCDIK_kto0i") + +[sub_resource type="AtlasTexture" id="AtlasTexture_jvn5w"] +atlas = ExtResource("6_xnora") +region = Rect2(15, 30, 20, 8) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vmdbp"] +atlas = ExtResource("6_xnora") +region = Rect2(64, 44, 10, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x1oyw"] +atlas = ExtResource("6_xnora") +region = Rect2(93, 50, 17, 9) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vjx3c"] +atlas = ExtResource("6_xnora") +region = Rect2(79, 44, 10, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_f31xd"] +atlas = ExtResource("6_xnora") +region = Rect2(47, 33, 8, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_od8jf"] +atlas = ExtResource("6_xnora") +region = Rect2(59, 33, 7, 10) + +[sub_resource type="AtlasTexture" id="AtlasTexture_p4711"] +atlas = ExtResource("6_xnora") +region = Rect2(71, 30, 19, 13) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1bk2b"] +atlas = ExtResource("6_xnora") +region = Rect2(12, 43, 6, 18) + +[sub_resource type="AtlasTexture" id="AtlasTexture_y06yv"] +atlas = ExtResource("6_xnora") +region = Rect2(36, 50, 9, 11) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lu8go"] +atlas = ExtResource("6_xnora") +region = Rect2(22, 45, 8, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_cdq7v"] +atlas = ExtResource("6_xnora") +region = Rect2(93, 8, 29, 39) + +[sub_resource type="AtlasTexture" id="AtlasTexture_e7wc3"] +atlas = ExtResource("6_xnora") +region = Rect2(72, 2, 13, 26) + +[sub_resource type="AtlasTexture" id="AtlasTexture_wn68q"] +atlas = ExtResource("6_xnora") +region = Rect2(36, 0, 32, 29) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vcc72"] +atlas = ExtResource("6_xnora") +region = Rect2(93, 3, 2, 3) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kto0i"] +atlas = ExtResource("6_xnora") +region = Rect2(105, 2, 3, 4) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x5uj2"] +atlas = ExtResource("6_xnora") +region = Rect2(15, 17, 17, 6) + +[sub_resource type="CircleShape2D" id="CircleShape2D_dn8ha"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_djocr"] +atlas = ExtResource("6_xnora") +region = Rect2(2, 7, 6, 19) + +[sub_resource type="AtlasTexture" id="AtlasTexture_auqeq"] +atlas = ExtResource("6_xnora") +region = Rect2(0, 32, 9, 15) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vlvtp"] +atlas = ExtResource("9_b51fx") +region = Rect2(55, 0, 9, 10) + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ccrjo"] +radius = 3.00026 +height = 16.007 + +[sub_resource type="Animation" id="Animation_vn3j1"] +resource_name = "RESET" tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("Mover:_speedControlMult") +tracks/0/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm:position") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 0, +"values": [Vector2(-2, 14)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm:rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, "values": [0.0] } - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_sq25x"] -_data = { -&"RESET": SubResource("Animation_qv5y7") +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand:position") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, 13)] } +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand:rotation") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/4/type = "value" +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/path = NodePath("Zombie/Butt/Body/LeftUpperArm:position") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, -20)] +} +tracks/5/type = "value" +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/path = NodePath("Zombie/Butt/Body/LeftUpperArm:rotation") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/6/type = "value" +tracks/6/imported = false +tracks/6/enabled = true +tracks/6/path = NodePath("Zombie/Butt/Body/Head/LeftEye:position") +tracks/6/interp = 1 +tracks/6/loop_wrap = true +tracks/6/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-4, -9)] +} +tracks/7/type = "value" +tracks/7/imported = false +tracks/7/enabled = true +tracks/7/path = NodePath("Zombie/Butt/Body/Head/LeftEye:rotation") +tracks/7/interp = 1 +tracks/7/loop_wrap = true +tracks/7/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/8/type = "value" +tracks/8/imported = false +tracks/8/enabled = true +tracks/8/path = NodePath("Zombie/Butt/Body/Head/RightEye:position") +tracks/8/interp = 1 +tracks/8/loop_wrap = true +tracks/8/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-16, -8)] +} +tracks/9/type = "value" +tracks/9/imported = false +tracks/9/enabled = true +tracks/9/path = NodePath("Zombie/Butt/Body/Head/RightEye:rotation") +tracks/9/interp = 1 +tracks/9/loop_wrap = true +tracks/9/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/10/type = "value" +tracks/10/imported = false +tracks/10/enabled = true +tracks/10/path = NodePath("Zombie/Butt/Body/Head/Jaw:position") +tracks/10/interp = 1 +tracks/10/loop_wrap = true +tracks/10/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-3, 3)] +} +tracks/11/type = "value" +tracks/11/imported = false +tracks/11/enabled = true +tracks/11/path = NodePath("Zombie/Butt/Body/Head/Jaw:rotation") +tracks/11/interp = 1 +tracks/11/loop_wrap = true +tracks/11/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/12/type = "value" +tracks/12/imported = false +tracks/12/enabled = true +tracks/12/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand:position") +tracks/12/interp = 1 +tracks/12/loop_wrap = true +tracks/12/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, 13)] +} +tracks/13/type = "value" +tracks/13/imported = false +tracks/13/enabled = true +tracks/13/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand:rotation") +tracks/13/interp = 1 +tracks/13/loop_wrap = true +tracks/13/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/14/type = "value" +tracks/14/imported = false +tracks/14/enabled = true +tracks/14/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm:position") +tracks/14/interp = 1 +tracks/14/loop_wrap = true +tracks/14/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 15)] +} +tracks/15/type = "value" +tracks/15/imported = false +tracks/15/enabled = true +tracks/15/path = NodePath("Zombie/Butt/Body/RightUpperArm/RightLowerArm:rotation") +tracks/15/interp = 1 +tracks/15/loop_wrap = true +tracks/15/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/16/type = "value" +tracks/16/imported = false +tracks/16/enabled = true +tracks/16/path = NodePath("Zombie/Butt/Body/RightUpperArm:position") +tracks/16/interp = 1 +tracks/16/loop_wrap = true +tracks/16/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-14, -23)] +} +tracks/17/type = "value" +tracks/17/imported = false +tracks/17/enabled = true +tracks/17/path = NodePath("Zombie/Butt/Body/RightUpperArm:rotation") +tracks/17/interp = 1 +tracks/17/loop_wrap = true +tracks/17/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/18/type = "value" +tracks/18/imported = false +tracks/18/enabled = true +tracks/18/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot:position") +tracks/18/interp = 1 +tracks/18/loop_wrap = true +tracks/18/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(6, 10)] +} +tracks/19/type = "value" +tracks/19/imported = false +tracks/19/enabled = true +tracks/19/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot:rotation") +tracks/19/interp = 1 +tracks/19/loop_wrap = true +tracks/19/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/20/type = "value" +tracks/20/imported = false +tracks/20/enabled = true +tracks/20/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg:position") +tracks/20/interp = 1 +tracks/20/loop_wrap = true +tracks/20/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-1, 13)] +} +tracks/21/type = "value" +tracks/21/imported = false +tracks/21/enabled = true +tracks/21/path = NodePath("Zombie/Butt/LeftUpperLeg/LeftLowerLeg:rotation") +tracks/21/interp = 1 +tracks/21/loop_wrap = true +tracks/21/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/22/type = "value" +tracks/22/imported = false +tracks/22/enabled = true +tracks/22/path = NodePath("Zombie/Butt/LeftUpperLeg:position") +tracks/22/interp = 1 +tracks/22/loop_wrap = true +tracks/22/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(6, 4)] +} +tracks/23/type = "value" +tracks/23/imported = false +tracks/23/enabled = true +tracks/23/path = NodePath("Zombie/Butt/LeftUpperLeg:rotation") +tracks/23/interp = 1 +tracks/23/loop_wrap = true +tracks/23/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/24/type = "value" +tracks/24/imported = false +tracks/24/enabled = true +tracks/24/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot:position") +tracks/24/interp = 1 +tracks/24/loop_wrap = true +tracks/24/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 14)] +} +tracks/25/type = "value" +tracks/25/imported = false +tracks/25/enabled = true +tracks/25/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot:rotation") +tracks/25/interp = 1 +tracks/25/loop_wrap = true +tracks/25/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/26/type = "value" +tracks/26/imported = false +tracks/26/enabled = true +tracks/26/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg:position") +tracks/26/interp = 1 +tracks/26/loop_wrap = true +tracks/26/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-2, 12)] +} +tracks/27/type = "value" +tracks/27/imported = false +tracks/27/enabled = true +tracks/27/path = NodePath("Zombie/Butt/RightUpperLeg/RightLowerLeg:rotation") +tracks/27/interp = 1 +tracks/27/loop_wrap = true +tracks/27/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/28/type = "value" +tracks/28/imported = false +tracks/28/enabled = true +tracks/28/path = NodePath("Zombie/Butt/RightUpperLeg:position") +tracks/28/interp = 1 +tracks/28/loop_wrap = true +tracks/28/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-6, 3)] +} +tracks/29/type = "value" +tracks/29/imported = false +tracks/29/enabled = true +tracks/29/path = NodePath("Zombie/Butt/RightUpperLeg:rotation") +tracks/29/interp = 1 +tracks/29/loop_wrap = true +tracks/29/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/30/type = "value" +tracks/30/imported = false +tracks/30/enabled = true +tracks/30/path = NodePath("Zombie/Butt:position") +tracks/30/interp = 1 +tracks/30/loop_wrap = true +tracks/30/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(5, -35)] +} +tracks/31/type = "value" +tracks/31/imported = false +tracks/31/enabled = true +tracks/31/path = NodePath("Zombie/Butt:rotation") +tracks/31/interp = 1 +tracks/31/loop_wrap = true +tracks/31/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/32/type = "value" +tracks/32/imported = false +tracks/32/enabled = true +tracks/32/path = NodePath("Zombie/Butt/Body:position") +tracks/32/interp = 1 +tracks/32/loop_wrap = true +tracks/32/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1, -2)] +} +tracks/33/type = "value" +tracks/33/imported = false +tracks/33/enabled = true +tracks/33/path = NodePath("Zombie/Butt/Body:rotation") +tracks/33/interp = 1 +tracks/33/loop_wrap = true +tracks/33/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/34/type = "value" +tracks/34/imported = false +tracks/34/enabled = true +tracks/34/path = NodePath("Zombie:position") +tracks/34/interp = 1 +tracks/34/loop_wrap = true +tracks/34/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(0, 0)] +} +tracks/35/type = "value" +tracks/35/imported = false +tracks/35/enabled = true +tracks/35/path = NodePath("Zombie:rotation") +tracks/35/interp = 1 +tracks/35/loop_wrap = true +tracks/35/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/36/type = "value" +tracks/36/imported = false +tracks/36/enabled = true +tracks/36/path = NodePath("Zombie/Butt/Body/Head:position") +tracks/36/interp = 1 +tracks/36/loop_wrap = true +tracks/36/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-10, -25)] +} +tracks/37/type = "value" +tracks/37/imported = false +tracks/37/enabled = true +tracks/37/path = NodePath("Zombie/Butt/Body/Head:rotation") +tracks/37/interp = 1 +tracks/37/loop_wrap = true +tracks/37/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/38/type = "value" +tracks/38/imported = false +tracks/38/enabled = true +tracks/38/path = NodePath("Zombie/Butt/Body/Head:visible") +tracks/38/interp = 1 +tracks/38/loop_wrap = true +tracks/38/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [true] +} +tracks/39/type = "value" +tracks/39/imported = false +tracks/39/enabled = true +tracks/39/path = NodePath("Zombie/Butt/Body/Head/TrashcanLid:position") +tracks/39/interp = 1 +tracks/39/loop_wrap = true +tracks/39/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-0.0022974, -17.0131)] +} +tracks/40/type = "value" +tracks/40/imported = false +tracks/40/enabled = true +tracks/40/path = NodePath("Zombie/Butt/Body/Head/TrashcanLid:rotation") +tracks/40/interp = 1 +tracks/40/loop_wrap = true +tracks/40/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/41/type = "value" +tracks/41/imported = false +tracks/41/enabled = true +tracks/41/path = NodePath("Zombie/Butt/Body/Head/TrashcanLid:visible") +tracks/41/interp = 1 +tracks/41/loop_wrap = true +tracks/41/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} +tracks/42/type = "value" +tracks/42/imported = false +tracks/42/enabled = true +tracks/42/path = NodePath("Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm/Left_Hand:texture") +tracks/42/interp = 1 +tracks/42/loop_wrap = true +tracks/42/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [SubResource("AtlasTexture_vlvtp")] +} +tracks/43/type = "value" +tracks/43/imported = false +tracks/43/enabled = true +tracks/43/path = NodePath("Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm/Left_Hand:offset") +tracks/43/interp = 1 +tracks/43/loop_wrap = true +tracks/43/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(-4, -1)] +} +tracks/44/type = "value" +tracks/44/imported = false +tracks/44/enabled = true +tracks/44/path = NodePath("Zombie/Butt/Body/Tie:scale") +tracks/44/interp = 1 +tracks/44/loop_wrap = true +tracks/44/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(1, 1)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_x5uj2"] +_data = { +&"RESET": SubResource("Animation_vn3j1") +} + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_hxyad"] +size = Vector2(9, 48) + +[sub_resource type="Resource" id="Resource_ruqsf"] +resource_local_to_scene = true +script = ExtResource("7_b3p4o") +flat_value = 5.0 +percentage_value = 0.0 +mult_value = 1.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_r4ug6"] +size = Vector2(16, 48) [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2q05d"] @@ -82,27 +786,363 @@ script = ExtResource("21_xnora") restartTreshold = -1.0 metadata/_custom_type_script = "uid://c1x4n4nqyq72f" -[node name="Zombie" type="Node2D"] +[node name="Zombie" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] y_sort_enabled = true script = ExtResource("1_qq3f1") -garlicSound = ExtResource("2_hh4qh") -freezeSound = ExtResource("3_ltj46") MaxHP = 70.0 +_player = NodePath("CanvasGroup/basic_zombie_walk/AnimationPlayer") +_tree = NodePath("AnimationTree") +metadata/_edit_vertical_guides_ = [-159.0] [node name="CanvasGroup" type="CanvasGroup" parent="."] material = SubResource("ShaderMaterial_63ls2") script = ExtResource("3_rao3m") -[node name="Sprite" type="Sprite2D" parent="CanvasGroup"] -position = Vector2(-4, -55) -texture = ExtResource("2_4pdxh") +[node name="basic_zombie_walk" type="Node2D" parent="CanvasGroup"] + +[node name="Zombie" type="Skeleton2D" parent="CanvasGroup/basic_zombie_walk"] +use_parent_material = true +modification_stack = SubResource("SkeletonModificationStack2D_wn68q") + +[node name="Butt" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie"] +use_parent_material = true +position = Vector2(5, -35) +scale = Vector2(0.999903, 0.999903) +rest = Transform2D(1, 0, 0, 1, 5, -35) +editor_settings/show_bone_gizmo = false + +[node name="Butt" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +use_parent_material = true +texture = SubResource("AtlasTexture_jvn5w") +centered = false +offset = Vector2(-10, -3) +metadata/_edit_lock_ = true + +[node name="RightUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +use_parent_material = true +position = Vector2(-6, 3) +scale = Vector2(0.999831, 0.999831) +rest = Transform2D(1, 0, 0, 1, -6, 3) +editor_settings/show_bone_gizmo = false + +[node name="Right_Upper_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg"] +texture = SubResource("AtlasTexture_vmdbp") +centered = false +offset = Vector2(-6, -2) +metadata/_edit_lock_ = true + +[node name="RightLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg"] +position = Vector2(-2, 12) +scale = Vector2(0.999832, 0.999832) +rest = Transform2D(1, 0, 0, 1, -2, 12) +editor_settings/show_bone_gizmo = false + +[node name="RightFoot" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg"] +position = Vector2(-2, 14) +scale = Vector2(0.999834, 0.999834) +rest = Transform2D(1, 0, 0, 1, -2, 14) +auto_calculate_length_and_angle = false +length = 12.0 +bone_angle = 0.0 +editor_settings/show_bone_gizmo = false + +[node name="Right_Foot" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg/RightFoot"] +texture = SubResource("AtlasTexture_x1oyw") +centered = false +offset = Vector2(-4, -3) +metadata/_edit_lock_ = true + +[node name="Right_Lower_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/RightUpperLeg/RightLowerLeg"] +position = Vector2(-18, -2) +texture = SubResource("AtlasTexture_vjx3c") +centered = false +offset = Vector2(12, 1) +metadata/_edit_lock_ = true + +[node name="LeftUpperLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +use_parent_material = true +position = Vector2(6, 4) +scale = Vector2(0.999832, 0.999832) +rest = Transform2D(1, 0, 0, 1, 6, 4) +editor_settings/show_bone_gizmo = false + +[node name="Left_Upper_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"] +texture = SubResource("AtlasTexture_f31xd") +centered = false +offset = Vector2(-4, -2) +metadata/_edit_lock_ = true + +[node name="LeftLowerLeg" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg"] +position = Vector2(-1, 13) +scale = Vector2(0.999833, 0.999833) +rest = Transform2D(1, 0, 0, 1, -1, 13) +editor_settings/show_bone_gizmo = false + +[node name="Left_Lower_Leg" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg"] +texture = SubResource("AtlasTexture_od8jf") +centered = false +offset = Vector2(-1, 0) +metadata/_edit_lock_ = true + +[node name="LeftFoot" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg"] +position = Vector2(6, 10) +scale = Vector2(0.999831, 0.999831) +rest = Transform2D(1, 0, 0, 1, 6, 10) +auto_calculate_length_and_angle = false +length = 12.0 +bone_angle = 160.0 +editor_settings/show_bone_gizmo = false + +[node name="Left_Foot" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/LeftUpperLeg/LeftLowerLeg/LeftFoot"] +texture = SubResource("AtlasTexture_p4711") +centered = false +offset = Vector2(-14, -3) +metadata/_edit_lock_ = true + +[node name="Body" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt"] +use_parent_material = true +position = Vector2(1, -2) +scale = Vector2(0.999833, 0.999833) +rest = Transform2D(1, 0, 0, 1, 1, -2) +editor_settings/show_bone_gizmo = false + +[node name="RightUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +z_index = -1 +use_parent_material = true +position = Vector2(-14, -23) +scale = Vector2(0.999828, 0.999828) +rest = Transform2D(1, 0, 0, 1, -14, -23) +editor_settings/show_bone_gizmo = false + +[node name="Right_Upper_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"] +texture = SubResource("AtlasTexture_1bk2b") +centered = false +offset = Vector2(-4, -2) +metadata/_edit_lock_ = true + +[node name="RightLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm"] +position = Vector2(-2, 15) +scale = Vector2(0.999828, 0.999828) +rest = Transform2D(1, 0, 0, 1, -2, 15) +editor_settings/show_bone_gizmo = false + +[node name="RightHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm"] +position = Vector2(-1, 13) +scale = Vector2(0.999828, 0.999828) +rest = Transform2D(1, 0, 0, 1, -1, 13) +auto_calculate_length_and_angle = false +length = 8.0 +bone_angle = 90.0 +editor_settings/show_bone_gizmo = false + +[node name="Right_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm/RightHand"] +texture = SubResource("AtlasTexture_y06yv") +centered = false +offset = Vector2(-4, -2) +metadata/_edit_lock_ = true + +[node name="Right_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/RightUpperArm/RightLowerArm"] +texture = SubResource("AtlasTexture_lu8go") +centered = false +offset = Vector2(-5, -1) +metadata/_edit_lock_ = true + +[node name="Body" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +rotation = 0.00163735 +texture = SubResource("AtlasTexture_cdq7v") +centered = false +offset = Vector2(-15, -27) +metadata/_edit_lock_ = true + +[node name="Tie" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +visible = false +position = Vector2(-9, -21) +rotation = 0.137587 +skew = -0.000422955 +rest = Transform2D(1, 0, 0, 1, -9, -21) +auto_calculate_length_and_angle = false +length = 24.0 +bone_angle = 100.0 +editor_settings/show_bone_gizmo = false + +[node name="Tie" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Tie"] +texture = SubResource("AtlasTexture_e7wc3") +centered = false +offset = Vector2(-10, -1) +metadata/_edit_lock_ = true + +[node name="Head" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +position = Vector2(-10, -25) +scale = Vector2(0.999826, 0.999826) +rest = Transform2D(1, 0, 0, 1, -10, -25) +editor_settings/show_bone_gizmo = false + +[node name="HeadParticle" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head" node_paths=PackedStringArray("data")] +collision_layer = 128 +collision_mask = 64 +freeze = true +script = ExtResource("7_dn8ha") +data = NodePath("../../../../../../..") +maxAngle = 45.0 +minTorque = -45.0 +maxTorque = 45.0 +Impulse = 100.0 + +[node name="Head" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle"] +texture = SubResource("AtlasTexture_wn68q") +centered = false +offset = Vector2(-20, -24) +metadata/_edit_lock_ = true + +[node name="Right_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] +position = Vector2(-16, -8) +texture = SubResource("AtlasTexture_vcc72") +centered = false +offset = Vector2(-2, -2) +metadata/_edit_lock_ = true + +[node name="Left_Eye" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] +position = Vector2(-4, -9) +texture = SubResource("AtlasTexture_kto0i") +centered = false +offset = Vector2(-2, -2) +metadata/_edit_lock_ = true + +[node name="Jaw" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Head"] +position = Vector2(-3.00169, 2.99714) +rotation = 0.0133523 +scale = Vector2(0.999828, 0.999828) +texture = SubResource("AtlasTexture_x5uj2") +centered = false +offset = Vector2(-12, -2) +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle"] +position = Vector2(-4.58496, -8.21035) +shape = SubResource("CircleShape2D_dn8ha") + +[node name="Observer" type="Node" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" node_paths=PackedStringArray("_observedEntity")] +script = ExtResource("8_mc1kl") +_threshold = 0.0 +_observedEntity = NodePath("../../../../../../../..") + +[node name="Jaw" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] +position = Vector2(-3, 3) +scale = Vector2(0.999828, 0.999828) +rest = Transform2D(1, 0, 0, 1, -3, 3) +auto_calculate_length_and_angle = false +length = 11.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false + +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Jaw"] +remote_path = NodePath("../../HeadParticle/Head/Jaw") + +[node name="RightEye" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] +position = Vector2(-16, -8) +rest = Transform2D(1, 0, 0, 1, -16, -8) +auto_calculate_length_and_angle = false +length = 2.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false + +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/RightEye"] +remote_path = NodePath("../../HeadParticle/Head/Right_Eye") + +[node name="LeftEye" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head"] +position = Vector2(-4, -9) +rest = Transform2D(1, 0, 0, 1, -4, -9) +auto_calculate_length_and_angle = false +length = 2.0 +bone_angle = 180.0 +editor_settings/show_bone_gizmo = false + +[node name="RemoteTransform2D" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/LeftEye"] +remote_path = NodePath("../../HeadParticle/Head/Left_Eye") + +[node name="LeftUpperArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body"] +position = Vector2(-1, -20) +scale = Vector2(0.999832, 0.999832) +rest = Transform2D(1, 0, 0, 1, -1, -20) +editor_settings/show_bone_gizmo = false + +[node name="Left_Upper_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"] +position = Vector2(-37, 10) +texture = SubResource("AtlasTexture_djocr") +centered = false +offset = Vector2(33, -12) +metadata/_edit_lock_ = true + +[node name="HandProjectile" type="RigidBody2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm" node_paths=PackedStringArray("data")] +position = Vector2(-2, 14) +collision_layer = 128 +collision_mask = 64 +freeze = true +script = ExtResource("7_dn8ha") +data = NodePath("../../../../../../..") +minTorque = -45.0 +maxTorque = 45.0 + +[node name="Left_Lower_Arm" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"] +rotation = 0.129362 +scale = Vector2(0.999996, 0.999996) +texture = SubResource("AtlasTexture_auqeq") +centered = false +offset = Vector2(-5, 0) +metadata/_edit_lock_ = true + +[node name="Left_Hand" type="Sprite2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Left_Lower_Arm"] +show_behind_parent = true +position = Vector2(-0.99983, 12.9978) +rotation = -0.0570923 +scale = Vector2(0.999654, 0.999654) +texture = SubResource("AtlasTexture_vlvtp") +centered = false +offset = Vector2(-4, -1) +metadata/_edit_lock_ = true + +[node name="CollisionShape2D" type="CollisionShape2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile"] +position = Vector2(-0.00104554, 13.0063) +shape = SubResource("CapsuleShape2D_ccrjo") + +[node name="Observer" type="Node" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" node_paths=PackedStringArray("_observedEntity")] +script = ExtResource("8_mc1kl") +_observedEntity = NodePath("../../../../../../../..") + +[node name="LeftLowerArm" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm"] +position = Vector2(-2, 14) +scale = Vector2(0.999826, 0.999826) +rest = Transform2D(1, 0, 0, 1, -2, 14) +editor_settings/show_bone_gizmo = false + +[node name="LeftHand" type="Bone2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"] +position = Vector2(-1, 13) +scale = Vector2(0.999824, 0.999824) +rest = Transform2D(1, 0, 0, 1, -1, 13) +auto_calculate_length_and_angle = false +length = 6.0 +bone_angle = 90.0 +editor_settings/show_bone_gizmo = false + +[node name="Left_Hand_Remote" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand"] +remote_path = NodePath("../../../HandProjectile/Left_Lower_Arm/Left_Hand") + +[node name="Left_Lower_Arm_Remote" type="RemoteTransform2D" parent="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm"] +scale = Vector2(1.00017, 1.00017) +remote_path = NodePath("../../HandProjectile/Left_Lower_Arm") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="CanvasGroup/basic_zombie_walk"] +libraries = { +&"": SubResource("AnimationLibrary_x5uj2"), +&"basic": ExtResource("9_y6afe") +} [node name="Hitbox" type="Area2D" parent="."] collision_layer = 8 collision_mask = 0 [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] -position = Vector2(2, -24) +position = Vector2(-1.5, -24) shape = SubResource("RectangleShape2D_hxyad") [node name="Eatbox" type="Area2D" parent="."] @@ -115,16 +1155,11 @@ _damage = SubResource("Resource_ruqsf") position = Vector2(-10, -24) shape = SubResource("RectangleShape2D_r4ug6") -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -&"": SubResource("AnimationLibrary_sq25x"), -&"basic_zombie": ExtResource("6_ckb7n") -} - [node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")] +root_node = NodePath("../CanvasGroup/basic_zombie_walk") tree_root = SubResource("AnimationNodeBlendTree_ccrjo") advance_expression_base_node = NodePath("../Eatbox") -anim_player = NodePath("../AnimationPlayer") +anim_player = NodePath("../CanvasGroup/basic_zombie_walk/AnimationPlayer") parameters/TimeScale/scale = 1.0 script = ExtResource("11_ccrjo") entity = NodePath("..") @@ -132,12 +1167,7 @@ entity = NodePath("..") [node name="Mover" type="Node" parent="."] script = ExtResource("4_u5syx") _speed = SubResource("Resource_ckb7n") - -[node name="ChompPlayer" type="Node" parent="."] -script = ExtResource("10_ruqsf") -audioStream = ExtResource("11_vjrlo") -channel = "chomp" -metadata/_custom_type_script = "uid://c36bj8u7jghc7" +_speedControlMult = 0.954599 [node name="HitPlayer" type="Node" parent="."] script = ExtResource("12_he8da") @@ -165,8 +1195,21 @@ effectsToMap = Array[Resource]([ExtResource("18_2q05d"), ExtResource("19_ccrjo") streamsToMapTo = Array[AudioStream]([ExtResource("2_hh4qh"), ExtResource("3_ltj46")]) streamSettings = Array[Object]([null, SubResource("Resource_dn8ha")]) +[node name="DeathHandler" type="Node" parent="." node_paths=PackedStringArray("_tree", "_collider")] +script = ExtResource("23_mc1kl") +_tree = NodePath("../AnimationTree") +_collider = NodePath("../Hitbox/CollisionShape2D") + +[connection signal="HasBeenKilled" from="." to="DeathHandler" method="OnKilled"] [connection signal="OnDamaged" from="." to="HitPlayer" method="Play"] [connection signal="OnHPChanged" from="." to="CanvasGroup" method="DamageFlash"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle" method="FallOff"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/Jaw/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/RightEye/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/HeadParticle/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/Head/LeftEye/RemoteTransform2D" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile" method="FallOff"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/LeftHand/Left_Hand_Remote" method="queue_free"] +[connection signal="ThresholdReached" from="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/HandProjectile/Observer" to="CanvasGroup/basic_zombie_walk/Zombie/Butt/Body/LeftUpperArm/LeftLowerArm/Left_Lower_Arm_Remote" method="queue_free"] [connection signal="area_entered" from="Eatbox" to="Eatbox" method="OnAreaEntered"] [connection signal="area_exited" from="Eatbox" to="Eatbox" method="OnAreaExited"] [connection signal="timeout" from="GroanPlayer/Timer" to="GroanPlayer" method="Play"] diff --git a/scenes/entities/plants/aloe.tscn b/scenes/entities/plants/aloe.tscn index 4aeb856..af96d9d 100644 --- a/scenes/entities/plants/aloe.tscn +++ b/scenes/entities/plants/aloe.tscn @@ -3,8 +3,8 @@ [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_n25yi"] [ext_resource type="Texture2D" uid="uid://b6tyoa5htapir" path="res://assets/sprites/atlases/plants/aloe.png" id="2_iup5p"] [ext_resource type="AnimationLibrary" uid="uid://bgutjc3ruq27s" path="res://resources/animations/plants/aloe.res" id="3_3sp3b"] -[ext_resource type="Script" uid="uid://cljytsmqac0w7" path="res://scripts/components/plants/behaviours/AloeBehaviour.cs" id="4_55asm"] -[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/components/TimeScalableTimer.cs" id="5_gfy6j"] +[ext_resource type="Script" uid="uid://cljytsmqac0w7" path="res://scripts/plants/behaviours/AloeBehaviour.cs" id="4_55asm"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="5_gfy6j"] [sub_resource type="Animation" id="Animation_vknky"] length = 0.001 diff --git a/scenes/entities/plants/cucumber.tscn b/scenes/entities/plants/cucumber.tscn new file mode 100644 index 0000000..bd8256d --- /dev/null +++ b/scenes/entities/plants/cucumber.tscn @@ -0,0 +1,171 @@ +[gd_scene load_steps=23 format=3 uid="uid://cjoyh54cpjla7"] + +[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_65f4u"] +[ext_resource type="Texture2D" uid="uid://bt76iudw2qgnv" path="res://assets/sprites/atlases/plants/cumbucer.png" id="2_ig0op"] +[ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/plants/Eyesight.cs" id="3_d45iq"] +[ext_resource type="Script" uid="uid://ceprqkraw3v6m" path="res://scripts/plants/Shooter.cs" id="4_sckvu"] +[ext_resource type="PackedScene" uid="uid://c1ig40gtdcb60" path="res://scenes/projectiles/cucumber_projectile.tscn" id="5_sckvu"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="6_xwpd6"] +[ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/plants/behaviours/PeashooterBehaviour.cs" id="7_q31qc"] + +[sub_resource type="Animation" id="Animation_n1xkd"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [10] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_gogcg"] +_data = { +&"RESET": SubResource("Animation_n1xkd") +} + +[sub_resource type="Animation" id="Animation_ig0op"] +length = 0.666675 +loop_mode = 2 +step = 0.0833333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.166667, 0.333333, 0.5, 0.666667), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"update": 1, +"values": [10, 11, 12, 13, 14] +} + +[sub_resource type="Animation" id="Animation_d45iq"] +length = 0.833342 +step = 0.0833333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.0833333, 0.166667, 0.25, 0.333333, 0.416667, 0.5, 0.583333, 0.666667, 0.75), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] +} +tracks/1/type = "method" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Shooter") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0.5), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"Shoot" +}] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_n1xkd"] +_data = { +&"attack": SubResource("Animation_d45iq"), +&"idle": SubResource("Animation_ig0op") +} + +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_ig0op"] + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_d45iq"] +animation = &"cucumber/attack" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_n1xkd"] +animation = &"cucumber/idle" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_gogcg"] +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ie74j"] +advance_mode = 2 +advance_condition = &"ready" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_sckvu"] +switch_mode = 2 +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_jbggv"] +states/cucumber_attack/node = SubResource("AnimationNodeAnimation_d45iq") +states/cucumber_attack/position = Vector2(628, 100) +states/cucumber_idle/node = SubResource("AnimationNodeAnimation_n1xkd") +states/cucumber_idle/position = Vector2(374, 100) +transitions = ["Start", "cucumber_idle", SubResource("AnimationNodeStateMachineTransition_gogcg"), "cucumber_idle", "cucumber_attack", SubResource("AnimationNodeStateMachineTransition_ie74j"), "cucumber_attack", "cucumber_idle", SubResource("AnimationNodeStateMachineTransition_sckvu")] +graph_offset = Vector2(137, -3) + +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_xwpd6"] +graph_offset = Vector2(-370, 72) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_ig0op") +nodes/TimeScale/position = Vector2(60, 140) +nodes/Tree/node = SubResource("AnimationNodeStateMachine_jbggv") +nodes/Tree/position = Vector2(-260, 140) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ig0op"] +radius = 13.0 +height = 48.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_n1xkd"] +size = Vector2(26, 600) + +[node name="Cucumber" instance=ExtResource("1_65f4u")] +MaxHP = 30.0 + +[node name="Sprite2D" parent="." index="0"] +texture = ExtResource("2_ig0op") +hframes = 10 +vframes = 2 +frame = 10 + +[node name="AnimationPlayer" parent="." index="1"] +libraries = { +&"": SubResource("AnimationLibrary_gogcg"), +&"cucumber": SubResource("AnimationLibrary_n1xkd") +} + +[node name="AnimationTree" parent="." index="2"] +tree_root = SubResource("AnimationNodeBlendTree_xwpd6") +parameters/TimeScale/scale = 1.0 +parameters/Tree/conditions/ready = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] +shape = SubResource("CapsuleShape2D_ig0op") + +[node name="Eysight" type="Area2D" parent="." index="4"] +collision_layer = 4 +collision_mask = 8 +script = ExtResource("3_d45iq") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight" index="0"] +shape = SubResource("RectangleShape2D_n1xkd") + +[node name="Shooter" type="Marker2D" parent="." index="5" node_paths=PackedStringArray("_timer")] +script = ExtResource("4_sckvu") +_projectile = ExtResource("5_sckvu") +_timer = NodePath("Timer") + +[node name="Timer" type="Timer" parent="Shooter" index="0" node_paths=PackedStringArray("entity")] +wait_time = 5.0 +one_shot = true +script = ExtResource("6_xwpd6") +entity = NodePath("../..") + +[node name="Behaviour" type="Node" parent="." index="6" node_paths=PackedStringArray("_shootTimer", "_sight")] +script = ExtResource("7_q31qc") +_shootTimer = NodePath("../Shooter/Timer") +_sight = NodePath("../Eysight") diff --git a/scenes/entities/plants/cucumber.tscn7041666357.tmp b/scenes/entities/plants/cucumber.tscn7041666357.tmp new file mode 100644 index 0000000..8b5d203 --- /dev/null +++ b/scenes/entities/plants/cucumber.tscn7041666357.tmp @@ -0,0 +1,171 @@ +[gd_scene load_steps=23 format=3 uid="uid://cjoyh54cpjla7"] + +[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_65f4u"] +[ext_resource type="Texture2D" uid="uid://bt76iudw2qgnv" path="res://assets/sprites/atlases/plants/cumbucer.png" id="2_ig0op"] +[ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/plants/Eyesight.cs" id="3_d45iq"] +[ext_resource type="Script" uid="uid://ceprqkraw3v6m" path="res://scripts/plants/Shooter.cs" id="4_sckvu"] +[ext_resource type="PackedScene" uid="uid://c1ig40gtdcb60" path="res://scenes/projectiles/cucumber_projectile.tscn" id="5_sckvu"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="6_xwpd6"] +[ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/plants/behaviours/PeashooterBehaviour.cs" id="7_q31qc"] + +[sub_resource type="Animation" id="Animation_n1xkd"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [10] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_gogcg"] +_data = { +&"RESET": SubResource("Animation_n1xkd") +} + +[sub_resource type="Animation" id="Animation_ig0op"] +length = 0.666675 +loop_mode = 2 +step = 0.0833333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.166667, 0.333333, 0.5, 0.666667), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1), +"update": 1, +"values": [10, 11, 12, 13, 14] +} + +[sub_resource type="Animation" id="Animation_d45iq"] +length = 0.833342 +step = 0.0833333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.0833333, 0.166667, 0.25, 0.333333, 0.416667, 0.5, 0.583333, 0.666667, 0.75), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] +} +tracks/1/type = "method" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Shooter") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0.5), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"Shoot" +}] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_n1xkd"] +_data = { +&"attack": SubResource("Animation_d45iq"), +&"idle": SubResource("Animation_ig0op") +} + +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_ig0op"] + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_d45iq"] +animation = &"cucumber/attack" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_n1xkd"] +animation = &"cucumber/idle" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_gogcg"] +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ie74j"] +advance_mode = 2 +advance_condition = &"ready" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_sckvu"] +switch_mode = 2 +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_jbggv"] +states/cucumber_attack/node = SubResource("AnimationNodeAnimation_d45iq") +states/cucumber_attack/position = Vector2(628, 100) +states/cucumber_idle/node = SubResource("AnimationNodeAnimation_n1xkd") +states/cucumber_idle/position = Vector2(374, 100) +transitions = ["Start", "cucumber_idle", SubResource("AnimationNodeStateMachineTransition_gogcg"), "cucumber_idle", "cucumber_attack", SubResource("AnimationNodeStateMachineTransition_ie74j"), "cucumber_attack", "cucumber_idle", SubResource("AnimationNodeStateMachineTransition_sckvu")] +graph_offset = Vector2(137, -3) + +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_xwpd6"] +graph_offset = Vector2(-370, 72) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_ig0op") +nodes/TimeScale/position = Vector2(60, 140) +nodes/Tree/node = SubResource("AnimationNodeStateMachine_jbggv") +nodes/Tree/position = Vector2(-260, 140) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ig0op"] +radius = 13.0 +height = 48.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_n1xkd"] +size = Vector2(26, 600) + +[node name="Cucumber" instance=ExtResource("1_65f4u")] +MaxHP = 30.0 + +[node name="Sprite2D" parent="." index="0"] +texture = ExtResource("2_ig0op") +hframes = 10 +vframes = 2 +frame = 10 + +[node name="AnimationPlayer" parent="." index="1"] +libraries = { +&"": SubResource("AnimationLibrary_gogcg"), +&"cucumber": SubResource("AnimationLibrary_n1xkd") +} + +[node name="AnimationTree" parent="." index="2"] +tree_root = SubResource("AnimationNodeBlendTree_xwpd6") +parameters/TimeScale/scale = 1.0 +parameters/Tree/conditions/ready = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] +shape = SubResource("CapsuleShape2D_ig0op") + +[node name="Eysight" type="Area2D" parent="." index="4"] +collision_layer = 4 +collision_mask = 8 +script = ExtResource("3_d45iq") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Eysight" index="0"] +shape = SubResource("RectangleShape2D_n1xkd") + +[node name="Shooter" type="Marker2D" parent="." index="5" node_paths=PackedStringArray("_timer")] +script = ExtResource("4_sckvu") +_projectile = ExtResource("5_sckvu") +_timer = NodePath("Timer") + +[node name="Timer" type="Timer" parent="Shooter" index="0" node_paths=PackedStringArray("entity")] +wait_time = 1.5 +one_shot = true +script = ExtResource("6_xwpd6") +entity = NodePath("../..") + +[node name="Behaviour" type="Node" parent="." index="6" node_paths=PackedStringArray("_shootTimer", "_sight")] +script = ExtResource("7_q31qc") +_shootTimer = NodePath("../Shooter/Timer") +_sight = NodePath("../Eysight") diff --git a/scenes/entities/plants/garlic.tscn b/scenes/entities/plants/garlic.tscn index 46bea8a..25ac97e 100644 --- a/scenes/entities/plants/garlic.tscn +++ b/scenes/entities/plants/garlic.tscn @@ -3,8 +3,8 @@ [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_5i0e6"] [ext_resource type="Texture2D" uid="uid://dff73m8ahamaa" path="res://assets/sprites/atlases/plants/garlic.png" id="2_w2jbi"] [ext_resource type="AnimationLibrary" uid="uid://cjl81f61gdlvi" path="res://resources/animations/plants/garlic.res" id="3_jkb3q"] -[ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/components/plants/behaviours/HpBasedBehaviour.cs" id="4_bv44h"] -[ext_resource type="Script" uid="uid://bmtukcq10m8wo" path="res://scripts/components/plants/ReturnEffect.cs" id="5_oob20"] +[ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/plants/behaviours/HpBasedBehaviour.cs" id="4_bv44h"] +[ext_resource type="Script" uid="uid://bmtukcq10m8wo" path="res://scripts/plants/ReturnEffect.cs" id="5_oob20"] [ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://resources/effects/GarlicEffect.tres" id="6_gho1l"] [sub_resource type="Animation" id="Animation_k0cex"] @@ -42,14 +42,14 @@ animation = &"garlic/low_hp" blend_point_0/node = SubResource("AnimationNodeAnimation_mdv0r") blend_point_0/pos = 1.0 blend_point_1/node = SubResource("AnimationNodeAnimation_j5xqj") -blend_point_1/pos = 0.7 +blend_point_1/pos = 0.5 blend_point_2/node = SubResource("AnimationNodeAnimation_tlgpl") -blend_point_2/pos = 0.3 +blend_point_2/pos = 0.0 min_space = 0.0 blend_mode = 1 [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_2o7sr"] -graph_offset = Vector2(-397, 76) +graph_offset = Vector2(-389, 166) nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_2d3xk") nodes/TimeScale/position = Vector2(100, 160) nodes/Tree/node = SubResource("AnimationNodeBlendSpace1D_8mvpm") @@ -84,6 +84,7 @@ shape = SubResource("RectangleShape2D_thlvs") [node name="Behaviour" type="Node" parent="." index="4"] script = ExtResource("4_bv44h") +parameters = Array[String](["parameters/Tree/blend_position"]) [node name="ReturnEffect" type="Node" parent="." index="5"] script = ExtResource("5_oob20") diff --git a/scenes/entities/plants/nerdus.tscn b/scenes/entities/plants/nerdus.tscn new file mode 100644 index 0000000..2e5e6c4 --- /dev/null +++ b/scenes/entities/plants/nerdus.tscn @@ -0,0 +1,295 @@ +[gd_scene load_steps=31 format=3 uid="uid://k5aj2slxar7w"] + +[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_8ui1h"] +[ext_resource type="Texture2D" uid="uid://b06e8xhdy77d1" path="res://assets/sprites/atlases/plants/nerdus.png" id="2_614v4"] +[ext_resource type="Script" uid="uid://dcokqes5wwo3k" path="res://scripts/plants/NerdusReturnAttack.cs" id="3_614v4"] +[ext_resource type="Resource" uid="uid://dme4nvp28otq6" path="res://resources/effects/NerdusEffect.tres" id="4_ga4vy"] +[ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/plants/behaviours/HpBasedBehaviour.cs" id="5_o1ggp"] + +[sub_resource type="Animation" id="Animation_ga4vy"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_o1ggp"] +_data = { +&"RESET": SubResource("Animation_ga4vy") +} + +[sub_resource type="Animation" id="Animation_yxvnw"] +length = 1.16668 +loop_mode = 2 +step = 0.0833333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.166667, 0.333333, 0.5, 0.666667, 0.833333), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3, 4, 5] +} + +[sub_resource type="Animation" id="Animation_o12iv"] +length = 1.16668 +loop_mode = 2 +step = 0.0833333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.166667, 0.333333, 0.5, 0.666667, 0.833333, 1), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [7, 8, 9, 10, 11, 12, 13] +} + +[sub_resource type="Animation" id="Animation_6e60l"] +length = 1.16668 +loop_mode = 2 +step = 0.0833333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.166667, 0.333333, 0.5, 0.666667, 0.833333, 1), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [14, 15, 16, 17, 18, 19, 20] +} + +[sub_resource type="Animation" id="Animation_v7ffp"] +length = 0.500008 +step = 0.0833333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.0833333, 0.166667, 0.25, 0.333333, 0.416667), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), +"update": 1, +"values": [21, 22, 23, 24, 25, 26] +} +tracks/1/type = "method" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Hurtbox") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0.416667), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"ReturnAllDamage" +}] +} + +[sub_resource type="Animation" id="Animation_rb7ob"] +length = 0.500008 +step = 0.0833333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.0833333, 0.166667, 0.25, 0.333333, 0.416667), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), +"update": 1, +"values": [28, 29, 30, 31, 32, 33] +} +tracks/1/type = "method" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Hurtbox") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0.416667), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"ReturnAllDamage" +}] +} + +[sub_resource type="Animation" id="Animation_6a4q1"] +length = 0.500008 +step = 0.0833333 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.0833333, 0.166667, 0.25, 0.333333, 0.416667), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), +"update": 1, +"values": [35, 36, 37, 38, 39, 40] +} +tracks/1/type = "method" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Hurtbox") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0.416667), +"transitions": PackedFloat32Array(1), +"values": [{ +"args": [], +"method": &"ReturnAllDamage" +}] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_pddnl"] +_data = { +&"attack_full": SubResource("Animation_v7ffp"), +&"attack_hdamage": SubResource("Animation_6a4q1"), +&"attack_ldamage": SubResource("Animation_rb7ob"), +&"idle_full": SubResource("Animation_yxvnw"), +&"idle_hdamage": SubResource("Animation_6e60l"), +&"idle_ldamage": SubResource("Animation_o12iv") +} + +[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_8ui1h"] + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_o12iv"] +animation = &"nerdus/attack_full" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_6e60l"] +animation = &"nerdus/attack_ldamage" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_v7ffp"] +animation = &"nerdus/attack_hdamage" + +[sub_resource type="AnimationNodeBlendSpace1D" id="AnimationNodeBlendSpace1D_614v4"] +blend_point_0/node = SubResource("AnimationNodeAnimation_o12iv") +blend_point_0/pos = 1.0 +blend_point_1/node = SubResource("AnimationNodeAnimation_6e60l") +blend_point_1/pos = 0.5 +blend_point_2/node = SubResource("AnimationNodeAnimation_v7ffp") +blend_point_2/pos = 0.0 +min_space = 0.0 +blend_mode = 1 + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ga4vy"] +animation = &"nerdus/idle_full" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_o1ggp"] +animation = &"nerdus/idle_hdamage" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_yxvnw"] +animation = &"nerdus/idle_ldamage" + +[sub_resource type="AnimationNodeBlendSpace1D" id="AnimationNodeBlendSpace1D_o12iv"] +blend_point_0/node = SubResource("AnimationNodeAnimation_ga4vy") +blend_point_0/pos = 1.0 +blend_point_1/node = SubResource("AnimationNodeAnimation_o1ggp") +blend_point_1/pos = 0.0 +blend_point_2/node = SubResource("AnimationNodeAnimation_yxvnw") +blend_point_2/pos = 0.5 +min_space = 0.0 +blend_mode = 1 + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_6e60l"] +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_v7ffp"] +switch_mode = 2 +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rb7ob"] +advance_mode = 2 +advance_expression = "get(\"triggered\") +" + +[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_rb7ob"] +states/Attack/node = SubResource("AnimationNodeBlendSpace1D_614v4") +states/Attack/position = Vector2(558, 100) +states/Idle/node = SubResource("AnimationNodeBlendSpace1D_o12iv") +states/Idle/position = Vector2(337, 100) +transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_6e60l"), "Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_v7ffp"), "Idle", "Attack", SubResource("AnimationNodeStateMachineTransition_rb7ob")] +graph_offset = Vector2(98, -52) + +[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_6a4q1"] +graph_offset = Vector2(-406, 116) +nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_8ui1h") +nodes/TimeScale/position = Vector2(100, 140) +nodes/Tree/node = SubResource("AnimationNodeStateMachine_rb7ob") +nodes/Tree/position = Vector2(-220, 160) +node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_8ui1h"] +radius = 24.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_ga4vy"] +size = Vector2(73, 48) + +[node name="Nerdus" instance=ExtResource("1_8ui1h")] +MaxHP = 200.0 + +[node name="Sprite2D" parent="." index="0"] +texture = ExtResource("2_614v4") +hframes = 7 +vframes = 6 + +[node name="AnimationPlayer" parent="." index="1"] +libraries = { +&"": SubResource("AnimationLibrary_o1ggp"), +&"nerdus": SubResource("AnimationLibrary_pddnl") +} + +[node name="AnimationTree" parent="." index="2"] +tree_root = SubResource("AnimationNodeBlendTree_6a4q1") +advance_expression_base_node = NodePath("../Hurtbox") +parameters/TimeScale/scale = 1.0 +parameters/Tree/Attack/blend_position = 1.0 +parameters/Tree/Idle/blend_position = 1.0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] +position = Vector2(0, 3) +shape = SubResource("CircleShape2D_8ui1h") + +[node name="Hurtbox" type="Area2D" parent="." index="4"] +collision_layer = 0 +collision_mask = 8 +script = ExtResource("3_614v4") +returnEffect = ExtResource("4_ga4vy") +bitesToPeas = 1.6 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox" index="0"] +position = Vector2(3.5, 3) +shape = SubResource("RectangleShape2D_ga4vy") + +[node name="Behaviour" type="Node" parent="." index="5"] +script = ExtResource("5_o1ggp") +parameters = Array[String](["parameters/Tree/Attack/blend_position", "parameters/Tree/Idle/blend_position"]) + +[connection signal="OnHPChanged" from="." to="Hurtbox" method="OnHPChanged"] +[connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"] diff --git a/scenes/entities/plants/peashooter.tscn b/scenes/entities/plants/peashooter.tscn index 853fb21..ef8888c 100644 --- a/scenes/entities/plants/peashooter.tscn +++ b/scenes/entities/plants/peashooter.tscn @@ -3,12 +3,12 @@ [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_pyk3o"] [ext_resource type="Texture2D" uid="uid://cksryh4w5dbbx" path="res://assets/sprites/atlases/plants/peashooter.png" id="2_14qlx"] [ext_resource type="AnimationLibrary" uid="uid://bv1dl1g4dmbho" path="res://resources/animations/plants/peashooter.res" id="3_8lrhp"] -[ext_resource type="Script" uid="uid://ceprqkraw3v6m" path="res://scripts/components/plants/Shooter.cs" id="3_a4ew1"] +[ext_resource type="Script" uid="uid://ceprqkraw3v6m" path="res://scripts/plants/Shooter.cs" id="3_a4ew1"] [ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="4_saxds"] -[ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/components/plants/behaviours/PeashooterBehaviour.cs" id="5_7qiua"] -[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/components/TimeScalableTimer.cs" id="6_q58jr"] -[ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/components/plants/Eyesight.cs" id="7_2bki8"] -[ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/components/plants/PlantEyesightLimiter.cs" id="8_nl4jc"] +[ext_resource type="Script" uid="uid://bdk5iqtw4xbkl" path="res://scripts/plants/behaviours/PeashooterBehaviour.cs" id="5_7qiua"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="6_q58jr"] +[ext_resource type="Script" uid="uid://dn53jvpjyg63l" path="res://scripts/plants/Eyesight.cs" id="7_2bki8"] +[ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/plants/PlantEyesightLimiter.cs" id="8_nl4jc"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="9_mbbd7"] [ext_resource type="AudioStream" uid="uid://dsv81mvrdg3w3" path="res://assets/audio/sfx/throw_generic.tres" id="10_q58jr"] diff --git a/scenes/entities/plants/potato_mine.tscn b/scenes/entities/plants/potato_mine.tscn index c3cf489..d7d3e1f 100644 --- a/scenes/entities/plants/potato_mine.tscn +++ b/scenes/entities/plants/potato_mine.tscn @@ -2,13 +2,13 @@ [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_dj7ul"] [ext_resource type="Texture2D" uid="uid://c77o6ba0mw7a3" path="res://assets/sprites/atlases/plants/potato_mine.png" id="2_sneas"] -[ext_resource type="Script" uid="uid://bhl6o2m3fn4xg" path="res://scripts/components/plants/ExplosionComponent.cs" id="3_2hd5y"] +[ext_resource type="Script" uid="uid://bhl6o2m3fn4xg" path="res://scripts/plants/ExplosionComponent.cs" id="3_2hd5y"] [ext_resource type="AnimationLibrary" uid="uid://bjlbdvr6f0r7e" path="res://resources/animations/plants/potato_mine.res" id="3_7tqmj"] -[ext_resource type="Script" uid="uid://c7qfh4py0uulo" path="res://scripts/components/plants/behaviours/PotatomineBehaviour.cs" id="4_twx65"] +[ext_resource type="Script" uid="uid://c7qfh4py0uulo" path="res://scripts/plants/behaviours/PotatomineBehaviour.cs" id="4_twx65"] [ext_resource type="PackedScene" uid="uid://ckanq33rao1ur" path="res://scenes/particles/potato_explosion.tscn" id="5_px4r0"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="7_b1j2f"] [ext_resource type="AudioStream" uid="uid://dltjtpyfr1so0" path="res://assets/audio/sfx/potato_mine.mp3" id="8_3vqdc"] -[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/components/TimeScalableTimer.cs" id="8_824aq"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="8_824aq"] [ext_resource type="AudioStream" uid="uid://b27om1bw1x04e" path="res://assets/audio/sfx/dirt_rise.mp3" id="9_3vqdc"] [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_3vqdc"] diff --git a/scenes/entities/plants/spikeweed.tscn b/scenes/entities/plants/spikeweed.tscn index 6c669a8..76f5221 100644 --- a/scenes/entities/plants/spikeweed.tscn +++ b/scenes/entities/plants/spikeweed.tscn @@ -2,9 +2,9 @@ [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_vmbvr"] [ext_resource type="Texture2D" uid="uid://coafh3mjharxo" path="res://assets/sprites/atlases/plants/spikeweed.png" id="2_ffrjr"] -[ext_resource type="Script" uid="uid://co7ttejdo2qot" path="res://scripts/components/plants/AreaAttack.cs" id="3_hqtbm"] +[ext_resource type="Script" uid="uid://co7ttejdo2qot" path="res://scripts/plants/AreaAttack.cs" id="3_hqtbm"] [ext_resource type="AnimationLibrary" uid="uid://cen6ku4y01dyg" path="res://resources/animations/plants/spikeweed.res" id="3_nwshn"] -[ext_resource type="Script" uid="uid://dqquodxaijmem" path="res://scripts/components/plants/behaviours/SpikeweedBehaviour.cs" id="3_uhpn7"] +[ext_resource type="Script" uid="uid://dqquodxaijmem" path="res://scripts/plants/behaviours/SpikeweedBehaviour.cs" id="3_uhpn7"] [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_jleqa"] diff --git a/scenes/entities/plants/sunflower.tscn b/scenes/entities/plants/sunflower.tscn index 967f77c..528f936 100644 --- a/scenes/entities/plants/sunflower.tscn +++ b/scenes/entities/plants/sunflower.tscn @@ -3,10 +3,10 @@ [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_bikjn"] [ext_resource type="Texture2D" uid="uid://b3tuidu8dag8u" path="res://assets/sprites/atlases/plants/sunflower.png" id="2_fwcda"] [ext_resource type="AnimationLibrary" uid="uid://yjytiuj4u7oh" path="res://resources/animations/plants/sunflower.res" id="3_btsik"] -[ext_resource type="Script" uid="uid://b71gebny84s81" path="res://scripts/components/plants/PlantSunSpawner.cs" id="3_te0pl"] +[ext_resource type="Script" uid="uid://b71gebny84s81" path="res://scripts/plants/PlantSunSpawner.cs" id="3_te0pl"] [ext_resource type="PackedScene" uid="uid://bpekho7leatr5" path="res://scenes/sun.tscn" id="4_b8hls"] -[ext_resource type="Script" uid="uid://bth7gah4tn7uj" path="res://scripts/components/plants/behaviours/SunflowerBehaviour.cs" id="5_26je0"] -[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/components/TimeScalableTimer.cs" id="7_rlkb7"] +[ext_resource type="Script" uid="uid://bth7gah4tn7uj" path="res://scripts/plants/behaviours/SunflowerBehaviour.cs" id="5_26je0"] +[ext_resource type="Script" uid="uid://c4jy0cnbnx33h" path="res://scripts/TimeScalableTimer.cs" id="7_rlkb7"] [sub_resource type="Animation" id="Animation_bfx6v"] length = 0.001 diff --git a/scenes/entities/plants/threepeater.tscn b/scenes/entities/plants/threepeater.tscn index bae2cac..e297737 100644 --- a/scenes/entities/plants/threepeater.tscn +++ b/scenes/entities/plants/threepeater.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=20 format=3 uid="uid://eegv1qihfv2q"] [ext_resource type="PackedScene" uid="uid://dy41q1kxray5t" path="res://scenes/entities/plants/peashooter.tscn" id="1_muntu"] -[ext_resource type="Script" uid="uid://djpc0kvagpadv" path="res://scripts/components/plants/ThreepeaterShooter.cs" id="2_ieami"] +[ext_resource type="Script" uid="uid://djpc0kvagpadv" path="res://scripts/plants/ThreepeaterShooter.cs" id="2_ieami"] [ext_resource type="Texture2D" uid="uid://dyfa4462hu3w1" path="res://assets/sprites/atlases/plants/threepeater.png" id="2_j7h7q"] -[ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/components/plants/PlantEyesightLimiter.cs" id="3_dqn6w"] +[ext_resource type="Script" uid="uid://hccb0aee0x0o" path="res://scripts/plants/PlantEyesightLimiter.cs" id="3_dqn6w"] [sub_resource type="Animation" id="Animation_a2y0j"] length = 0.001 diff --git a/scenes/entities/plants/wallnut.tscn b/scenes/entities/plants/wallnut.tscn index 76e6f40..9fd5ce4 100644 --- a/scenes/entities/plants/wallnut.tscn +++ b/scenes/entities/plants/wallnut.tscn @@ -3,7 +3,7 @@ [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_fluxn"] [ext_resource type="Texture2D" uid="uid://dstqh1wc5dvmo" path="res://assets/sprites/atlases/plants/wallnut.png" id="2_o5tda"] [ext_resource type="AnimationLibrary" uid="uid://0bdesb8j2mbo" path="res://resources/animations/plants/wallnut.res" id="3_xl65q"] -[ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/components/plants/behaviours/HpBasedBehaviour.cs" id="4_cjtyy"] +[ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/plants/behaviours/HpBasedBehaviour.cs" id="4_cjtyy"] [sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_y3tlf"] @@ -20,14 +20,14 @@ animation = &"wallnut/idle_low" blend_point_0/node = SubResource("AnimationNodeAnimation_ds5ry") blend_point_0/pos = 1.0 blend_point_1/node = SubResource("AnimationNodeAnimation_frsxy") -blend_point_1/pos = 0.7 +blend_point_1/pos = 0.5 blend_point_2/node = SubResource("AnimationNodeAnimation_7avgo") -blend_point_2/pos = 0.3 +blend_point_2/pos = 0.0 min_space = 0.0 blend_mode = 1 [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_bi7an"] -graph_offset = Vector2(-498, 95) +graph_offset = Vector2(-338.2, 175.4) nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_y3tlf") nodes/TimeScale/position = Vector2(60, 140) nodes/Tree/node = SubResource("AnimationNodeBlendSpace1D_nij8v") @@ -44,6 +44,7 @@ MaxHP = 600.0 texture = ExtResource("2_o5tda") hframes = 12 vframes = 3 +frame = 9 [node name="AnimationPlayer" parent="." index="1"] libraries = { @@ -61,5 +62,6 @@ shape = SubResource("RectangleShape2D_khltr") [node name="Behaviour" type="Node" parent="." index="4"] script = ExtResource("4_cjtyy") +parameters = Array[String](["parameters/Tree/blend_position"]) [connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"] diff --git a/scenes/gui/almanach.tscn b/scenes/gui/almanach.tscn index f0b6f7c..83d1d50 100644 --- a/scenes/gui/almanach.tscn +++ b/scenes/gui/almanach.tscn @@ -1,11 +1,12 @@ -[gd_scene load_steps=10 format=3 uid="uid://bvpt0q4j6nx18"] +[gd_scene load_steps=11 format=3 uid="uid://bvpt0q4j6nx18"] [ext_resource type="Texture2D" uid="uid://dr8a0rx42o3qy" path="res://assets/sprites/gui/ChooseYourSeeds/PlantFrame.tres" id="1_1hnxi"] [ext_resource type="Script" uid="uid://bs1qywtqijyd2" path="res://scenes/gui/almanach.gd" id="1_oy57w"] -[ext_resource type="Script" uid="uid://0mvmfvwe1bc7" path="res://scripts/components/gui/almanach/AlmanachGrid.cs" id="1_ru62c"] -[ext_resource type="Script" uid="uid://covbig00p22di" path="res://scripts/components/gui/choose_your_seeds/Previewport.cs" id="2_ru62c"] +[ext_resource type="Script" uid="uid://0mvmfvwe1bc7" path="res://scripts/gui/almanach/AlmanachGrid.cs" id="1_ru62c"] +[ext_resource type="Script" uid="uid://covbig00p22di" path="res://scripts/gui/choose_your_seeds/Previewport.cs" id="2_ru62c"] [ext_resource type="Texture2D" uid="uid://dycdvvgmgmfu6" path="res://assets/sprites/gui/ChooseYourSeeds/FrameField.tres" id="3_oy57w"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="6_7vo1l"] +[ext_resource type="Texture2D" uid="uid://ksxucobpgv7n" path="res://assets/sprites/field.png" id="6_vvhxq"] [ext_resource type="AudioStream" uid="uid://bdx83fokp6kha" path="res://assets/audio/sfx/buttonclick.mp3" id="7_vvhxq"] [sub_resource type="ViewportTexture" id="ViewportTexture_ru62c"] @@ -21,10 +22,11 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 tab_alignment = 1 -current_tab = 0 +current_tab = 1 script = ExtResource("1_oy57w") [node name="plants" type="HBoxContainer" parent="."] +visible = false layout_mode = 2 metadata/_tab_index = 0 @@ -54,12 +56,13 @@ size_flags_horizontal = 0 size_flags_vertical = 0 texture = ExtResource("1_1hnxi") -[node name="Previewport" type="SubViewport" parent="plants/Infobox/FrameAndTitle/VboxContainer/Frame" node_paths=PackedStringArray("title", "description")] +[node name="Previewport" type="SubViewport" parent="plants/Infobox/FrameAndTitle/VboxContainer/Frame" node_paths=PackedStringArray("title", "description", "_frameField")] canvas_item_default_texture_filter = 0 size = Vector2i(65, 65) script = ExtResource("2_ru62c") title = NodePath("../../../Label") description = NodePath("../../../../Description/ScrollContainer/RichTextLabel") +_frameField = NodePath("FrameField") [node name="FrameField" type="Sprite2D" parent="plants/Infobox/FrameAndTitle/VboxContainer/Frame/Previewport"] texture = ExtResource("3_oy57w") @@ -106,7 +109,6 @@ theme_override_colors/font_selected_color = Color(0, 0, 0, 1) bbcode_enabled = true [node name="zombies" type="HBoxContainer" parent="."] -visible = false layout_mode = 2 metadata/_tab_index = 1 @@ -137,15 +139,21 @@ size_flags_horizontal = 0 size_flags_vertical = 0 texture = ExtResource("1_1hnxi") -[node name="Previewport" type="SubViewport" parent="zombies/Infobox/FrameAndTitle/VBoxContainer/Frame" node_paths=PackedStringArray("title", "description")] +[node name="Previewport" type="SubViewport" parent="zombies/Infobox/FrameAndTitle/VBoxContainer/Frame" node_paths=PackedStringArray("title", "description", "_frameField")] canvas_item_default_texture_filter = 0 size = Vector2i(130, 130) script = ExtResource("2_ru62c") title = NodePath("../../../Label") description = NodePath("../../../../Description/ScrollContainer/RichTextLabel") +_frameField = NodePath("CanvasLayer/Field") -[node name="FrameField" type="Sprite2D" parent="zombies/Infobox/FrameAndTitle/VBoxContainer/Frame/Previewport"] -texture = ExtResource("3_oy57w") +[node name="CanvasLayer" type="CanvasLayer" parent="zombies/Infobox/FrameAndTitle/VBoxContainer/Frame/Previewport"] +layer = -10 +follow_viewport_enabled = true + +[node name="Field" type="Sprite2D" parent="zombies/Infobox/FrameAndTitle/VBoxContainer/Frame/Previewport/CanvasLayer"] +position = Vector2(0, 30) +texture = ExtResource("6_vvhxq") [node name="Camera2D" type="Camera2D" parent="zombies/Infobox/FrameAndTitle/VBoxContainer/Frame/Previewport"] position = Vector2(0, -45) diff --git a/scenes/gui/choose_your_seeds.tscn b/scenes/gui/choose_your_seeds.tscn index 7279861..dac1715 100644 --- a/scenes/gui/choose_your_seeds.tscn +++ b/scenes/gui/choose_your_seeds.tscn @@ -1,15 +1,16 @@ -[gd_scene load_steps=19 format=3 uid="uid://dpxxjfd5lv5sv"] +[gd_scene load_steps=21 format=3 uid="uid://dpxxjfd5lv5sv"] [ext_resource type="Theme" uid="uid://e8n88g31w7x7" path="res://resources/themes/ChooseYourSeeds.tres" id="1_bfo8i"] [ext_resource type="Texture2D" uid="uid://dr8a0rx42o3qy" path="res://assets/sprites/gui/ChooseYourSeeds/PlantFrame.tres" id="2_so2bw"] -[ext_resource type="Script" uid="uid://covbig00p22di" path="res://scripts/components/gui/choose_your_seeds/Previewport.cs" id="3_fmc0y"] +[ext_resource type="Script" uid="uid://covbig00p22di" path="res://scripts/gui/choose_your_seeds/Previewport.cs" id="3_fmc0y"] [ext_resource type="Texture2D" uid="uid://dycdvvgmgmfu6" path="res://assets/sprites/gui/ChooseYourSeeds/FrameField.tres" id="3_rn5vx"] -[ext_resource type="Script" uid="uid://eq3ecja30mlj" path="res://scripts/components/gui/choose_your_seeds/GridLoader.cs" id="4_i7sou"] +[ext_resource type="Script" uid="uid://eq3ecja30mlj" path="res://scripts/gui/choose_your_seeds/GridLoader.cs" id="4_i7sou"] [ext_resource type="PackedScene" uid="uid://10b1egek6upx" path="res://scenes/gui/level_run_button.tscn" id="5_n80ic"] -[ext_resource type="Script" uid="uid://d26waisd3v488" path="res://scripts/components/gui/choose_your_seeds/LevelRunButton.cs" id="7_k6b6g"] +[ext_resource type="Script" uid="uid://d26waisd3v488" path="res://scripts/gui/choose_your_seeds/LevelRunButton.cs" id="7_k6b6g"] [ext_resource type="Texture2D" uid="uid://drydueofrb448" path="res://assets/sprites/gui/almanach/book.tres" id="8_hmdmm"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="8_v7xff"] [ext_resource type="AudioStream" uid="uid://bdx83fokp6kha" path="res://assets/audio/sfx/buttonclick.mp3" id="9_v7xff"] +[ext_resource type="Script" uid="uid://c1x4n4nqyq72f" path="res://scripts/audio/ChannelSettings.cs" id="10_nlh6x"] [ext_resource type="PackedScene" uid="uid://bvpt0q4j6nx18" path="res://scenes/gui/almanach.tscn" id="11_nlh6x"] [sub_resource type="Animation" id="Animation_0rps3"] @@ -118,6 +119,11 @@ func _pressed() -> void: $\"../../ChannelPlayer\".call(\"Play\") " +[sub_resource type="Resource" id="Resource_l66rp"] +script = ExtResource("10_nlh6x") +restartTreshold = -1.0 +metadata/_custom_type_script = "uid://c1x4n4nqyq72f" + [node name="ChooseYourSeeds" type="Control"] process_mode = 3 layout_mode = 3 @@ -169,12 +175,13 @@ layout_mode = 2 layout_mode = 2 texture = ExtResource("2_so2bw") -[node name="Previewport" type="SubViewport" parent="Panel/MarginContainer/VBoxContainer/HBoxContainer/Frame" node_paths=PackedStringArray("title", "description")] +[node name="Previewport" type="SubViewport" parent="Panel/MarginContainer/VBoxContainer/HBoxContainer/Frame" node_paths=PackedStringArray("title", "description", "_frameField")] canvas_item_default_texture_filter = 0 size = Vector2i(65, 65) script = ExtResource("3_fmc0y") title = NodePath("../../PanelContainer/ScrollContainer/VBoxContainer/Title") description = NodePath("../../PanelContainer/ScrollContainer/VBoxContainer/Description") +_frameField = NodePath("FrameField") [node name="FrameField" type="Sprite2D" parent="Panel/MarginContainer/VBoxContainer/HBoxContainer/Frame/Previewport"] texture = ExtResource("3_rn5vx") @@ -248,6 +255,7 @@ metadata/_edit_use_anchors_ = true [node name="ChannelPlayer" type="Node" parent="."] script = ExtResource("8_v7xff") +settings = SubResource("Resource_l66rp") audioStream = ExtResource("9_v7xff") channel = "button" metadata/_custom_type_script = "uid://c36bj8u7jghc7" diff --git a/scenes/gui/fast_forward_button.tscn b/scenes/gui/fast_forward_button.tscn index 1ea4282..3632a2f 100644 --- a/scenes/gui/fast_forward_button.tscn +++ b/scenes/gui/fast_forward_button.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=5 format=3 uid="uid://cgm7td1hgs0rr"] [ext_resource type="Texture2D" uid="uid://bjsar1x67xk1t" path="res://assets/sprites/gui/FastForward1.tres" id="1_ta3h7"] -[ext_resource type="Script" path="res://scripts/components/gui/FastForwardButton.cs" id="2_wle4k"] +[ext_resource type="Script" uid="uid://cwn3bd2k7mdq6" path="res://scripts/gui/FastForwardButton.cs" id="2_wle4k"] [ext_resource type="Texture2D" uid="uid://dfr5ofieigu5j" path="res://assets/sprites/gui/FastForward2.tres" id="3_fj838"] [ext_resource type="Texture2D" uid="uid://qgmsoocd4p1o" path="res://assets/sprites/gui/FastForward3.tres" id="4_2wmv1"] diff --git a/scenes/gui/pause_button.tscn b/scenes/gui/pause_button.tscn index 3006d62..154291c 100644 --- a/scenes/gui/pause_button.tscn +++ b/scenes/gui/pause_button.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=3 uid="uid://u5l3jd00s8vd"] [ext_resource type="Texture2D" uid="uid://dm0hjd67a6mva" path="res://assets/sprites/gui/Pause.tres" id="1_7k3tg"] -[ext_resource type="Script" uid="uid://cmfhiun6yrlr6" path="res://scripts/components/gui/PauseButton.cs" id="2_01o3l"] +[ext_resource type="Script" uid="uid://cmfhiun6yrlr6" path="res://scripts/gui/PauseButton.cs" id="2_01o3l"] [node name="PauseButton" type="Button"] anchors_preset = -1 diff --git a/scenes/gui/pause_menu.tscn b/scenes/gui/pause_menu.tscn index 94787ed..c9d2959 100644 --- a/scenes/gui/pause_menu.tscn +++ b/scenes/gui/pause_menu.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=11 format=3 uid="uid://fm471x22n8kr"] [ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_loim0"] -[ext_resource type="Script" uid="uid://gvwhpjoame6m" path="res://scripts/components/gui/PauseMenu.cs" id="2_4vp8g"] +[ext_resource type="Script" uid="uid://gvwhpjoame6m" path="res://scripts/gui/PauseMenu.cs" id="2_4vp8g"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="3_4vp8g"] [ext_resource type="Script" uid="uid://ciccaxqo70s13" path="res://scripts/audio/AudioSlider.cs" id="3_e3p60"] [ext_resource type="AudioStream" uid="uid://bdx83fokp6kha" path="res://assets/audio/sfx/buttonclick.mp3" id="4_e3p60"] @@ -72,14 +72,25 @@ label_settings = SubResource("LabelSettings_or0he") horizontal_alignment = 1 metadata/_edit_use_anchors_ = true -[node name="SFXVolume" type="HBoxContainer" parent="Pause/MarginContainer/Buttons"] +[node name="Volumes" type="HBoxContainer" parent="Pause/MarginContainer/Buttons"] layout_mode = 2 -[node name="Label" type="Label" parent="Pause/MarginContainer/Buttons/SFXVolume"] +[node name="Labels" type="VBoxContainer" parent="Pause/MarginContainer/Buttons/Volumes"] +layout_mode = 2 + +[node name="SFX" type="Label" parent="Pause/MarginContainer/Buttons/Volumes/Labels"] layout_mode = 2 text = "sfx" -[node name="HSlider" type="HSlider" parent="Pause/MarginContainer/Buttons/SFXVolume"] +[node name="Music" type="Label" parent="Pause/MarginContainer/Buttons/Volumes/Labels"] +layout_mode = 2 +text = "music" + +[node name="Sliders" type="VBoxContainer" parent="Pause/MarginContainer/Buttons/Volumes"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="SFX" type="HSlider" parent="Pause/MarginContainer/Buttons/Volumes/Sliders"] layout_mode = 2 size_flags_horizontal = 3 max_value = 1.0 @@ -87,14 +98,7 @@ step = 0.01 value = 1.0 script = ExtResource("3_e3p60") -[node name="MusicVolume" type="HBoxContainer" parent="Pause/MarginContainer/Buttons"] -layout_mode = 2 - -[node name="Label" type="Label" parent="Pause/MarginContainer/Buttons/MusicVolume"] -layout_mode = 2 -text = "music" - -[node name="HSlider" type="HSlider" parent="Pause/MarginContainer/Buttons/MusicVolume"] +[node name="Music" type="HSlider" parent="Pause/MarginContainer/Buttons/Volumes/Sliders"] layout_mode = 2 size_flags_horizontal = 3 max_value = 1.0 diff --git a/scenes/gui/runtime_gui.tscn b/scenes/gui/runtime_gui.tscn index fe6a0f6..c4b730c 100644 --- a/scenes/gui/runtime_gui.tscn +++ b/scenes/gui/runtime_gui.tscn @@ -1,8 +1,8 @@ -[gd_scene load_steps=16 format=3 uid="uid://cfnmspei3k4p7"] +[gd_scene load_steps=32 format=3 uid="uid://cfnmspei3k4p7"] [ext_resource type="PackedScene" uid="uid://ky35veswaytr" path="res://scenes/gui/sun_counter.tscn" id="1_le3od"] [ext_resource type="Theme" uid="uid://b8l285cjcgeyi" path="res://resources/themes/GameStyle.tres" id="1_xf6ra"] -[ext_resource type="Script" uid="uid://cwa1eydeiy3y4" path="res://scripts/components/LevelGUIElements.cs" id="2_5fonq"] +[ext_resource type="Script" uid="uid://cwa1eydeiy3y4" path="res://scripts/LevelGUIElements.cs" id="2_5fonq"] [ext_resource type="Texture2D" uid="uid://bbh0uwloi87tn" path="res://assets/sprites/gui/PlantPanel.png" id="2_eg3hk"] [ext_resource type="PackedScene" uid="uid://t0vpmycj6c8j" path="res://scenes/gui/shovel_button.tscn" id="3_bheea"] [ext_resource type="PackedScene" uid="uid://cgm7td1hgs0rr" path="res://scenes/gui/fast_forward_button.tscn" id="4_66uy4"] @@ -10,7 +10,6 @@ [ext_resource type="PackedScene" uid="uid://b4lx8adw6rbqs" path="res://scenes/particles/dirt_explosion.tscn" id="6_5jtun"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="7_5kkbf"] [ext_resource type="AudioStream" uid="uid://dfbg6dxg4actb" path="res://assets/audio/sfx/shovel.mp3" id="8_xq48m"] -[ext_resource type="AudioStream" uid="uid://ckja8ym50y0d4" path="res://assets/audio/sfx/pause.mp3" id="11_cti1a"] [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ps2iw"] texture = ExtResource("2_eg3hk") @@ -20,6 +19,93 @@ texture_margin_right = 4.0 texture_margin_bottom = 4.0 axis_stretch_horizontal = 1 +[sub_resource type="GDScript" id="GDScript_lxxir"] +resource_name = "shortcutter" +script/source = "extends Node + +@export var keys : Array[InputEventKey] +@export var where_to_map : Node + +func _ready() -> void: + while get_tree() != null and get_tree().paused: + await get_tree().process_frame + for i in range(where_to_map.get_child_count()): + var key = InputEventKey.new() + where_to_map.get_child(i).shortcut = Shortcut.new() + where_to_map.get_child(i).shortcut.events.append(keys[i]) +" + +[sub_resource type="InputEventKey" id="InputEventKey_lxxir"] +device = -1 +keycode = 49 +unicode = 49 + +[sub_resource type="InputEventKey" id="InputEventKey_5kkbf"] +device = -1 +keycode = 50 +unicode = 50 + +[sub_resource type="InputEventKey" id="InputEventKey_xq48m"] +device = -1 +keycode = 51 +unicode = 51 + +[sub_resource type="InputEventKey" id="InputEventKey_cti1a"] +device = -1 +keycode = 52 +unicode = 52 + +[sub_resource type="InputEventKey" id="InputEventKey_s07y0"] +device = -1 +keycode = 53 +unicode = 53 + +[sub_resource type="InputEventKey" id="InputEventKey_hmpwl"] +device = -1 +keycode = 54 +unicode = 54 + +[sub_resource type="InputEventKey" id="InputEventKey_kqrbi"] +device = -1 +keycode = 55 +unicode = 55 + +[sub_resource type="InputEventKey" id="InputEventKey_s6pj4"] +device = -1 +keycode = 56 +unicode = 56 + +[sub_resource type="InputEventKey" id="InputEventKey_ar74i"] +device = -1 +keycode = 57 +unicode = 57 + +[sub_resource type="InputEventKey" id="InputEventKey_k8sc7"] +device = -1 +keycode = 48 +unicode = 48 + +[sub_resource type="InputEventAction" id="InputEventAction_xq48m"] +action = &"short_shovel" +pressed = true + +[sub_resource type="Shortcut" id="Shortcut_cti1a"] +events = [SubResource("InputEventAction_xq48m")] + +[sub_resource type="InputEventAction" id="InputEventAction_5kkbf"] +action = &"short_ff" +pressed = true + +[sub_resource type="Shortcut" id="Shortcut_xq48m"] +events = [SubResource("InputEventAction_5kkbf")] + +[sub_resource type="InputEventAction" id="InputEventAction_cti1a"] +action = &"short_pause" +pressed = true + +[sub_resource type="Shortcut" id="Shortcut_s07y0"] +events = [SubResource("InputEventAction_cti1a")] + [sub_resource type="Animation" id="Animation_c8fnk"] length = 0.001 tracks/0/type = "bezier" @@ -108,6 +194,12 @@ layout_mode = 2 mouse_filter = 2 theme_override_constants/separation = 0 +[node name="ShortcutSetter" type="Node" parent="MarginContainer/Control/Hotbar/PanelContainer" node_paths=PackedStringArray("where_to_map")] +process_mode = 1 +script = SubResource("GDScript_lxxir") +keys = Array[InputEventKey]([SubResource("InputEventKey_lxxir"), SubResource("InputEventKey_5kkbf"), SubResource("InputEventKey_xq48m"), SubResource("InputEventKey_cti1a"), SubResource("InputEventKey_s07y0"), SubResource("InputEventKey_hmpwl"), SubResource("InputEventKey_kqrbi"), SubResource("InputEventKey_s6pj4"), SubResource("InputEventKey_ar74i"), SubResource("InputEventKey_k8sc7")]) +where_to_map = NodePath("../Seedpackets") + [node name="Space" type="Control" parent="MarginContainer/Control/Hotbar"] layout_mode = 2 size_flags_horizontal = 3 @@ -116,6 +208,7 @@ size_flags_horizontal = 3 layout_mode = 2 size_flags_horizontal = 1 size_flags_vertical = 4 +shortcut = SubResource("Shortcut_cti1a") particles = ExtResource("6_5jtun") [node name="ChannelPlayer" type="Node" parent="MarginContainer/Control/Hotbar/ShovelButton"] @@ -126,6 +219,7 @@ metadata/_custom_type_script = "uid://c36bj8u7jghc7" [node name="FastForwardButton" parent="MarginContainer/Control/Hotbar" node_paths=PackedStringArray("flashAnimator") instance=ExtResource("4_66uy4")] layout_mode = 2 +shortcut = SubResource("Shortcut_xq48m") flashAnimator = NodePath("../../../../FastForwardEffect/AnimationPlayer") [node name="ChannelPlayer" type="Node" parent="MarginContainer/Control/Hotbar/FastForwardButton"] @@ -134,13 +228,9 @@ channel = "fastfw" metadata/_custom_type_script = "uid://c36bj8u7jghc7" [node name="PauseButton" parent="MarginContainer/Control/Hotbar" instance=ExtResource("5_jyq78")] +process_mode = 3 layout_mode = 2 - -[node name="ChannelPlayer" type="Node" parent="MarginContainer/Control/Hotbar/PauseButton"] -script = ExtResource("7_5kkbf") -audioStream = ExtResource("11_cti1a") -channel = "pause" -metadata/_custom_type_script = "uid://c36bj8u7jghc7" +shortcut = SubResource("Shortcut_s07y0") [node name="FastForwardEffect" type="ColorRect" parent="."] z_index = 1 @@ -160,4 +250,3 @@ libraries = { } [connection signal="pressed" from="MarginContainer/Control/Hotbar/ShovelButton" to="MarginContainer/Control/Hotbar/ShovelButton/ChannelPlayer" method="Play"] -[connection signal="pressed" from="MarginContainer/Control/Hotbar/PauseButton" to="MarginContainer/Control/Hotbar/PauseButton/ChannelPlayer" method="Play"] diff --git a/scenes/gui/seedpacket.tscn b/scenes/gui/seedpacket.tscn index 27e651b..b80164b 100644 --- a/scenes/gui/seedpacket.tscn +++ b/scenes/gui/seedpacket.tscn @@ -1,11 +1,12 @@ -[gd_scene load_steps=9 format=3 uid="uid://e7vutg71l6f2"] +[gd_scene load_steps=10 format=3 uid="uid://e7vutg71l6f2"] [ext_resource type="Texture2D" uid="uid://dxyf557m4mq1p" path="res://assets/sprites/gui/EmptyPlantCard.png" id="1_77bw1"] [ext_resource type="Texture2D" uid="uid://cabpf23ndlvx0" path="res://assets/sprites/gui/Selection.tres" id="3_q0tvq"] -[ext_resource type="Script" uid="uid://cn6ddajdtf4ep" path="res://scripts/components/gui/seedpackets/Seedpacket.cs" id="4_c6epd"] +[ext_resource type="Script" uid="uid://cn6ddajdtf4ep" path="res://scripts/gui/seedpackets/Seedpacket.cs" id="4_c6epd"] +[ext_resource type="Script" uid="uid://chag6sgjsjb2u" path="res://scripts/gui/seedpackets/CostVeil.cs" id="4_gtmhg"] [ext_resource type="Shader" uid="uid://dcp5tqcec2oi3" path="res://assets/shaders/gui_masking.gdshader" id="5_s5861"] [ext_resource type="Texture2D" uid="uid://c1afy0ga6h1ic" path="res://assets/sprites/white_box.png" id="6_lp42h"] -[ext_resource type="Script" uid="uid://ddi84kmmq1qla" path="res://scripts/components/gui/VeilResizer.cs" id="7_tv07f"] +[ext_resource type="Script" uid="uid://ddi84kmmq1qla" path="res://scripts/gui/VeilResizer.cs" id="7_tv07f"] [sub_resource type="LabelSettings" id="LabelSettings_js4li"] resource_local_to_scene = true @@ -76,6 +77,17 @@ mouse_default_cursor_shape = 2 expand_mode = 1 stretch_mode = 5 +[node name="CostVeil" type="ColorRect" parent="."] +visible = false +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0, 0, 0, 0.415686) +script = ExtResource("4_gtmhg") + [node name="Veil" type="TextureProgressBar" parent="." node_paths=PackedStringArray("_referenceTimer")] material = SubResource("ShaderMaterial_qxf0q") layout_mode = 1 diff --git a/scenes/gui/shovel_button.tscn b/scenes/gui/shovel_button.tscn index 0592d5f..9f81c76 100644 --- a/scenes/gui/shovel_button.tscn +++ b/scenes/gui/shovel_button.tscn @@ -2,7 +2,7 @@ [ext_resource type="Texture2D" uid="uid://cw73vihkrfenc" path="res://assets/sprites/gui/Shovel.tres" id="1_46afk"] [ext_resource type="Texture2D" uid="uid://fd6drk2su0df" path="res://assets/sprites/gui/EmptyShovel.tres" id="2_pw2pj"] -[ext_resource type="Script" path="res://scripts/components/gui/ShovelButton.cs" id="3_u6gir"] +[ext_resource type="Script" uid="uid://d4dbg0us5ngxy" path="res://scripts/gui/ShovelButton.cs" id="3_u6gir"] [node name="ShovelButton" type="TextureButton"] anchors_preset = -1 diff --git a/scenes/gui/sun_counter.tscn b/scenes/gui/sun_counter.tscn index c22cf10..3a856a7 100644 --- a/scenes/gui/sun_counter.tscn +++ b/scenes/gui/sun_counter.tscn @@ -3,8 +3,8 @@ [ext_resource type="Texture2D" uid="uid://bhp3vuvwf7lak" path="res://assets/sprites/gui/suncounter.tres" id="1_e5x4k"] [ext_resource type="Theme" uid="uid://b8l285cjcgeyi" path="res://resources/themes/GameStyle.tres" id="1_vhhcn"] [ext_resource type="Texture2D" uid="uid://c47rflkf2wap0" path="res://assets/sprites/sun.tres" id="2_gugre"] -[ext_resource type="Script" uid="uid://dwxohya1exdkh" path="res://scripts/components/gui/SunCounter.cs" id="3_qhmb8"] -[ext_resource type="Script" uid="uid://0ekxnoq6cyt4" path="res://scripts/components/gui/SunCounterImage.cs" id="4_c68ge"] +[ext_resource type="Script" uid="uid://dwxohya1exdkh" path="res://scripts/gui/SunCounter.cs" id="3_qhmb8"] +[ext_resource type="Script" uid="uid://0ekxnoq6cyt4" path="res://scripts/gui/SunCounterImage.cs" id="4_c68ge"] [sub_resource type="LabelSettings" id="LabelSettings_lxkq5"] font_size = 10 diff --git a/scenes/level components/field_controller.tscn b/scenes/level components/field_controller.tscn index fb618b5..761ef55 100644 --- a/scenes/level components/field_controller.tscn +++ b/scenes/level components/field_controller.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=7 format=3 uid="uid://devn21c7luf45"] [ext_resource type="Shader" uid="uid://mt7vheq5modk" path="res://assets/shaders/greyscale.gdshader" id="1_d73yj"] -[ext_resource type="Script" uid="uid://bj7rw2f6qu1lg" path="res://scripts/components/level/PlantField.cs" id="2_84bqh"] +[ext_resource type="Script" uid="uid://bj7rw2f6qu1lg" path="res://scripts/level/PlantField.cs" id="2_84bqh"] [ext_resource type="PackedScene" uid="uid://b4lx8adw6rbqs" path="res://scenes/particles/dirt_explosion.tscn" id="3_ddnu6"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="4_w40vd"] [ext_resource type="AudioStream" uid="uid://ciepttpel6dxb" path="res://assets/audio/gui/plant_generic.tres" id="5_2x1ty"] diff --git a/scenes/level components/left_boundary_marker.tscn b/scenes/level components/left_boundary_marker.tscn index 8d32bbd..a422037 100644 --- a/scenes/level components/left_boundary_marker.tscn +++ b/scenes/level components/left_boundary_marker.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://plc2gus4ppds"] -[ext_resource type="Script" uid="uid://d2dq6f0bk7pfx" path="res://scripts/components/level/LeftBoundaryMarker.cs" id="1_q4xoc"] +[ext_resource type="Script" uid="uid://d2dq6f0bk7pfx" path="res://scripts/level/LeftBoundaryMarker.cs" id="1_q4xoc"] [node name="LeftBoundaryMarker" type="Marker2D"] script = ExtResource("1_q4xoc") diff --git a/scenes/level components/pools.tscn b/scenes/level components/pools.tscn index 8628f2a..2bc2d59 100644 --- a/scenes/level components/pools.tscn +++ b/scenes/level components/pools.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://cg8713v6c5w15"] -[ext_resource type="Script" uid="uid://bso32xkw738sy" path="res://scripts/components/level/PoolContainer.cs" id="1_31ggc"] +[ext_resource type="Script" uid="uid://bso32xkw738sy" path="res://scripts/level/PoolContainer.cs" id="1_31ggc"] [node name="Pools" type="Node2D" node_paths=PackedStringArray("Zombies", "Plants", "Projectiles", "Structures", "Particles")] script = ExtResource("1_31ggc") diff --git a/scenes/level components/right_boundary_marker.tscn b/scenes/level components/right_boundary_marker.tscn index 72bc133..ed4b5a8 100644 --- a/scenes/level components/right_boundary_marker.tscn +++ b/scenes/level components/right_boundary_marker.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://jm7wm08d2mi7"] -[ext_resource type="Script" uid="uid://bymylx25skfot" path="res://scripts/components/level/RightBoundaryMarker.cs" id="1_cf1wn"] +[ext_resource type="Script" uid="uid://bymylx25skfot" path="res://scripts/level/RightBoundaryMarker.cs" id="1_cf1wn"] [node name="right_boundary_marker" type="Marker2D"] script = ExtResource("1_cf1wn") diff --git a/scenes/main_menu.tscn b/scenes/main_menu.tscn index 060e4ad..bb3cd30 100644 --- a/scenes/main_menu.tscn +++ b/scenes/main_menu.tscn @@ -1,11 +1,12 @@ -[gd_scene load_steps=16 format=3 uid="uid://bfstrli64u23y"] +[gd_scene load_steps=18 format=3 uid="uid://bfstrli64u23y"] [ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="1_jk1qb"] -[ext_resource type="Script" uid="uid://drru785m4eep" path="res://scripts/components/gui/main_menu_rich_text.gd" id="2_5dd4i"] -[ext_resource type="Script" uid="uid://dgevhrbucpwrs" path="res://scripts/components/gui/prototype_window.gd" id="2_lgwnu"] +[ext_resource type="Script" uid="uid://drru785m4eep" path="res://scripts/gui/main_menu_rich_text.gd" id="2_5dd4i"] +[ext_resource type="Script" uid="uid://cghu4i3bnyavg" path="res://scripts/gui/PrototypeWindow.cs" id="2_flqon"] [ext_resource type="Texture2D" uid="uid://c37pvdhol2x02" path="res://assets/sprites/menu_bg.png" id="3_lgwnu"] [ext_resource type="Theme" uid="uid://btulhvgwclket" path="res://resources/themes/MainMenu.tres" id="4_flqon"] -[ext_resource type="Script" uid="uid://c06k4k3ww48ev" path="res://scripts/components/gui/menu_buttons.gd" id="5_rcqid"] +[ext_resource type="Texture2D" uid="uid://cfgkauyw7qful" path="res://assets/sprites/vertical_logo.png" id="5_1ajci"] +[ext_resource type="Script" uid="uid://c06k4k3ww48ev" path="res://scripts/gui/menu_buttons.gd" id="5_rcqid"] [ext_resource type="Script" uid="uid://6e8n6kc0y11o" path="res://scripts/sacrifice.gd" id="6_1ajci"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="7_7b55j"] [ext_resource type="Texture2D" uid="uid://drydueofrb448" path="res://assets/sprites/gui/almanach/book.tres" id="7_flqon"] @@ -34,6 +35,16 @@ texture_margin_top = 6.0 texture_margin_right = 6.0 texture_margin_bottom = 6.0 +[sub_resource type="GDScript" id="GDScript_flqon"] +resource_name = "version_label" +script/source = "extends Label + + +func _ready() -> void: + text = ProjectSettings.get_setting(\"application/config/version\") + +" + [node name="MainMenu" type="Control"] process_mode = 3 layout_mode = 3 @@ -53,7 +64,7 @@ borderless = true theme_override_styles/panel = SubResource("StyleBoxTexture_jl0ue") ok_button_text = "close" dialog_close_on_escape = false -script = ExtResource("2_lgwnu") +script = ExtResource("2_flqon") [node name="ScrollContainer" type="ScrollContainer" parent="PrototypeWindow"] offset_left = 6.0 @@ -104,6 +115,16 @@ offset_bottom = 40.0 texture = ExtResource("3_lgwnu") metadata/_edit_lock_ = true +[node name="TextureRect" type="TextureRect" parent="."] +layout_mode = 0 +offset_left = 197.0 +offset_top = 181.0 +offset_right = 402.0 +offset_bottom = 248.0 +texture = ExtResource("5_1ajci") +expand_mode = 2 +stretch_mode = 5 + [node name="Buttons" type="Control" parent="."] layout_mode = 1 anchors_preset = 15 @@ -141,6 +162,10 @@ offset_bottom = 235.0 layout_mode = 2 text = "about" +[node name="SplashButton" type="Button" parent="Buttons/InfoButtons"] +layout_mode = 2 +text = "splash" + [node name="AlmanachButton" type="Button" parent="Buttons/InfoButtons"] layout_mode = 2 icon = ExtResource("7_flqon") @@ -178,10 +203,26 @@ bus = &"MusicBus" visible = false layout_mode = 1 +[node name="VersionLabel" type="Label" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.823 +anchor_top = 0.957 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 0.199982 +offset_top = 0.199982 +grow_horizontal = 0 +grow_vertical = 0 +horizontal_alignment = 2 +vertical_alignment = 1 +script = SubResource("GDScript_flqon") + [connection signal="meta_clicked" from="PrototypeWindow/ScrollContainer/PrototypeNotification" to="PrototypeWindow/ScrollContainer/PrototypeNotification" method="_on_meta_clicked"] [connection signal="pressed" from="Buttons/GameButtons/PlayButton" to="Buttons" method="_on_play_button_pressed"] [connection signal="pressed" from="Buttons/GameButtons/ExitButton" to="Buttons" method="_on_exit_button_pressed"] [connection signal="pressed" from="Buttons/InfoButtons/AboutButton" to="Buttons" method="_on_button_pressed"] +[connection signal="pressed" from="Buttons/InfoButtons/SplashButton" to="Buttons" method="_on_splash_button_pressed"] [connection signal="pressed" from="Buttons/InfoButtons/AlmanachButton" to="Buttons" method="_on_almanach_button_pressed"] [connection signal="close_requested" from="Buttons/SACRIFICE/CONFIRM" to="Buttons/SACRIFICE" method="_on_confirm_close_requested"] [connection signal="confirmed" from="Buttons/SACRIFICE/CONFIRM" to="Buttons/SACRIFICE" method="_on_confirm_confirmed"] diff --git a/scenes/particles/dirt_explosion.tscn b/scenes/particles/dirt_explosion.tscn index 5b23109..15208c7 100644 --- a/scenes/particles/dirt_explosion.tscn +++ b/scenes/particles/dirt_explosion.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=9 format=3 uid="uid://b4lx8adw6rbqs"] [ext_resource type="Texture2D" uid="uid://d3673b2idj18b" path="res://assets/sprites/particles/dirt1.tres" id="1_nc6dt"] -[ext_resource type="Script" uid="uid://dxcd70o6aa7pr" path="res://scripts/components/particles/StandardParticles.cs" id="1_o2lv2"] +[ext_resource type="Script" uid="uid://dxcd70o6aa7pr" path="res://scripts/particles/StandardParticles.cs" id="1_o2lv2"] [ext_resource type="Material" uid="uid://dmpscw60bfrj" path="res://assets/sprites/particles/dirt_material.tres" id="2_o2lv2"] [ext_resource type="Texture2D" uid="uid://bs8cll4gtgwr1" path="res://assets/sprites/particles/dirt2.tres" id="3_0gemy"] [ext_resource type="Texture2D" uid="uid://0tja7r7yp1ht" path="res://assets/sprites/particles/dirt3.tres" id="4_ihbjc"] diff --git a/scenes/particles/pea_particles.tscn b/scenes/particles/pea_particles.tscn index 9691f8a..456b56d 100644 --- a/scenes/particles/pea_particles.tscn +++ b/scenes/particles/pea_particles.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=6 format=3 uid="uid://1d33w4ubtury"] -[ext_resource type="Script" uid="uid://dxcd70o6aa7pr" path="res://scripts/components/particles/StandardParticles.cs" id="1_rhijc"] +[ext_resource type="Script" uid="uid://dxcd70o6aa7pr" path="res://scripts/particles/StandardParticles.cs" id="1_rhijc"] [ext_resource type="Texture2D" uid="uid://d1ovwgd03fxx5" path="res://assets/sprites/particles/pea_fragment1.tres" id="1_wg12m"] [ext_resource type="Material" uid="uid://0sf0uy1dkxb6" path="res://assets/sprites/particles/pea_material.tres" id="2_rhijc"] [ext_resource type="Texture2D" uid="uid://bmig582h4s38v" path="res://assets/sprites/particles/pea_fragment2.tres" id="3_yroe6"] diff --git a/scenes/projectiles/cucumber_projectile.tscn b/scenes/projectiles/cucumber_projectile.tscn new file mode 100644 index 0000000..b314338 --- /dev/null +++ b/scenes/projectiles/cucumber_projectile.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=3 format=3 uid="uid://c1ig40gtdcb60"] + +[ext_resource type="PackedScene" uid="uid://pf8sq0bk3epn" path="res://scenes/projectiles/cucumber_projectile_part.tscn" id="1_3auks"] + +[sub_resource type="GDScript" id="GDScript_3auks"] +resource_name = "cucumber" +script/source = "extends Node2D + + +func _ready() -> void: + await get_tree().process_frame + get_child(0).reparent(get_parent()) + get_child(0).reparent(get_parent()) + queue_free() +" + +[node name="CucumberProjectileScene" type="Node2D"] +script = SubResource("GDScript_3auks") + +[node name="CucumberProjectile" parent="." instance=ExtResource("1_3auks")] +rotation = 1.5708 + +[node name="CucumberProjectile2" parent="." instance=ExtResource("1_3auks")] +rotation = 4.71239 diff --git a/scenes/projectiles/cucumber_projectile.tscn7043679061.tmp b/scenes/projectiles/cucumber_projectile.tscn7043679061.tmp new file mode 100644 index 0000000..1e23782 --- /dev/null +++ b/scenes/projectiles/cucumber_projectile.tscn7043679061.tmp @@ -0,0 +1,24 @@ +[gd_scene load_steps=3 format=3 uid="uid://c1ig40gtdcb60"] + +[ext_resource type="PackedScene" uid="uid://pf8sq0bk3epn" path="res://scenes/projectiles/cucumber_projectile_part.tscn" id="1_3auks"] + +[sub_resource type="GDScript" id="GDScript_3auks"] +resource_name = "cucumber" +script/source = "extends Node2D + + +func _ready() -> void: + pass + #get_child(0).reparent(get_parent()) + #get_child(0).reparent(get_parent()) + #queue_free() +" + +[node name="CucumberProjectileScene" type="Node2D"] +script = SubResource("GDScript_3auks") + +[node name="CucumberProjectile" parent="." instance=ExtResource("1_3auks")] +rotation = 1.5708 + +[node name="CucumberProjectile2" parent="." instance=ExtResource("1_3auks")] +rotation = 4.71239 diff --git a/scenes/projectiles/cucumber_projectile_part.tscn b/scenes/projectiles/cucumber_projectile_part.tscn new file mode 100644 index 0000000..82ef8af --- /dev/null +++ b/scenes/projectiles/cucumber_projectile_part.tscn @@ -0,0 +1,22 @@ +[gd_scene load_steps=5 format=3 uid="uid://pf8sq0bk3epn"] + +[ext_resource type="PackedScene" uid="uid://b2hrv0aqbui7u" path="res://scenes/projectiles/pea.tscn" id="1_iyfw1"] +[ext_resource type="Texture2D" uid="uid://c68mrfs4wb81x" path="res://assets/sprites/atlases/atlas2.png" id="2_12o6v"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_h74iy"] +atlas = ExtResource("2_12o6v") +region = Rect2(24, 88, 7, 13) + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_iyfw1"] +radius = 6.0 +height = 24.0 + +[node name="CucumberProjectile" instance=ExtResource("1_iyfw1")] +_damage = 40 + +[node name="Sprite" parent="." index="0"] +rotation = -1.5708 +texture = SubResource("AtlasTexture_h74iy") + +[node name="CollisionShape2D" parent="." index="1"] +shape = SubResource("CapsuleShape2D_iyfw1") diff --git a/scenes/projectiles/pea.tscn b/scenes/projectiles/pea.tscn index 123dd6f..2b2fb92 100644 --- a/scenes/projectiles/pea.tscn +++ b/scenes/projectiles/pea.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=5 format=3 uid="uid://b2hrv0aqbui7u"] -[ext_resource type="Script" uid="uid://dxlwvwy3hj56x" path="res://scripts/components/LinearProjectile.cs" id="1_3kc4s"] +[ext_resource type="Script" uid="uid://dxlwvwy3hj56x" path="res://scripts/LinearProjectile.cs" id="1_3kc4s"] [ext_resource type="Texture2D" uid="uid://dq0mul65hevtt" path="res://assets/sprites/plants/pea.tres" id="2_26q5x"] [ext_resource type="PackedScene" uid="uid://1d33w4ubtury" path="res://scenes/particles/pea_particles.tscn" id="2_osqrk"] diff --git a/scenes/projectiles/snowpea_projectile.tscn b/scenes/projectiles/snowpea_projectile.tscn index bfde097..e46f67a 100644 --- a/scenes/projectiles/snowpea_projectile.tscn +++ b/scenes/projectiles/snowpea_projectile.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=9 format=3 uid="uid://domeukw4ucmyr"] -[ext_resource type="Script" uid="uid://dxlwvwy3hj56x" path="res://scripts/components/LinearProjectile.cs" id="1_fkydi"] +[ext_resource type="Script" uid="uid://dxlwvwy3hj56x" path="res://scripts/LinearProjectile.cs" id="1_fkydi"] [ext_resource type="Resource" uid="uid://7uj0oe656jfx" path="res://resources/effects/SnowSlow.tres" id="2_fn62x"] [ext_resource type="Texture2D" uid="uid://dn4l67snkx5mr" path="res://assets/sprites/plants/snowpea_projectile.tres" id="2_xt8td"] [ext_resource type="PackedScene" uid="uid://cijchi3f01q2t" path="res://scenes/particles/snow_pea_particles.tscn" id="3_t6hp0"] diff --git a/scenes/prototype_survival.tscn b/scenes/prototype_survival.tscn index 24ba82e..da65065 100644 --- a/scenes/prototype_survival.tscn +++ b/scenes/prototype_survival.tscn @@ -1,29 +1,41 @@ -[gd_scene load_steps=33 format=3 uid="uid://c1335fke4thpm"] +[gd_scene load_steps=34 format=3 uid="uid://c1335fke4thpm"] -[ext_resource type="Script" uid="uid://bndu1h5kgcde8" path="res://scripts/components/level/RuntimeLevelData.cs" id="1_tnxdx"] +[ext_resource type="Script" uid="uid://bndu1h5kgcde8" path="res://scripts/level/RuntimeLevelData.cs" id="1_tnxdx"] [ext_resource type="Texture2D" uid="uid://b0tb2hjum40aw" path="res://assets/sprites/background_summer.png" id="1_vafkg"] -[ext_resource type="Script" uid="uid://bso32xkw738sy" path="res://scripts/components/level/PoolContainer.cs" id="3_6128b"] +[ext_resource type="Script" uid="uid://bso32xkw738sy" path="res://scripts/level/PoolContainer.cs" id="3_6128b"] [ext_resource type="PackedScene" uid="uid://devn21c7luf45" path="res://scenes/level components/field_controller.tscn" id="4_ibntj"] [ext_resource type="PackedScene" uid="uid://cfnmspei3k4p7" path="res://scenes/gui/runtime_gui.tscn" id="5_iotae"] [ext_resource type="PackedScene" uid="uid://dpxxjfd5lv5sv" path="res://scenes/gui/choose_your_seeds.tscn" id="6_btfw3"] [ext_resource type="PackedScene" uid="uid://fm471x22n8kr" path="res://scenes/gui/pause_menu.tscn" id="7_3ghv7"] -[ext_resource type="Script" uid="uid://cslqjdd5wq4rc" path="res://scripts/components/level/SunSpawner.cs" id="7_gnb05"] +[ext_resource type="Script" uid="uid://cslqjdd5wq4rc" path="res://scripts/level/SunSpawner.cs" id="7_gnb05"] [ext_resource type="PackedScene" uid="uid://bpekho7leatr5" path="res://scenes/sun.tscn" id="8_8nyym"] [ext_resource type="Texture2D" uid="uid://bt0slphfqhhab" path="res://assets/sprites/atlases/brain.tres" id="8_h1ksq"] -[ext_resource type="Script" uid="uid://bsuw5lvnr3kol" path="res://scripts/components/level/zombe_spawners/ZombieSequencer.cs" id="9_8nyym"] +[ext_resource type="Script" uid="uid://bsuw5lvnr3kol" path="res://scripts/level/zombe_spawners/ZombieSequencer.cs" id="9_8nyym"] [ext_resource type="Texture2D" uid="uid://dvldjlg0nr355" path="res://assets/sprites/atlases/atlas1.png" id="9_jmik4"] [ext_resource type="PackedScene" uid="uid://jm7wm08d2mi7" path="res://scenes/level components/right_boundary_marker.tscn" id="9_q2l3d"] -[ext_resource type="Script" uid="uid://nkb6i7lrkl8y" path="res://scripts/components/level/zombe_spawners/SurvivalZombieSpawner.cs" id="10_1kjp6"] -[ext_resource type="Script" uid="uid://btqwxelqxheh3" path="res://scripts/components/gui/RestartButton.cs" id="10_4il7a"] +[ext_resource type="Script" uid="uid://nkb6i7lrkl8y" path="res://scripts/level/zombe_spawners/SurvivalZombieSpawner.cs" id="10_1kjp6"] +[ext_resource type="Script" uid="uid://btqwxelqxheh3" path="res://scripts/gui/RestartButton.cs" id="10_4il7a"] [ext_resource type="PackedScene" uid="uid://plc2gus4ppds" path="res://scenes/level components/left_boundary_marker.tscn" id="10_5h8lk"] -[ext_resource type="Script" uid="uid://dpdpv2oyxdna7" path="res://scripts/components/gui/ExitButton.cs" id="11_q1dn6"] +[ext_resource type="Script" uid="uid://dpdpv2oyxdna7" path="res://scripts/gui/ExitButton.cs" id="11_q1dn6"] [ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="12_4il7a"] -[ext_resource type="Script" uid="uid://blpu7t8tf6277" path="res://scripts/components/particles/FallFloor.cs" id="13_5h8lk"] +[ext_resource type="Script" uid="uid://blpu7t8tf6277" path="res://scripts/particles/FallFloor.cs" id="13_5h8lk"] [ext_resource type="AudioStream" uid="uid://bdx83fokp6kha" path="res://assets/audio/sfx/buttonclick.mp3" id="13_q1dn6"] -[ext_resource type="Script" uid="uid://c0ov2bq5er0gh" path="res://scripts/components/plants/LoseZone.cs" id="16_r81g1"] -[ext_resource type="Script" uid="uid://812ldoyxd5n5" path="res://scripts/components/level/LoseCheckbox.cs" id="17_pb02i"] +[ext_resource type="Script" uid="uid://c0ov2bq5er0gh" path="res://scripts/plants/LoseZone.cs" id="16_r81g1"] +[ext_resource type="Script" uid="uid://812ldoyxd5n5" path="res://scripts/level/LoseCheckbox.cs" id="17_pb02i"] [ext_resource type="AudioStream" uid="uid://bxshjvvtv3fmp" path="res://assets/audio/music/playlist.tres" id="23_tsy2s"] +[sub_resource type="GDScript" id="GDScript_tsy2s"] +resource_name = "time_label" +script/source = "extends Label + +var time : float = 0 + +func _process(delta: float) -> void: + time += delta + var itime = int(time) + text = \"%02d:%02d:%02d\" % [itime / 3600 ,itime / 60 % 60,itime % 60] +" + [sub_resource type="Animation" id="Animation_r81g1"] length = 0.001 tracks/0/type = "value" @@ -182,7 +194,7 @@ size = Vector2(282, 399) [node name="Data" type="Node" parent="."] script = ExtResource("1_tnxdx") -SunCount = 50 +SunCount = 50.0 [node name="Camera2D" type="Camera2D" parent="."] position = Vector2(481, 200) @@ -244,6 +256,18 @@ metadata/_edit_lock_ = true [node name="PauseMenu" parent="GUI" instance=ExtResource("7_3ghv7")] visible = false +[node name="TimeLabel" type="Label" parent="GUI"] +anchors_preset = 3 +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -40.0 +offset_top = -17.0 +grow_horizontal = 0 +grow_vertical = 0 +script = SubResource("GDScript_tsy2s") + [node name="GameOverScreen" type="CanvasLayer" parent="."] process_mode = 3 layer = 11 @@ -341,8 +365,8 @@ autostart = true [node name="SurvivalAI" type="Node" parent="."] script = ExtResource("10_1kjp6") -supportPool = Array[String](["hobo"]) -tankPool = Array[String](["conehead", "buckethead", "hobo"]) +supportPool = Array[String](["hobo", "door_zombie"]) +tankPool = Array[String](["conehead", "buckethead", "hobo", "door_zombie"]) hordePool = Array[String](["basic", "conehead", "buckethead"]) velocity_curve = SubResource("Curve_1kjp6") diff --git a/scenes/sacrifice.tscn b/scenes/sacrifice.tscn index 0a2c43d..652cddc 100644 --- a/scenes/sacrifice.tscn +++ b/scenes/sacrifice.tscn @@ -1,9 +1,9 @@ -[gd_scene load_steps=13 format=3 uid="uid://d2ut237hxscbo"] +[gd_scene load_steps=12 format=3 uid="uid://d2ut237hxscbo"] [ext_resource type="Texture2D" uid="uid://3m6opnieiyr2" path="res://assets/sprites/golden_bg.png" id="1_tsh0d"] [ext_resource type="Shader" uid="uid://d0rylce8i5xtg" path="res://assets/shaders/SACRIFICE.gdshader" id="2_b8skw"] -[ext_resource type="AudioStream" uid="uid://dwr53ucg07nla" path="res://assets/audio/music/Oliver Buckland - Dead God Graveyard .mp3" id="2_bijdt"] [ext_resource type="Texture2D" uid="uid://dfmi4cgn6hmsj" path="res://assets/sprites/gold.png" id="3_1ybnd"] +[ext_resource type="AudioStream" uid="uid://lshrnpdrhh77" path="res://assets/audio/music/Смешарики - 194. Метеоритный дождь.mp3" id="4_b8skw"] [sub_resource type="Gradient" id="Gradient_b8skw"] colors = PackedColorArray(0, 0, 0, 0, 1, 1, 1, 1) @@ -21,10 +21,6 @@ noise = SubResource("FastNoiseLite_1ybnd") shader = ExtResource("2_b8skw") shader_parameter/noise = SubResource("NoiseTexture2D_yu0ma") -[sub_resource type="AudioStreamPlaylist" id="AudioStreamPlaylist_7l6qq"] -stream_count = 1 -stream_0 = ExtResource("2_bijdt") - [sub_resource type="Animation" id="Animation_1ybnd"] length = 0.001 tracks/0/type = "value" @@ -78,7 +74,7 @@ offset_bottom = 40.0 texture = ExtResource("3_1ybnd") [node name="Musicale" type="AudioStreamPlayer" parent="."] -stream = SubResource("AudioStreamPlaylist_7l6qq") +stream = ExtResource("4_b8skw") autoplay = true [node name="AnimationPlayer" type="AnimationPlayer" parent="."] diff --git a/scenes/templates/level_template.tscn b/scenes/templates/level_template.tscn index ffd26b6..f8f31e3 100644 --- a/scenes/templates/level_template.tscn +++ b/scenes/templates/level_template.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=6 format=3 uid="uid://dd3yegl1xo44m"] -[ext_resource type="Script" path="res://scripts/components/level/RuntimeLevelData.cs" id="1_31ltw"] +[ext_resource type="Script" uid="uid://bndu1h5kgcde8" path="res://scripts/level/RuntimeLevelData.cs" id="1_31ltw"] [ext_resource type="PackedScene" uid="uid://devn21c7luf45" path="res://scenes/level components/field_controller.tscn" id="2_w4oj7"] [ext_resource type="PackedScene" uid="uid://cg8713v6c5w15" path="res://scenes/level components/pools.tscn" id="3_r1g7l"] [ext_resource type="PackedScene" uid="uid://dpxxjfd5lv5sv" path="res://scenes/gui/choose_your_seeds.tscn" id="3_xy2c6"] diff --git a/scenes/templates/plant_template.tscn b/scenes/templates/plant_template.tscn index 6404adc..ea600b6 100644 --- a/scenes/templates/plant_template.tscn +++ b/scenes/templates/plant_template.tscn @@ -1,10 +1,12 @@ [gd_scene load_steps=3 format=3 uid="uid://b1hjjbdwf1rtc"] -[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/components/plants/RuntimePlantData.cs" id="1_324sd"] -[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/components/TimeScalableAnimationTree.cs" id="2_e75pf"] +[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/plants/RuntimePlantData.cs" id="1_324sd"] +[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="2_e75pf"] -[node name="PlantTemplate" type="Node2D"] +[node name="PlantTemplate" type="Node2D" node_paths=PackedStringArray("_player", "_tree")] script = ExtResource("1_324sd") +_player = NodePath("AnimationPlayer") +_tree = NodePath("AnimationTree") [node name="Sprite2D" type="Sprite2D" parent="."] use_parent_material = true diff --git a/scripts/components/Armor.cs b/scripts/Armor.cs similarity index 97% rename from scripts/components/Armor.cs rename to scripts/Armor.cs index 7e8ba22..7c1d710 100644 --- a/scripts/components/Armor.cs +++ b/scripts/Armor.cs @@ -12,7 +12,7 @@ public partial class Armor : Node [Export] public float MaxHP { get; private set; } - private float _hp; + public float _hp; private bool _lost = false; public override void _Ready() diff --git a/scripts/components/Armor.cs.uid b/scripts/Armor.cs.uid similarity index 100% rename from scripts/components/Armor.cs.uid rename to scripts/Armor.cs.uid diff --git a/scripts/ArmorHPObserver.cs b/scripts/ArmorHPObserver.cs new file mode 100644 index 0000000..59d1445 --- /dev/null +++ b/scripts/ArmorHPObserver.cs @@ -0,0 +1,32 @@ +using Godot; + +namespace Newlon.Components; + +public partial class ArmorHPObserver : Node +{ + [Export] private float _threshold = 0.5f; + [Export] private bool _setGreater = false; + [Export] private Armor _observedArmor; + [Signal] public delegate void ThresholdReachedEventHandler(); + + public override void _Ready() + { + _observedArmor.ArmorDamaged += OnHPChanged; + } + + private void OnHPChanged(float delta) + { + if (_setGreater == false && _observedArmor._hp / _observedArmor.MaxHP < _threshold) + { + EmitSignal(SignalName.ThresholdReached); + _observedArmor.ArmorDamaged -= OnHPChanged; + QueueFree(); + } + else if (_setGreater && _observedArmor._hp / _observedArmor.MaxHP > _threshold) + { + EmitSignal(SignalName.ThresholdReached); + _observedArmor.ArmorDamaged -= OnHPChanged; + QueueFree(); + } + } +} diff --git a/scripts/ArmorHPObserver.cs.uid b/scripts/ArmorHPObserver.cs.uid new file mode 100644 index 0000000..c1f6b50 --- /dev/null +++ b/scripts/ArmorHPObserver.cs.uid @@ -0,0 +1 @@ +uid://d3l8e8ko5r5i3 diff --git a/scripts/components/DegradingSprite.cs b/scripts/DegradingSprite.cs similarity index 100% rename from scripts/components/DegradingSprite.cs rename to scripts/DegradingSprite.cs diff --git a/scripts/components/DegradingSprite.cs.uid b/scripts/DegradingSprite.cs.uid similarity index 100% rename from scripts/components/DegradingSprite.cs.uid rename to scripts/DegradingSprite.cs.uid diff --git a/scripts/components/Entity.cs b/scripts/Entity.cs similarity index 83% rename from scripts/components/Entity.cs rename to scripts/Entity.cs index 01e4254..eac10c9 100644 --- a/scripts/components/Entity.cs +++ b/scripts/Entity.cs @@ -10,7 +10,7 @@ public partial class Entity : Node2D #region Health points [Export] public float MaxHP; public float HP; - [Signal] public delegate void OnHPChangedEventHandler(int deltaHP, Node origin); + [Signal] public delegate void OnHPChangedEventHandler(float deltaHP, Node origin); [Signal] public delegate void OnDamagedEventHandler(); public virtual void TakeDamage(float amount, Node origin) @@ -28,6 +28,7 @@ public partial class Entity : Node2D { EmitSignal(SignalName.OnHPChanged, amount, origin); HP += amount; + if (HP > MaxHP) HP = MaxHP; } public virtual void KillByDamage() @@ -43,22 +44,29 @@ public partial class Entity : Node2D #endregion #region Brain + [Export] private AnimationPlayer _player; + [Export] private AnimationTree _tree; public virtual void DisableBrain() { - GetNode("AnimationPlayer").ProcessMode = ProcessModeEnum.Always; - GetNode("AnimationTree").ProcessMode = ProcessModeEnum.Always; + if (_player != null) + _player.ProcessMode = ProcessModeEnum.Always; + if (_tree != null) + _tree.ProcessMode = ProcessModeEnum.Always; ProcessMode = ProcessModeEnum.Disabled; } public virtual void EnableBrain() { - GetNode("AnimationPlayer").ProcessMode = ProcessModeEnum.Inherit; - GetNode("AnimationTree").ProcessMode = ProcessModeEnum.Inherit; + if (_player != null) + _player.ProcessMode = ProcessModeEnum.Inherit; + if (_tree != null) + _tree.ProcessMode = ProcessModeEnum.Inherit; ProcessMode = ProcessModeEnum.Inherit; } #endregion #region Effects [Export] private Array _effectImmunities = new(); + [Export] private bool completeInvulnerability = false; private readonly Dictionary _activeEffectSlots = new(); private readonly Dictionary _effectSlotTimers = new(); @@ -69,7 +77,7 @@ public partial class Entity : Node2D public virtual void GiveEffect(Effect what) { - if (_effectImmunities.Contains(what)) + if (_effectImmunities.Contains(what) || completeInvulnerability) { return; } diff --git a/scripts/components/Entity.cs.uid b/scripts/Entity.cs.uid similarity index 100% rename from scripts/components/Entity.cs.uid rename to scripts/Entity.cs.uid diff --git a/scripts/EntityHPObserver.cs b/scripts/EntityHPObserver.cs new file mode 100644 index 0000000..4914dc5 --- /dev/null +++ b/scripts/EntityHPObserver.cs @@ -0,0 +1,32 @@ +using Godot; + +namespace Newlon.Components; + +public partial class EntityHPObserver : Node +{ + [Export] private float _threshold = 0.5f; + [Export] private bool _setGreater = false; + [Export] private Entity _observedEntity; + [Signal] public delegate void ThresholdReachedEventHandler(); + + public override void _Ready() + { + _observedEntity.OnHPChanged += OnHPChanged; + } + + private void OnHPChanged(float delta, Node origin) + { + if (_setGreater == false && _observedEntity.HP / _observedEntity.MaxHP < _threshold) + { + EmitSignal(SignalName.ThresholdReached); + _observedEntity.OnHPChanged -= OnHPChanged; + QueueFree(); + } + else if (_setGreater && _observedEntity.HP / _observedEntity.MaxHP > _threshold) + { + EmitSignal(SignalName.ThresholdReached); + _observedEntity.OnHPChanged -= OnHPChanged; + QueueFree(); + } + } +} diff --git a/scripts/EntityHPObserver.cs.uid b/scripts/EntityHPObserver.cs.uid new file mode 100644 index 0000000..11c1d76 --- /dev/null +++ b/scripts/EntityHPObserver.cs.uid @@ -0,0 +1 @@ +uid://dau0tfmlfiqmo diff --git a/scripts/components/FlashComponent.cs b/scripts/FlashComponent.cs similarity index 100% rename from scripts/components/FlashComponent.cs rename to scripts/FlashComponent.cs diff --git a/scripts/components/FlashComponent.cs.uid b/scripts/FlashComponent.cs.uid similarity index 100% rename from scripts/components/FlashComponent.cs.uid rename to scripts/FlashComponent.cs.uid diff --git a/scripts/components/IProjectile.cs b/scripts/IProjectile.cs similarity index 100% rename from scripts/components/IProjectile.cs rename to scripts/IProjectile.cs diff --git a/scripts/components/IProjectile.cs.uid b/scripts/IProjectile.cs.uid similarity index 100% rename from scripts/components/IProjectile.cs.uid rename to scripts/IProjectile.cs.uid diff --git a/scripts/components/LevelGUIElements.cs b/scripts/LevelGUIElements.cs similarity index 100% rename from scripts/components/LevelGUIElements.cs rename to scripts/LevelGUIElements.cs diff --git a/scripts/components/LevelGUIElements.cs.uid b/scripts/LevelGUIElements.cs.uid similarity index 100% rename from scripts/components/LevelGUIElements.cs.uid rename to scripts/LevelGUIElements.cs.uid diff --git a/scripts/components/LinearProjectile.cs b/scripts/LinearProjectile.cs similarity index 91% rename from scripts/components/LinearProjectile.cs rename to scripts/LinearProjectile.cs index f9ad5c0..6aefbf7 100644 --- a/scripts/components/LinearProjectile.cs +++ b/scripts/LinearProjectile.cs @@ -25,7 +25,7 @@ public partial class LinearProjectile : Area2D, IProjectile public override void _PhysicsProcess(double delta) { - Translate(Vector2.Right * _speed * (float)delta * Utility.TileWidth); + Translate(Transform.X * _speed * (float)delta * Utility.TileWidth); } public void OnAreaEntered(Area2D area) @@ -39,7 +39,7 @@ public partial class LinearProjectile : Area2D, IProjectile if (_impactEffect != null) entity.GiveEffect(_impactEffect); - PoolContainer.Instance.SpawnParticles(particles, GlobalPosition); + PoolContainer.Instance.SpawnParticles(particles, GlobalTransform); QueueFree(); } diff --git a/scripts/components/LinearProjectile.cs.uid b/scripts/LinearProjectile.cs.uid similarity index 100% rename from scripts/components/LinearProjectile.cs.uid rename to scripts/LinearProjectile.cs.uid diff --git a/scripts/SettingsSerializer.cs b/scripts/SettingsSerializer.cs new file mode 100644 index 0000000..35b7caa --- /dev/null +++ b/scripts/SettingsSerializer.cs @@ -0,0 +1,43 @@ +using Godot; +using Newlon; +using System; + +public partial class SettingsSerializer : Node +{ + const string CFG_PATH = "user://config.cfg"; + public override void _EnterTree() + { + GetTree().AutoAcceptQuit = false; + if (FileAccess.FileExists(CFG_PATH) == false) return; + + var access = FileAccess.Open(CFG_PATH, FileAccess.ModeFlags.Read); + + Utility.SFX = float.Parse(access.GetLine().Split(" ")[1]); + Utility.Music = float.Parse(access.GetLine().Split(" ")[1]); + Utility.Splash = bool.Parse(access.GetLine().Split(" ")[1]); + + AudioServer.SetBusVolumeDb(0, Mathf.LinearToDb((float)Utility.SFX)); + AudioServer.SetBusVolumeDb(1, Mathf.LinearToDb((float)Utility.Music)); + + access.Close(); + } + public override void _ExitTree() + { + var access = FileAccess.Open(CFG_PATH, FileAccess.ModeFlags.Write); + access.Resize(0); + access.StoreString(string.Format("SFX {0}\nMusic {1}\nSplash {2}\n", Utility.SFX,Utility.Music,Utility.Splash)); + + access.Close(); + } + + public override void _Notification(int what) + { + if (what == NotificationWMCloseRequest) + { + _ExitTree(); + GetTree().Quit(); + } + } + + +} diff --git a/scripts/SettingsSerializer.cs.uid b/scripts/SettingsSerializer.cs.uid new file mode 100644 index 0000000..2b68752 --- /dev/null +++ b/scripts/SettingsSerializer.cs.uid @@ -0,0 +1 @@ +uid://bflvotmed7jfy diff --git a/scripts/components/TimeScalableAnimationTree.cs b/scripts/TimeScalableAnimationTree.cs similarity index 100% rename from scripts/components/TimeScalableAnimationTree.cs rename to scripts/TimeScalableAnimationTree.cs diff --git a/scripts/components/TimeScalableAnimationTree.cs.uid b/scripts/TimeScalableAnimationTree.cs.uid similarity index 100% rename from scripts/components/TimeScalableAnimationTree.cs.uid rename to scripts/TimeScalableAnimationTree.cs.uid diff --git a/scripts/components/TimeScalableTimer.cs b/scripts/TimeScalableTimer.cs similarity index 100% rename from scripts/components/TimeScalableTimer.cs rename to scripts/TimeScalableTimer.cs diff --git a/scripts/components/TimeScalableTimer.cs.uid b/scripts/TimeScalableTimer.cs.uid similarity index 100% rename from scripts/components/TimeScalableTimer.cs.uid rename to scripts/TimeScalableTimer.cs.uid diff --git a/scripts/Utility.cs b/scripts/Utility.cs index ae804ac..50a4eab 100644 --- a/scripts/Utility.cs +++ b/scripts/Utility.cs @@ -31,6 +31,7 @@ public class Utility public static double SFX = 1.0f; public static double Music = 1.0f; + public static bool Splash = false; } diff --git a/scripts/ZombieKillHandler.cs b/scripts/ZombieKillHandler.cs new file mode 100644 index 0000000..a0c2351 --- /dev/null +++ b/scripts/ZombieKillHandler.cs @@ -0,0 +1,24 @@ +using Godot; +using Newlon.Components.Zombies; + +public partial class ZombieKillHandler : Node +{ + [Export] private AnimationTree _tree; + [Export] private CollisionShape2D _collider; + private void OnKilled(RuntimeZombieData who) + { + var tween = CreateTween(); + tween.TweenInterval(4.0); + tween.TweenCallback(Callable.From(() => + { + ((AnimationNodeStateMachinePlayback)_tree.Get("parameters/Tree/playback")).Travel("Death"); + _collider.Disabled = true; + })); + tween.TweenInterval(3.0); + tween.TweenProperty(who, "modulate",new Color(1, 1, 1, 0),1.0); + tween.TweenCallback(Callable.From(() => + { + who.Kill(); + })); + } +} diff --git a/scripts/ZombieKillHandler.cs.uid b/scripts/ZombieKillHandler.cs.uid new file mode 100644 index 0000000..a47f9b0 --- /dev/null +++ b/scripts/ZombieKillHandler.cs.uid @@ -0,0 +1 @@ +uid://dk32ln8c2574d diff --git a/scripts/audio/AudioSequencer.cs b/scripts/audio/AudioSequencer.cs index 94056aa..292cda1 100644 --- a/scripts/audio/AudioSequencer.cs +++ b/scripts/audio/AudioSequencer.cs @@ -4,9 +4,9 @@ using Godot.Collections; public partial class AudioSequencer : Node { private static AudioSequencer instance; - private Dictionary channels = []; - private Dictionary channelProcess = []; - private Dictionary channelSettings = []; + [Export]private Dictionary channels = []; + [Export]private Dictionary channelProcess = []; + [Export]private Dictionary channelSettings = []; [Export] private ChannelSettings standardSettings; @@ -32,17 +32,24 @@ public partial class AudioSequencer : Node return instance.channelProcess[id] && instance.channels[id].GetPlaybackPosition() < instance.channelSettings[id].restartTreshold / Engine.TimeScale; } - public static void Play(string id, AudioStream what) + public static void Play(string id, AudioStream what, ChannelSettings settings = null) { if (IsChannelPlaying(id)) return; + if (settings != null) ChangeSettings(id, settings); instance.PlayAtChannel(id, what); } public static void ChangeSettings(string id, ChannelSettings settings) { + if (instance.channels.ContainsKey(id) == false) + { + instance.InitiateChannel(id, settings); + return; + } + if (settings == null) { - instance.InitiateChannel(id, settings); + instance.channelSettings[id] = instance.standardSettings; return; } instance.channelSettings[id] = settings; @@ -56,6 +63,8 @@ public partial class AudioSequencer : Node channels.Add(id, player); channelProcess.Add(id, false); player.Name = id; + player.MaxPolyphony = 5; + player.Bus = "SFXBus"; player.Finished += () => { MarkChannel(id, false); }; diff --git a/scripts/audio/AudioSlider.cs b/scripts/audio/AudioSlider.cs index 6bae9b0..f0e04f2 100644 --- a/scripts/audio/AudioSlider.cs +++ b/scripts/audio/AudioSlider.cs @@ -30,7 +30,7 @@ public partial class AudioSlider : HSlider if (affects == TYPE.SFX) { Utility.SFX = Value; - AudioServer.SetBusVolumeDb(0, Mathf.LinearToDb((float)Value)); + AudioServer.SetBusVolumeDb(2, Mathf.LinearToDb((float)Value)); } else { diff --git a/scripts/components/gui/prototype_window.gd b/scripts/components/gui/prototype_window.gd deleted file mode 100644 index 24cc614..0000000 --- a/scripts/components/gui/prototype_window.gd +++ /dev/null @@ -1,9 +0,0 @@ -extends AcceptDialog - -static var seen = false - -func _ready() -> void: - if seen: - return - seen = true - popup_centered() diff --git a/scripts/components/gui/prototype_window.gd.uid b/scripts/components/gui/prototype_window.gd.uid deleted file mode 100644 index dece4b3..0000000 --- a/scripts/components/gui/prototype_window.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://dgevhrbucpwrs diff --git a/scripts/debug/Cheats.cs b/scripts/debug/Cheats.cs index 6aef97a..71c5794 100644 --- a/scripts/debug/Cheats.cs +++ b/scripts/debug/Cheats.cs @@ -8,6 +8,7 @@ public partial class Cheats : Node { public override void _Input(InputEvent @event) { + if (OS.IsDebugBuild() == false) return; if (@event.IsActionPressed("cheat_add_sun")) { RuntimeLevelData.Instance.AddSun(50); diff --git a/scripts/components/gui/ExitButton.cs b/scripts/gui/ExitButton.cs similarity index 100% rename from scripts/components/gui/ExitButton.cs rename to scripts/gui/ExitButton.cs diff --git a/scripts/components/gui/ExitButton.cs.uid b/scripts/gui/ExitButton.cs.uid similarity index 100% rename from scripts/components/gui/ExitButton.cs.uid rename to scripts/gui/ExitButton.cs.uid diff --git a/scripts/components/gui/FastForwardButton.cs b/scripts/gui/FastForwardButton.cs similarity index 100% rename from scripts/components/gui/FastForwardButton.cs rename to scripts/gui/FastForwardButton.cs diff --git a/scripts/components/gui/FastForwardButton.cs.uid b/scripts/gui/FastForwardButton.cs.uid similarity index 100% rename from scripts/components/gui/FastForwardButton.cs.uid rename to scripts/gui/FastForwardButton.cs.uid diff --git a/scripts/components/gui/PauseButton.cs b/scripts/gui/PauseButton.cs similarity index 100% rename from scripts/components/gui/PauseButton.cs rename to scripts/gui/PauseButton.cs diff --git a/scripts/components/gui/PauseButton.cs.uid b/scripts/gui/PauseButton.cs.uid similarity index 100% rename from scripts/components/gui/PauseButton.cs.uid rename to scripts/gui/PauseButton.cs.uid diff --git a/scripts/components/gui/PauseMenu.cs b/scripts/gui/PauseMenu.cs similarity index 51% rename from scripts/components/gui/PauseMenu.cs rename to scripts/gui/PauseMenu.cs index ffdd32b..4c132f9 100644 --- a/scripts/components/gui/PauseMenu.cs +++ b/scripts/gui/PauseMenu.cs @@ -4,28 +4,41 @@ using System; public partial class PauseMenu : Control { private static PauseMenu Instance; + private bool previousPaused; + private bool currently_paused = false; + private AudioStream pauseSound = ResourceLoader.Load("uid://ckja8ym50y0d4"); public override void _Ready() - { + { Instance = this; - } + } public void Continue() { GetParent().Visible = false; - GetTree().Paused = false; + GetTree().Paused = previousPaused; + currently_paused = false; } public void Restart() { GetTree().Paused = false; GetTree().ReloadCurrentScene(); + currently_paused = false; } public void Exit() { GetTree().ChangeSceneToFile("uid://bfstrli64u23y"); + currently_paused = false; } public static void Pause() { + if (Instance.currently_paused) + { + return; + } Instance.GetParent().Visible = true; + Instance.previousPaused = Instance.GetTree().Paused; Instance.GetTree().Paused = true; + Instance.currently_paused = true; + AudioSequencer.Play("pause",Instance.pauseSound); } } diff --git a/scripts/components/gui/PauseMenu.cs.uid b/scripts/gui/PauseMenu.cs.uid similarity index 100% rename from scripts/components/gui/PauseMenu.cs.uid rename to scripts/gui/PauseMenu.cs.uid diff --git a/scripts/gui/PrototypeWindow.cs b/scripts/gui/PrototypeWindow.cs new file mode 100644 index 0000000..39ba7d9 --- /dev/null +++ b/scripts/gui/PrototypeWindow.cs @@ -0,0 +1,12 @@ +using Godot; +using Newlon; + +public partial class PrototypeWindow : AcceptDialog +{ + public override void _Ready() + { + if (Utility.Splash) return; + Utility.Splash = true; + PopupCentered(); + } +} diff --git a/scripts/gui/PrototypeWindow.cs.uid b/scripts/gui/PrototypeWindow.cs.uid new file mode 100644 index 0000000..3b3182a --- /dev/null +++ b/scripts/gui/PrototypeWindow.cs.uid @@ -0,0 +1 @@ +uid://cghu4i3bnyavg diff --git a/scripts/components/gui/RestartButton.cs b/scripts/gui/RestartButton.cs similarity index 100% rename from scripts/components/gui/RestartButton.cs rename to scripts/gui/RestartButton.cs diff --git a/scripts/components/gui/RestartButton.cs.uid b/scripts/gui/RestartButton.cs.uid similarity index 100% rename from scripts/components/gui/RestartButton.cs.uid rename to scripts/gui/RestartButton.cs.uid diff --git a/scripts/components/gui/ShovelButton.cs b/scripts/gui/ShovelButton.cs similarity index 85% rename from scripts/components/gui/ShovelButton.cs rename to scripts/gui/ShovelButton.cs index b08008a..de04638 100644 --- a/scripts/components/gui/ShovelButton.cs +++ b/scripts/gui/ShovelButton.cs @@ -24,18 +24,22 @@ public partial class ShovelButton : TextureButton { var checkedPosition = (PoolContainer.Instance.Plants.GetGlobalMousePosition() / Utility.Tile).Ceil() * Utility.Tile - new Vector2(20, 14); - for (int i = Utility.LayersCount-1; i >= 0; i--) + for (int i = Utility.LayersCount - 1; i >= 0; i--) { if (PoolContainer.Instance.EntityField[i].TryGetValue(checkedPosition, out var entity) && entity is RuntimePlantData plantData) { plantData.Kill(); - PoolContainer.Instance.SpawnParticles(particles, plantData.GlobalPosition + Vector2.Down * Utility.TileHeight/2.0f); + PoolContainer.Instance.SpawnParticles(particles, plantData.GlobalPosition + Vector2.Down * Utility.TileHeight / 2.0f); break; } } ButtonPressed = false; } + if (@event.IsActionPressed("cancel_plant") && ButtonPressed) + { + ButtonPressed = false; + } } } diff --git a/scripts/components/gui/ShovelButton.cs.uid b/scripts/gui/ShovelButton.cs.uid similarity index 100% rename from scripts/components/gui/ShovelButton.cs.uid rename to scripts/gui/ShovelButton.cs.uid diff --git a/scripts/components/gui/SunCounter.cs b/scripts/gui/SunCounter.cs similarity index 100% rename from scripts/components/gui/SunCounter.cs rename to scripts/gui/SunCounter.cs diff --git a/scripts/components/gui/SunCounter.cs.uid b/scripts/gui/SunCounter.cs.uid similarity index 100% rename from scripts/components/gui/SunCounter.cs.uid rename to scripts/gui/SunCounter.cs.uid diff --git a/scripts/components/gui/SunCounterImage.cs b/scripts/gui/SunCounterImage.cs similarity index 100% rename from scripts/components/gui/SunCounterImage.cs rename to scripts/gui/SunCounterImage.cs diff --git a/scripts/components/gui/SunCounterImage.cs.uid b/scripts/gui/SunCounterImage.cs.uid similarity index 100% rename from scripts/components/gui/SunCounterImage.cs.uid rename to scripts/gui/SunCounterImage.cs.uid diff --git a/scripts/components/gui/VeilResizer.cs b/scripts/gui/VeilResizer.cs similarity index 68% rename from scripts/components/gui/VeilResizer.cs rename to scripts/gui/VeilResizer.cs index 8fa367a..bfad885 100644 --- a/scripts/components/gui/VeilResizer.cs +++ b/scripts/gui/VeilResizer.cs @@ -15,9 +15,6 @@ public partial class VeilResizer : TextureProgressBar public override void _Process(double delta) { - if (seedpacket.Disabled && _referenceTimer.IsStopped()) - Value = 1.0; - else - Value = _referenceTimer.TimeLeft / _referenceTimer.WaitTime; + Value = _referenceTimer.TimeLeft / _referenceTimer.WaitTime; } } diff --git a/scripts/components/gui/VeilResizer.cs.uid b/scripts/gui/VeilResizer.cs.uid similarity index 100% rename from scripts/components/gui/VeilResizer.cs.uid rename to scripts/gui/VeilResizer.cs.uid diff --git a/scripts/components/gui/almanach/AlmanachGrid.cs b/scripts/gui/almanach/AlmanachGrid.cs similarity index 70% rename from scripts/components/gui/almanach/AlmanachGrid.cs rename to scripts/gui/almanach/AlmanachGrid.cs index bc6e3ce..f14ad0b 100644 --- a/scripts/components/gui/almanach/AlmanachGrid.cs +++ b/scripts/gui/almanach/AlmanachGrid.cs @@ -12,7 +12,12 @@ public partial class AlmanachGrid : GridContainer if (_zombies) { - foreach (var resource in GameRegistry.GetZombies()) + var list = GameRegistry.GetZombies(); + list.Sort((a, b) => + { + return a.Order - b.Order; + }); + foreach (var resource in list) { Seedpacket slot = _plantCard.Instantiate(); AddChild(slot); @@ -23,7 +28,12 @@ public partial class AlmanachGrid : GridContainer } else { - foreach (var resource in GameRegistry.GetPlants()) + var list = GameRegistry.GetPlants(); + list.Sort((a, b) => + { + return a.Order - b.Order; + }); + foreach (var resource in list) { Seedpacket slot = _plantCard.Instantiate(); AddChild(slot); diff --git a/scripts/components/gui/almanach/AlmanachGrid.cs.uid b/scripts/gui/almanach/AlmanachGrid.cs.uid similarity index 100% rename from scripts/components/gui/almanach/AlmanachGrid.cs.uid rename to scripts/gui/almanach/AlmanachGrid.cs.uid diff --git a/scripts/components/gui/choose_your_seeds/GridLoader.cs b/scripts/gui/choose_your_seeds/GridLoader.cs similarity index 77% rename from scripts/components/gui/choose_your_seeds/GridLoader.cs rename to scripts/gui/choose_your_seeds/GridLoader.cs index f728588..e818477 100644 --- a/scripts/components/gui/choose_your_seeds/GridLoader.cs +++ b/scripts/gui/choose_your_seeds/GridLoader.cs @@ -12,11 +12,16 @@ public partial class GridLoader : GridContainer { _plantCard = ResourceLoader.Load("res://scenes/gui/seedpacket.tscn"); - foreach(var resource in GameRegistry.GetPlants()) + var list = GameRegistry.GetPlants(); + list.Sort((a, b) => + { + return a.Order - b.Order; + }); + foreach (var resource in list) { Seedpacket slot = _plantCard.Instantiate(); AddChild(slot); - + slot.SetResource(resource); slot.SetHandler(new ChoosableHandler(slot)); } diff --git a/scripts/components/gui/choose_your_seeds/GridLoader.cs.uid b/scripts/gui/choose_your_seeds/GridLoader.cs.uid similarity index 100% rename from scripts/components/gui/choose_your_seeds/GridLoader.cs.uid rename to scripts/gui/choose_your_seeds/GridLoader.cs.uid diff --git a/scripts/components/gui/choose_your_seeds/LevelRunButton.cs b/scripts/gui/choose_your_seeds/LevelRunButton.cs similarity index 100% rename from scripts/components/gui/choose_your_seeds/LevelRunButton.cs rename to scripts/gui/choose_your_seeds/LevelRunButton.cs diff --git a/scripts/components/gui/choose_your_seeds/LevelRunButton.cs.uid b/scripts/gui/choose_your_seeds/LevelRunButton.cs.uid similarity index 100% rename from scripts/components/gui/choose_your_seeds/LevelRunButton.cs.uid rename to scripts/gui/choose_your_seeds/LevelRunButton.cs.uid diff --git a/scripts/components/gui/choose_your_seeds/Previewport.cs b/scripts/gui/choose_your_seeds/Previewport.cs similarity index 81% rename from scripts/components/gui/choose_your_seeds/Previewport.cs rename to scripts/gui/choose_your_seeds/Previewport.cs index 71a1709..9ebdd3a 100644 --- a/scripts/components/gui/choose_your_seeds/Previewport.cs +++ b/scripts/gui/choose_your_seeds/Previewport.cs @@ -1,8 +1,6 @@ using Godot; -using Newlon; using Newlon.Components; using Newlon.Components.GUI.Seedpackets; -using Newlon.Components.Plants; public partial class Previewport : SubViewport { @@ -11,11 +9,12 @@ public partial class Previewport : SubViewport [Export] private Label title; [Export] private RichTextLabel description; + [Export] private Sprite2D _frameField; public override void _Ready() { GetParent().GetViewport().GuiFocusChanged += OnFocusChanged; - start_Field = GetNode("FrameField").Texture; + start_Field = _frameField.Texture; } public void OnFocusChanged(Control node) @@ -36,10 +35,10 @@ public partial class Previewport : SubViewport } if (resource.customFrame != null && resource.customFrame.almanachField != null) { - GetNode("FrameField").Texture = resource.customFrame.almanachField; + _frameField.Texture = resource.customFrame.almanachField; } else - GetNode("FrameField").Texture = start_Field; + _frameField.Texture = start_Field; current_display = resource.Scene.Instantiate(); title.Text = Tr(resource.name_key); description.Text = Tr(resource.description_key); diff --git a/scripts/components/gui/choose_your_seeds/Previewport.cs.uid b/scripts/gui/choose_your_seeds/Previewport.cs.uid similarity index 100% rename from scripts/components/gui/choose_your_seeds/Previewport.cs.uid rename to scripts/gui/choose_your_seeds/Previewport.cs.uid diff --git a/scripts/components/gui/main_menu_rich_text.gd b/scripts/gui/main_menu_rich_text.gd similarity index 100% rename from scripts/components/gui/main_menu_rich_text.gd rename to scripts/gui/main_menu_rich_text.gd diff --git a/scripts/components/gui/main_menu_rich_text.gd.uid b/scripts/gui/main_menu_rich_text.gd.uid similarity index 100% rename from scripts/components/gui/main_menu_rich_text.gd.uid rename to scripts/gui/main_menu_rich_text.gd.uid diff --git a/scripts/components/gui/menu_buttons.gd b/scripts/gui/menu_buttons.gd similarity index 74% rename from scripts/components/gui/menu_buttons.gd rename to scripts/gui/menu_buttons.gd index 9c89ded..8f62543 100644 --- a/scripts/components/gui/menu_buttons.gd +++ b/scripts/gui/menu_buttons.gd @@ -7,6 +7,7 @@ func _on_play_button_pressed() -> void: func _on_exit_button_pressed() -> void: + get_tree().root.propagate_notification(NOTIFICATION_WM_CLOSE_REQUEST) get_tree().quit() $ChannelPlayer.call("Play") @@ -15,7 +16,10 @@ func _on_button_pressed() -> void: $"../AboutWindow".popup_centered() $ChannelPlayer.call("Play") - func _on_almanach_button_pressed() -> void: $"../Almanach".visible = true $ChannelPlayer.call("Play") + + +func _on_splash_button_pressed() -> void: + $"../PrototypeWindow".popup_centered() diff --git a/scripts/components/gui/menu_buttons.gd.uid b/scripts/gui/menu_buttons.gd.uid similarity index 100% rename from scripts/components/gui/menu_buttons.gd.uid rename to scripts/gui/menu_buttons.gd.uid diff --git a/scripts/components/gui/seedpackets/AlmanachHandler.cs b/scripts/gui/seedpackets/AlmanachHandler.cs similarity index 100% rename from scripts/components/gui/seedpackets/AlmanachHandler.cs rename to scripts/gui/seedpackets/AlmanachHandler.cs diff --git a/scripts/components/gui/seedpackets/AlmanachHandler.cs.uid b/scripts/gui/seedpackets/AlmanachHandler.cs.uid similarity index 100% rename from scripts/components/gui/seedpackets/AlmanachHandler.cs.uid rename to scripts/gui/seedpackets/AlmanachHandler.cs.uid diff --git a/scripts/components/gui/seedpackets/ChoosableHandler.cs b/scripts/gui/seedpackets/ChoosableHandler.cs similarity index 100% rename from scripts/components/gui/seedpackets/ChoosableHandler.cs rename to scripts/gui/seedpackets/ChoosableHandler.cs diff --git a/scripts/components/gui/seedpackets/ChoosableHandler.cs.uid b/scripts/gui/seedpackets/ChoosableHandler.cs.uid similarity index 100% rename from scripts/components/gui/seedpackets/ChoosableHandler.cs.uid rename to scripts/gui/seedpackets/ChoosableHandler.cs.uid diff --git a/scripts/gui/seedpackets/CostVeil.cs b/scripts/gui/seedpackets/CostVeil.cs new file mode 100644 index 0000000..764adf4 --- /dev/null +++ b/scripts/gui/seedpackets/CostVeil.cs @@ -0,0 +1,21 @@ +using Godot; +using Newlon.Components.GUI.Seedpackets; +using Newlon.Components.Level; +using System; + +public partial class CostVeil : ColorRect +{ + private Seedpacket packet; + public override void _Ready() + { + packet = GetParent(); + } + + // Called every frame. 'delta' is the elapsed time since the previous frame. + public override void _Process(double delta) + { + //Visible = RuntimeLevelData.Instance.SunCount < packet.GetResource().Cost; + + Visible = packet.disablePacket; + } +} diff --git a/scripts/gui/seedpackets/CostVeil.cs.uid b/scripts/gui/seedpackets/CostVeil.cs.uid new file mode 100644 index 0000000..f8f8cb7 --- /dev/null +++ b/scripts/gui/seedpackets/CostVeil.cs.uid @@ -0,0 +1 @@ +uid://chag6sgjsjb2u diff --git a/scripts/components/gui/seedpackets/CustomSeedpacketFrame.cs b/scripts/gui/seedpackets/CustomSeedpacketFrame.cs similarity index 100% rename from scripts/components/gui/seedpackets/CustomSeedpacketFrame.cs rename to scripts/gui/seedpackets/CustomSeedpacketFrame.cs diff --git a/scripts/components/gui/seedpackets/CustomSeedpacketFrame.cs.uid b/scripts/gui/seedpackets/CustomSeedpacketFrame.cs.uid similarity index 100% rename from scripts/components/gui/seedpackets/CustomSeedpacketFrame.cs.uid rename to scripts/gui/seedpackets/CustomSeedpacketFrame.cs.uid diff --git a/scripts/components/gui/seedpackets/HotbarHandler.cs b/scripts/gui/seedpackets/HotbarHandler.cs similarity index 100% rename from scripts/components/gui/seedpackets/HotbarHandler.cs rename to scripts/gui/seedpackets/HotbarHandler.cs diff --git a/scripts/components/gui/seedpackets/HotbarHandler.cs.uid b/scripts/gui/seedpackets/HotbarHandler.cs.uid similarity index 100% rename from scripts/components/gui/seedpackets/HotbarHandler.cs.uid rename to scripts/gui/seedpackets/HotbarHandler.cs.uid diff --git a/scripts/components/gui/seedpackets/HotbarPregameHandler.cs b/scripts/gui/seedpackets/HotbarPregameHandler.cs similarity index 100% rename from scripts/components/gui/seedpackets/HotbarPregameHandler.cs rename to scripts/gui/seedpackets/HotbarPregameHandler.cs diff --git a/scripts/components/gui/seedpackets/HotbarPregameHandler.cs.uid b/scripts/gui/seedpackets/HotbarPregameHandler.cs.uid similarity index 100% rename from scripts/components/gui/seedpackets/HotbarPregameHandler.cs.uid rename to scripts/gui/seedpackets/HotbarPregameHandler.cs.uid diff --git a/scripts/components/gui/seedpackets/ISeedpacketPress.cs b/scripts/gui/seedpackets/ISeedpacketPress.cs similarity index 100% rename from scripts/components/gui/seedpackets/ISeedpacketPress.cs rename to scripts/gui/seedpackets/ISeedpacketPress.cs diff --git a/scripts/components/gui/seedpackets/ISeedpacketPress.cs.uid b/scripts/gui/seedpackets/ISeedpacketPress.cs.uid similarity index 100% rename from scripts/components/gui/seedpackets/ISeedpacketPress.cs.uid rename to scripts/gui/seedpackets/ISeedpacketPress.cs.uid diff --git a/scripts/components/gui/seedpackets/ISeedpacketProcess.cs b/scripts/gui/seedpackets/ISeedpacketProcess.cs similarity index 100% rename from scripts/components/gui/seedpackets/ISeedpacketProcess.cs rename to scripts/gui/seedpackets/ISeedpacketProcess.cs diff --git a/scripts/components/gui/seedpackets/ISeedpacketProcess.cs.uid b/scripts/gui/seedpackets/ISeedpacketProcess.cs.uid similarity index 100% rename from scripts/components/gui/seedpackets/ISeedpacketProcess.cs.uid rename to scripts/gui/seedpackets/ISeedpacketProcess.cs.uid diff --git a/scripts/components/gui/seedpackets/ISeedpacketUnfocus.cs b/scripts/gui/seedpackets/ISeedpacketUnfocus.cs similarity index 100% rename from scripts/components/gui/seedpackets/ISeedpacketUnfocus.cs rename to scripts/gui/seedpackets/ISeedpacketUnfocus.cs diff --git a/scripts/components/gui/seedpackets/ISeedpacketUnfocus.cs.uid b/scripts/gui/seedpackets/ISeedpacketUnfocus.cs.uid similarity index 100% rename from scripts/components/gui/seedpackets/ISeedpacketUnfocus.cs.uid rename to scripts/gui/seedpackets/ISeedpacketUnfocus.cs.uid diff --git a/scripts/components/gui/seedpackets/Seedpacket.cs b/scripts/gui/seedpackets/Seedpacket.cs similarity index 83% rename from scripts/components/gui/seedpackets/Seedpacket.cs rename to scripts/gui/seedpackets/Seedpacket.cs index 30e3691..fc6b01c 100644 --- a/scripts/components/gui/seedpackets/Seedpacket.cs +++ b/scripts/gui/seedpackets/Seedpacket.cs @@ -4,9 +4,9 @@ namespace Newlon.Components.GUI.Seedpackets; public partial class Seedpacket : TextureButton { - public static AudioStream TapStream; - public static AudioStream UntapStream; - public static AudioStream LiftStream; + public static AudioStream TapStream = ResourceLoader.Load("res://assets/audio/gui/tap.mp3"); + public static AudioStream UntapStream = ResourceLoader.Load("res://assets/audio/gui/tap2.mp3"); + public static AudioStream LiftStream = ResourceLoader.Load("res://assets/audio/gui/seedlift.mp3"); private const string PATH_TO_PACKED_SCENE = "res://scenes/gui/seedpacket.tscn"; private DisplayResource _resource; private Label _cost; @@ -21,12 +21,6 @@ public partial class Seedpacket : TextureButton // Node overrides public override void _Ready() { - if (TapStream == null) - { - TapStream = ResourceLoader.Load("res://assets/audio/gui/tap.mp3"); - UntapStream = ResourceLoader.Load("res://assets/audio/gui/tap2.mp3"); - LiftStream = ResourceLoader.Load("res://assets/audio/gui/seedlift.mp3"); - } if (_resource != null) UpdateContents(); if (Prefab == null) @@ -79,9 +73,10 @@ public partial class Seedpacket : TextureButton _cost.LabelSettings = _resource.customFrame.font; } } - + public override void _Pressed() { + GrabFocus(); if (_handler is ISeedpacketPress pressHandler) pressHandler.Pressed(); } diff --git a/scripts/components/gui/seedpackets/Seedpacket.cs.uid b/scripts/gui/seedpackets/Seedpacket.cs.uid similarity index 100% rename from scripts/components/gui/seedpackets/Seedpacket.cs.uid rename to scripts/gui/seedpackets/Seedpacket.cs.uid diff --git a/scripts/components/gui/seedpackets/SeedpacketHandler.cs b/scripts/gui/seedpackets/SeedpacketHandler.cs similarity index 100% rename from scripts/components/gui/seedpackets/SeedpacketHandler.cs rename to scripts/gui/seedpackets/SeedpacketHandler.cs diff --git a/scripts/components/gui/seedpackets/SeedpacketHandler.cs.uid b/scripts/gui/seedpackets/SeedpacketHandler.cs.uid similarity index 100% rename from scripts/components/gui/seedpackets/SeedpacketHandler.cs.uid rename to scripts/gui/seedpackets/SeedpacketHandler.cs.uid diff --git a/scripts/components/level/LeftBoundaryMarker.cs b/scripts/level/LeftBoundaryMarker.cs similarity index 100% rename from scripts/components/level/LeftBoundaryMarker.cs rename to scripts/level/LeftBoundaryMarker.cs diff --git a/scripts/components/level/LeftBoundaryMarker.cs.uid b/scripts/level/LeftBoundaryMarker.cs.uid similarity index 100% rename from scripts/components/level/LeftBoundaryMarker.cs.uid rename to scripts/level/LeftBoundaryMarker.cs.uid diff --git a/scripts/components/level/LoseCheckbox.cs b/scripts/level/LoseCheckbox.cs similarity index 100% rename from scripts/components/level/LoseCheckbox.cs rename to scripts/level/LoseCheckbox.cs diff --git a/scripts/components/level/LoseCheckbox.cs.uid b/scripts/level/LoseCheckbox.cs.uid similarity index 100% rename from scripts/components/level/LoseCheckbox.cs.uid rename to scripts/level/LoseCheckbox.cs.uid diff --git a/scripts/components/level/PlantField.cs b/scripts/level/PlantField.cs similarity index 100% rename from scripts/components/level/PlantField.cs rename to scripts/level/PlantField.cs diff --git a/scripts/components/level/PlantField.cs.uid b/scripts/level/PlantField.cs.uid similarity index 100% rename from scripts/components/level/PlantField.cs.uid rename to scripts/level/PlantField.cs.uid diff --git a/scripts/components/level/PoolContainer.cs b/scripts/level/PoolContainer.cs similarity index 88% rename from scripts/components/level/PoolContainer.cs rename to scripts/level/PoolContainer.cs index b5765fd..22a73d1 100644 --- a/scripts/components/level/PoolContainer.cs +++ b/scripts/level/PoolContainer.cs @@ -63,4 +63,10 @@ public partial class PoolContainer : Node2D Instance.Particles.AddChild(emitter); emitter.GlobalPosition = position; } + public void SpawnParticles(PackedScene particles, Transform2D transform) + { + var emitter = particles.Instantiate(); + Instance.Particles.AddChild(emitter); + emitter.GlobalTransform = transform; + } } diff --git a/scripts/components/level/PoolContainer.cs.uid b/scripts/level/PoolContainer.cs.uid similarity index 100% rename from scripts/components/level/PoolContainer.cs.uid rename to scripts/level/PoolContainer.cs.uid diff --git a/scripts/components/level/RightBoundaryMarker.cs b/scripts/level/RightBoundaryMarker.cs similarity index 100% rename from scripts/components/level/RightBoundaryMarker.cs rename to scripts/level/RightBoundaryMarker.cs diff --git a/scripts/components/level/RightBoundaryMarker.cs.uid b/scripts/level/RightBoundaryMarker.cs.uid similarity index 100% rename from scripts/components/level/RightBoundaryMarker.cs.uid rename to scripts/level/RightBoundaryMarker.cs.uid diff --git a/scripts/components/level/RuntimeLevelData.cs b/scripts/level/RuntimeLevelData.cs similarity index 97% rename from scripts/components/level/RuntimeLevelData.cs rename to scripts/level/RuntimeLevelData.cs index d7fb28c..f26c2e9 100644 --- a/scripts/components/level/RuntimeLevelData.cs +++ b/scripts/level/RuntimeLevelData.cs @@ -26,6 +26,7 @@ public partial class RuntimeLevelData : Node { Instance = this; GetTree().Paused = true; + Engine.TimeScale = 1.0; } #region Sun diff --git a/scripts/components/level/RuntimeLevelData.cs.uid b/scripts/level/RuntimeLevelData.cs.uid similarity index 100% rename from scripts/components/level/RuntimeLevelData.cs.uid rename to scripts/level/RuntimeLevelData.cs.uid diff --git a/scripts/components/level/SunSpawner.cs b/scripts/level/SunSpawner.cs similarity index 100% rename from scripts/components/level/SunSpawner.cs rename to scripts/level/SunSpawner.cs diff --git a/scripts/components/level/SunSpawner.cs.uid b/scripts/level/SunSpawner.cs.uid similarity index 100% rename from scripts/components/level/SunSpawner.cs.uid rename to scripts/level/SunSpawner.cs.uid diff --git a/scripts/components/level/zombe_spawners/SurvivalZombieSpawner.cs b/scripts/level/zombe_spawners/SurvivalZombieSpawner.cs similarity index 100% rename from scripts/components/level/zombe_spawners/SurvivalZombieSpawner.cs rename to scripts/level/zombe_spawners/SurvivalZombieSpawner.cs diff --git a/scripts/components/level/zombe_spawners/SurvivalZombieSpawner.cs.uid b/scripts/level/zombe_spawners/SurvivalZombieSpawner.cs.uid similarity index 100% rename from scripts/components/level/zombe_spawners/SurvivalZombieSpawner.cs.uid rename to scripts/level/zombe_spawners/SurvivalZombieSpawner.cs.uid diff --git a/scripts/components/level/zombe_spawners/ZombieSequencer.cs b/scripts/level/zombe_spawners/ZombieSequencer.cs similarity index 100% rename from scripts/components/level/zombe_spawners/ZombieSequencer.cs rename to scripts/level/zombe_spawners/ZombieSequencer.cs diff --git a/scripts/components/level/zombe_spawners/ZombieSequencer.cs.uid b/scripts/level/zombe_spawners/ZombieSequencer.cs.uid similarity index 100% rename from scripts/components/level/zombe_spawners/ZombieSequencer.cs.uid rename to scripts/level/zombe_spawners/ZombieSequencer.cs.uid diff --git a/scripts/components/particles/FallFloor.cs b/scripts/particles/FallFloor.cs similarity index 100% rename from scripts/components/particles/FallFloor.cs rename to scripts/particles/FallFloor.cs diff --git a/scripts/components/particles/FallFloor.cs.uid b/scripts/particles/FallFloor.cs.uid similarity index 100% rename from scripts/components/particles/FallFloor.cs.uid rename to scripts/particles/FallFloor.cs.uid diff --git a/scripts/components/particles/FallParticle.cs b/scripts/particles/FallParticle.cs similarity index 82% rename from scripts/components/particles/FallParticle.cs rename to scripts/particles/FallParticle.cs index 860afd6..0c71d23 100644 --- a/scripts/components/particles/FallParticle.cs +++ b/scripts/particles/FallParticle.cs @@ -2,6 +2,9 @@ using Godot; using Newlon.Components.Level; using Newlon.Components.Zombies; +namespace Newlon.Components; + +[GlobalClass] public partial class FallParticle : RigidBody2D { [Export] private RuntimeZombieData data; @@ -19,10 +22,11 @@ public partial class FallParticle : RigidBody2D } Callable.From(() => { - Reparent(PoolContainer.Instance.Zombies); + Reparent(PoolContainer.Instance.Particles); float rng_angle = Mathf.DegToRad((float)GD.RandRange(minAngle, maxAngle)); float rng_torque = Mathf.DegToRad((float)GD.RandRange(minTorque, maxTorque)); - ApplyImpulse(new Vector2(Mathf.Sin(rng_angle) * Impulse, Mathf.Cos(rng_angle) * Impulse)); + if (Impulse != 0) + ApplyImpulse(new Vector2(Mathf.Sin(rng_angle) * Impulse, Mathf.Cos(rng_angle) * Impulse)); ApplyTorqueImpulse(rng_torque); }).CallDeferred(); var tween = CreateTween(); diff --git a/scripts/components/particles/FallParticle.cs.uid b/scripts/particles/FallParticle.cs.uid similarity index 100% rename from scripts/components/particles/FallParticle.cs.uid rename to scripts/particles/FallParticle.cs.uid diff --git a/scripts/components/particles/StandardParticles.cs b/scripts/particles/StandardParticles.cs similarity index 100% rename from scripts/components/particles/StandardParticles.cs rename to scripts/particles/StandardParticles.cs diff --git a/scripts/components/particles/StandardParticles.cs.uid b/scripts/particles/StandardParticles.cs.uid similarity index 100% rename from scripts/components/particles/StandardParticles.cs.uid rename to scripts/particles/StandardParticles.cs.uid diff --git a/scripts/components/plants/AreaAttack.cs b/scripts/plants/AreaAttack.cs similarity index 100% rename from scripts/components/plants/AreaAttack.cs rename to scripts/plants/AreaAttack.cs diff --git a/scripts/components/plants/AreaAttack.cs.uid b/scripts/plants/AreaAttack.cs.uid similarity index 100% rename from scripts/components/plants/AreaAttack.cs.uid rename to scripts/plants/AreaAttack.cs.uid diff --git a/scripts/components/plants/ExplosionComponent.cs b/scripts/plants/ExplosionComponent.cs similarity index 100% rename from scripts/components/plants/ExplosionComponent.cs rename to scripts/plants/ExplosionComponent.cs diff --git a/scripts/components/plants/ExplosionComponent.cs.uid b/scripts/plants/ExplosionComponent.cs.uid similarity index 100% rename from scripts/components/plants/ExplosionComponent.cs.uid rename to scripts/plants/ExplosionComponent.cs.uid diff --git a/scripts/components/plants/Eyesight.cs b/scripts/plants/Eyesight.cs similarity index 100% rename from scripts/components/plants/Eyesight.cs rename to scripts/plants/Eyesight.cs diff --git a/scripts/components/plants/Eyesight.cs.uid b/scripts/plants/Eyesight.cs.uid similarity index 100% rename from scripts/components/plants/Eyesight.cs.uid rename to scripts/plants/Eyesight.cs.uid diff --git a/scripts/components/plants/LoseZone.cs b/scripts/plants/LoseZone.cs similarity index 100% rename from scripts/components/plants/LoseZone.cs rename to scripts/plants/LoseZone.cs diff --git a/scripts/components/plants/LoseZone.cs.uid b/scripts/plants/LoseZone.cs.uid similarity index 100% rename from scripts/components/plants/LoseZone.cs.uid rename to scripts/plants/LoseZone.cs.uid diff --git a/scripts/plants/NerdusReturnAttack.cs b/scripts/plants/NerdusReturnAttack.cs new file mode 100644 index 0000000..10eb55d --- /dev/null +++ b/scripts/plants/NerdusReturnAttack.cs @@ -0,0 +1,48 @@ +using Godot; +using Newlon.Systems.Effects; +using System.Collections.Generic; +namespace Newlon.Components.Plants; + +public partial class NerdusReturnAttack : Area2D +{ + private float returnAmount; + [Export] private Effect returnEffect; + [Export] private float bitesToPeas = 1; + public bool triggered = false; + private List entities = new(); + public override void _Ready() + { + AreaEntered += OnAreaEntered; + AreaExited += OnAreaExited; + } + private void OnAreaEntered(Area2D area) + { + if (area.GetParent() is Entity entity) + { + entities.Add(entity); + } + } + private void OnAreaExited(Area2D area) + { + if (area.GetParent() is Entity entity && entities.Contains(entity)) + { + entities.Remove(entity); + } + } + private void OnHPChanged(float delta, Node source) + { + if (delta >= 0) return; + returnAmount -= delta; + triggered = true; + } + public void ReturnAllDamage() + { + foreach (var entity in entities) + { + entity.TakeDamage(returnAmount * bitesToPeas, GetParent()); + entity.GiveEffect(returnEffect); + } + returnAmount = 0; + triggered = false; + } +} diff --git a/scripts/plants/NerdusReturnAttack.cs.uid b/scripts/plants/NerdusReturnAttack.cs.uid new file mode 100644 index 0000000..32190f5 --- /dev/null +++ b/scripts/plants/NerdusReturnAttack.cs.uid @@ -0,0 +1 @@ +uid://dcokqes5wwo3k diff --git a/scripts/components/plants/PlantEyesightLimiter.cs b/scripts/plants/PlantEyesightLimiter.cs similarity index 86% rename from scripts/components/plants/PlantEyesightLimiter.cs rename to scripts/plants/PlantEyesightLimiter.cs index 0900fc1..bf093f5 100644 --- a/scripts/components/plants/PlantEyesightLimiter.cs +++ b/scripts/plants/PlantEyesightLimiter.cs @@ -8,7 +8,7 @@ public partial class PlantEyesightLimiter : CollisionShape2D { if (Shape is SegmentShape2D segment) { - segment.B = new Vector2(Utility.RightFieldBoundary.X - GlobalPosition.X, 0); + segment.B = new Vector2(Utility.RightFieldBoundary.X - GlobalPosition.X+Utility.TileWidth/2.0f, 0); } } } \ No newline at end of file diff --git a/scripts/components/plants/PlantEyesightLimiter.cs.uid b/scripts/plants/PlantEyesightLimiter.cs.uid similarity index 100% rename from scripts/components/plants/PlantEyesightLimiter.cs.uid rename to scripts/plants/PlantEyesightLimiter.cs.uid diff --git a/scripts/components/plants/PlantSunSpawner.cs b/scripts/plants/PlantSunSpawner.cs similarity index 100% rename from scripts/components/plants/PlantSunSpawner.cs rename to scripts/plants/PlantSunSpawner.cs diff --git a/scripts/components/plants/PlantSunSpawner.cs.uid b/scripts/plants/PlantSunSpawner.cs.uid similarity index 100% rename from scripts/components/plants/PlantSunSpawner.cs.uid rename to scripts/plants/PlantSunSpawner.cs.uid diff --git a/scripts/components/plants/ReturnEffect.cs b/scripts/plants/ReturnEffect.cs similarity index 100% rename from scripts/components/plants/ReturnEffect.cs rename to scripts/plants/ReturnEffect.cs diff --git a/scripts/components/plants/ReturnEffect.cs.uid b/scripts/plants/ReturnEffect.cs.uid similarity index 100% rename from scripts/components/plants/ReturnEffect.cs.uid rename to scripts/plants/ReturnEffect.cs.uid diff --git a/scripts/components/plants/RuntimePlantData.cs b/scripts/plants/RuntimePlantData.cs similarity index 100% rename from scripts/components/plants/RuntimePlantData.cs rename to scripts/plants/RuntimePlantData.cs diff --git a/scripts/components/plants/RuntimePlantData.cs.uid b/scripts/plants/RuntimePlantData.cs.uid similarity index 100% rename from scripts/components/plants/RuntimePlantData.cs.uid rename to scripts/plants/RuntimePlantData.cs.uid diff --git a/scripts/components/plants/Shooter.cs b/scripts/plants/Shooter.cs similarity index 100% rename from scripts/components/plants/Shooter.cs rename to scripts/plants/Shooter.cs diff --git a/scripts/components/plants/Shooter.cs.uid b/scripts/plants/Shooter.cs.uid similarity index 100% rename from scripts/components/plants/Shooter.cs.uid rename to scripts/plants/Shooter.cs.uid diff --git a/scripts/components/plants/ThreepeaterShooter.cs b/scripts/plants/ThreepeaterShooter.cs similarity index 100% rename from scripts/components/plants/ThreepeaterShooter.cs rename to scripts/plants/ThreepeaterShooter.cs diff --git a/scripts/components/plants/ThreepeaterShooter.cs.uid b/scripts/plants/ThreepeaterShooter.cs.uid similarity index 100% rename from scripts/components/plants/ThreepeaterShooter.cs.uid rename to scripts/plants/ThreepeaterShooter.cs.uid diff --git a/scripts/components/plants/behaviours/AloeBehaviour.cs b/scripts/plants/behaviours/AloeBehaviour.cs similarity index 93% rename from scripts/components/plants/behaviours/AloeBehaviour.cs rename to scripts/plants/behaviours/AloeBehaviour.cs index 3186709..574a860 100644 --- a/scripts/components/plants/behaviours/AloeBehaviour.cs +++ b/scripts/plants/behaviours/AloeBehaviour.cs @@ -36,7 +36,7 @@ public partial class AloeBehaviour : BaseBehaviour var checkPos = GetParent().GlobalPosition + Vector2.Right * Utility.TileWidth; if (PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData)) { - plantData.Heal(3000 + 25 * plantData.MaxHP, GetParent()); + plantData.Heal(1200 + 0.5f * plantData.MaxHP, GetParent()); } } diff --git a/scripts/components/plants/behaviours/AloeBehaviour.cs.uid b/scripts/plants/behaviours/AloeBehaviour.cs.uid similarity index 100% rename from scripts/components/plants/behaviours/AloeBehaviour.cs.uid rename to scripts/plants/behaviours/AloeBehaviour.cs.uid diff --git a/scripts/components/plants/behaviours/BaseBehaviour.cs b/scripts/plants/behaviours/BaseBehaviour.cs similarity index 100% rename from scripts/components/plants/behaviours/BaseBehaviour.cs rename to scripts/plants/behaviours/BaseBehaviour.cs diff --git a/scripts/components/plants/behaviours/BaseBehaviour.cs.uid b/scripts/plants/behaviours/BaseBehaviour.cs.uid similarity index 100% rename from scripts/components/plants/behaviours/BaseBehaviour.cs.uid rename to scripts/plants/behaviours/BaseBehaviour.cs.uid diff --git a/scripts/components/plants/behaviours/HpBasedBehaviour.cs b/scripts/plants/behaviours/HpBasedBehaviour.cs similarity index 51% rename from scripts/components/plants/behaviours/HpBasedBehaviour.cs rename to scripts/plants/behaviours/HpBasedBehaviour.cs index 4c7fe1e..c494e6c 100644 --- a/scripts/components/plants/behaviours/HpBasedBehaviour.cs +++ b/scripts/plants/behaviours/HpBasedBehaviour.cs @@ -1,18 +1,25 @@ using Godot; +using Godot.Collections; namespace Newlon.Components.Plants.Behaviours; public partial class HpBasedBehaviour : BaseBehaviour { private RuntimePlantData _data; + [Export] private Array parameters; + public override void _Ready() { base._Ready(); _data = GetParent(); } - public void OnHPChanged(int amount,Node origin) + public void OnHPChanged(float amount, Node origin) { - _tree.Set("parameters/Tree/blend_position",(float)_data.HP/_data.MaxHP); + var calc = _data.HP / _data.MaxHP; + foreach (var par in parameters) + { + _tree.Set(par, calc); + } } } diff --git a/scripts/components/plants/behaviours/HpBasedBehaviour.cs.uid b/scripts/plants/behaviours/HpBasedBehaviour.cs.uid similarity index 100% rename from scripts/components/plants/behaviours/HpBasedBehaviour.cs.uid rename to scripts/plants/behaviours/HpBasedBehaviour.cs.uid diff --git a/scripts/components/plants/behaviours/PeashooterBehaviour.cs b/scripts/plants/behaviours/PeashooterBehaviour.cs similarity index 100% rename from scripts/components/plants/behaviours/PeashooterBehaviour.cs rename to scripts/plants/behaviours/PeashooterBehaviour.cs diff --git a/scripts/components/plants/behaviours/PeashooterBehaviour.cs.uid b/scripts/plants/behaviours/PeashooterBehaviour.cs.uid similarity index 100% rename from scripts/components/plants/behaviours/PeashooterBehaviour.cs.uid rename to scripts/plants/behaviours/PeashooterBehaviour.cs.uid diff --git a/scripts/components/plants/behaviours/PotatomineBehaviour.cs b/scripts/plants/behaviours/PotatomineBehaviour.cs similarity index 100% rename from scripts/components/plants/behaviours/PotatomineBehaviour.cs rename to scripts/plants/behaviours/PotatomineBehaviour.cs diff --git a/scripts/components/plants/behaviours/PotatomineBehaviour.cs.uid b/scripts/plants/behaviours/PotatomineBehaviour.cs.uid similarity index 100% rename from scripts/components/plants/behaviours/PotatomineBehaviour.cs.uid rename to scripts/plants/behaviours/PotatomineBehaviour.cs.uid diff --git a/scripts/components/plants/behaviours/SpikeweedBehaviour.cs b/scripts/plants/behaviours/SpikeweedBehaviour.cs similarity index 100% rename from scripts/components/plants/behaviours/SpikeweedBehaviour.cs rename to scripts/plants/behaviours/SpikeweedBehaviour.cs diff --git a/scripts/components/plants/behaviours/SpikeweedBehaviour.cs.uid b/scripts/plants/behaviours/SpikeweedBehaviour.cs.uid similarity index 100% rename from scripts/components/plants/behaviours/SpikeweedBehaviour.cs.uid rename to scripts/plants/behaviours/SpikeweedBehaviour.cs.uid diff --git a/scripts/components/plants/behaviours/SunflowerBehaviour.cs b/scripts/plants/behaviours/SunflowerBehaviour.cs similarity index 100% rename from scripts/components/plants/behaviours/SunflowerBehaviour.cs rename to scripts/plants/behaviours/SunflowerBehaviour.cs diff --git a/scripts/components/plants/behaviours/SunflowerBehaviour.cs.uid b/scripts/plants/behaviours/SunflowerBehaviour.cs.uid similarity index 100% rename from scripts/components/plants/behaviours/SunflowerBehaviour.cs.uid rename to scripts/plants/behaviours/SunflowerBehaviour.cs.uid diff --git a/scripts/resources/DisplayResource.cs b/scripts/resources/DisplayResource.cs index fb98245..f05cd53 100644 --- a/scripts/resources/DisplayResource.cs +++ b/scripts/resources/DisplayResource.cs @@ -16,5 +16,6 @@ public partial class DisplayResource : Resource public Texture2D Preview; [Export] public CustomSeedpacketFrame customFrame; [Export] public int Layer = 1; + [Export] public int Order = 0; public string internal_id; } diff --git a/scripts/systems/effects/GarlicEffect.cs b/scripts/systems/effects/GarlicEffect.cs index 01adecc..0900ff6 100644 --- a/scripts/systems/effects/GarlicEffect.cs +++ b/scripts/systems/effects/GarlicEffect.cs @@ -5,6 +5,7 @@ namespace Newlon.Systems.Effects; public partial class GarlicEffect : Effect { + [Export] private float tilesWalked = 0.2f; RandomNumberGenerator RandomNumberGenerator; public override void Enter(Node target) @@ -43,9 +44,10 @@ public partial class GarlicEffect : Effect mult = -1; } } + zombieData.AbleToEat = false; var tween = zombieData.CreateTween(); - tween.TweenProperty(zombieData,"position:y",zombieData.GlobalPosition.Y + Utility.TileHeight * mult, 1.0); - tween.Parallel().TweenProperty(zombieData, "position:x", zombieData.GlobalPosition.X - Utility.TileWidth / 10.0, 1.0); + tween.TweenProperty(zombieData,"position:y",zombieData.GlobalPosition.Y + Utility.TileHeight * mult, Duration); + tween.Parallel().TweenProperty(zombieData, "position:x", zombieData.GlobalPosition.X - Utility.TileHeight * tilesWalked, Duration); tween.TweenCallback(Callable.From(() => {zombieData.AbleToEat = true;})); } } diff --git a/scripts/components/zombies/AudioDamage.cs b/scripts/zombies/AudioDamage.cs similarity index 100% rename from scripts/components/zombies/AudioDamage.cs rename to scripts/zombies/AudioDamage.cs diff --git a/scripts/components/zombies/AudioDamage.cs.uid b/scripts/zombies/AudioDamage.cs.uid similarity index 100% rename from scripts/components/zombies/AudioDamage.cs.uid rename to scripts/zombies/AudioDamage.cs.uid diff --git a/scripts/components/zombies/EatBox.cs b/scripts/zombies/EatBox.cs similarity index 85% rename from scripts/components/zombies/EatBox.cs rename to scripts/zombies/EatBox.cs index 8493cab..592907d 100644 --- a/scripts/components/zombies/EatBox.cs +++ b/scripts/zombies/EatBox.cs @@ -9,6 +9,8 @@ public partial class EatBox : Area2D // Rewrite this class completely when field system will be introduced. [Export] public FloatModifiers _damage; + [Export] + private AudioStream biteSound = ResourceLoader.Load("uid://dyid55nhflwyn"); private RuntimePlantData plant; public bool isEating = false; @@ -18,6 +20,7 @@ public partial class EatBox : Area2D if (GetParent().AbleToEat) { plant?.TakeDamage((int)_damage.GetValue(), GetParent()); + AudioSequencer.Play("bite", biteSound); } } diff --git a/scripts/components/zombies/EatBox.cs.uid b/scripts/zombies/EatBox.cs.uid similarity index 100% rename from scripts/components/zombies/EatBox.cs.uid rename to scripts/zombies/EatBox.cs.uid diff --git a/scripts/components/zombies/RuntimeZombieData.cs b/scripts/zombies/RuntimeZombieData.cs similarity index 65% rename from scripts/components/zombies/RuntimeZombieData.cs rename to scripts/zombies/RuntimeZombieData.cs index bf4a64a..ae73b0b 100644 --- a/scripts/components/zombies/RuntimeZombieData.cs +++ b/scripts/zombies/RuntimeZombieData.cs @@ -6,12 +6,17 @@ public partial class RuntimeZombieData : Entity { [Export] private Armor _armor; - [Export] - private AudioStream garlicSound; - [Export] - private AudioStream freezeSound; + [Signal] public delegate void HasBeenKilledEventHandler(RuntimeZombieData who); public bool AbleToEat = true; + public override void _Ready() + { + base._Ready(); + + + LocalTimescale += (float)GD.RandRange(-0.05, 0.05); + } + public override void Heal(float amount, Node origin) { if (_armor != null) @@ -27,7 +32,6 @@ public partial class RuntimeZombieData : Entity HP = MaxHP; } } - public override void TakeDamage(float amount, Node origin) { if (_armor != null) @@ -44,5 +48,15 @@ public partial class RuntimeZombieData : Entity KillByDamage(); } } - + #region Death sequence + private bool _killed = false; + public override void KillByDamage() + { + if (_killed) return; + _killed = true; + AbleToEat = false; + EmitSignal(SignalName.HasBeenKilled,this); + } + + #endregion } diff --git a/scripts/components/zombies/RuntimeZombieData.cs.uid b/scripts/zombies/RuntimeZombieData.cs.uid similarity index 100% rename from scripts/components/zombies/RuntimeZombieData.cs.uid rename to scripts/zombies/RuntimeZombieData.cs.uid diff --git a/scripts/components/zombies/ZombieMover.cs b/scripts/zombies/ZombieMover.cs similarity index 89% rename from scripts/components/zombies/ZombieMover.cs rename to scripts/zombies/ZombieMover.cs index c9b8261..60a81e5 100644 --- a/scripts/components/zombies/ZombieMover.cs +++ b/scripts/zombies/ZombieMover.cs @@ -13,8 +13,6 @@ public partial class ZombieMover : Node public override void _Ready() { _zombie = GetParent(); - _speed = (FloatModifiers)_speed.Duplicate(); - _speed.ChangePercentage((float)GD.RandRange(-0.05,0.05)); } public override void _PhysicsProcess(double delta) diff --git a/scripts/components/zombies/ZombieMover.cs.uid b/scripts/zombies/ZombieMover.cs.uid similarity index 100% rename from scripts/components/zombies/ZombieMover.cs.uid rename to scripts/zombies/ZombieMover.cs.uid diff --git a/scripts/components/zombies/behaviours/HoboBehaviour.cs b/scripts/zombies/behaviours/HoboBehaviour.cs similarity index 81% rename from scripts/components/zombies/behaviours/HoboBehaviour.cs rename to scripts/zombies/behaviours/HoboBehaviour.cs index dd0dd8d..44ca487 100644 --- a/scripts/components/zombies/behaviours/HoboBehaviour.cs +++ b/scripts/zombies/behaviours/HoboBehaviour.cs @@ -11,7 +11,7 @@ public partial class HoboBehaviour : Node public void Trashed() { canDestroyed = true; - ((AnimationNodeStateMachinePlayback)_animationTree.Get("parameters/Tree/playback")).Travel("hobo_zombie_can_destroy"); - _eatBox._damage.SetMult(3.0f); + ((AnimationNodeStateMachinePlayback)_animationTree.Get("parameters/Tree/playback")).Travel("Destroy"); + GetParent().LocalTimescale *= 3; } } diff --git a/scripts/components/zombies/behaviours/HoboBehaviour.cs.uid b/scripts/zombies/behaviours/HoboBehaviour.cs.uid similarity index 100% rename from scripts/components/zombies/behaviours/HoboBehaviour.cs.uid rename to scripts/zombies/behaviours/HoboBehaviour.cs.uid diff --git a/translations/gui.csv b/translations/gui.csv index c0462a2..6a2a060 100644 --- a/translations/gui.csv +++ b/translations/gui.csv @@ -2,12 +2,10 @@ keys,en,ru plants,Plants,Растения zombies,Zombies,Зомби lon_proto,"[center][wave amp=50.0 freq=5.0 connected=1][font_size=24]WELCOME TO LIBERATION OF NEIGHBOURVILLE PROTOTYPE![/font_size][/wave][/center] -Big thanks from me, Rendo, and our team! We appreciate any feedback, so consider reporting bugs to our [color=cyan][url=https://discord.gg/Y5Wk8H8EBY]discord server[/url][/color]. +Thank you very much from me, Rendo, and our team! We appreciate any feedback, so consider reporting bugs to our [color=cyan][url=https://discord.gg/Y5Wk8H8EBY]discord server[/url][/color]. Liberation of Neighbourville is currently in early stages of development. However, we reached point when all essential systems and mechanics are ready. -As for now, you can play survival endless with all currently made plants. Game includes some plants from first Plants versus Zombies, Aloe from sequel, three basic zombies and a hobo zombie. - As for 0.2.X version, current roadmap contains:[ul] Adventure mode New plants and zombies, obviously @@ -18,8 +16,6 @@ More ways to play Liberation of Neighbourville на данный момент на ранних этапах разработки. Тем не менее, мы достигли момента, когда все необходимые системы и механики готовы. -Ну, а сейчас вы можете сыграть в бесконечный режим со всеми сделанными на данный момент растениями. Игра включает в себя некоторые растения из первой части, Алоэ из сиквела, три базовых зомби и бездомного зомби. - На момент версии 0.2.X, дорожная карта содержит:[ul] Режим приключений Новые растения и зомби, очевидно @@ -53,3 +49,4 @@ close,Close,Закрыть sfx,SFX,Звуки music,Music,Музыка paused,Paused,Игра на паузе +splash,Splash,Сплэш diff --git a/translations/gui.en.translation b/translations/gui.en.translation index 0c1052f..851aaed 100644 Binary files a/translations/gui.en.translation and b/translations/gui.en.translation differ diff --git a/translations/gui.ru.translation b/translations/gui.ru.translation index ed37c92..856368c 100644 Binary files a/translations/gui.ru.translation and b/translations/gui.ru.translation differ diff --git a/translations/plants.csv b/translations/plants.csv index f322a3b..c0e9c49 100644 --- a/translations/plants.csv +++ b/translations/plants.csv @@ -1,83 +1,83 @@ keys,en,ru aloe,Aloe,Алоэ aloe_desc,"[p]Aloe heals injured plants.[/p] -[p]Health points: [color=DARK_RED]3 bites[/color][/p] +[p]Health points: [color=DARK_RED]6 bites[/color][/p] [p]Reload time: [color=DARK_RED]15 seconds[/color].[/p] [p]Ability recharge time: [color=DARK_RED]20 seconds[/color].[/p] [p]Heals plant when it has [color=DARK_RED]third[/color] of its health.[/p]","Алоэ лечит израненные растения. -Очки здоровья: [color=dark_red]3 укуса[/color]. +Очки здоровья: [color=dark_red]6 укусов[/color]. Время перезарядки: [color=dark_red]15 секунд[/color]. Время перезарядки способности: [color=dark_red]20 секунд[/color]. Лечит растения [color=DARK_RED]с третью[/color] здоровья." garlic,Garlic,Чеснок garlic_desc,"[p]Redirects zombies that bite it.[/p] -[p]Health points: [color=DARK_RED]20 bites[/color][/p] +[p]Health points: [color=DARK_RED]40 bites[/color][/p] [p]Reload time: [color=DARK_RED]15 seconds[/color].[/p]","Перенаправляет зомби, которые его кусают. -Очки здоровья: [color=DARK_RED]20 укусов[/color] +Очки здоровья: [color=DARK_RED]40 укусов[/color] Время перезарядки: [color=DARK_RED]15 секунд[/color]." peashooter,Peashooter,Горохострел peashooter_desc,"[p]Simply shoots peas at zombies on the lane[/p] -[p]Health points: [color=DARK_RED]3 bites[/color].[/p] +[p]Health points: [color=DARK_RED]6 bites[/color].[/p] [p]Reload time: [color=DARK_RED]5 seconds[/color].[/p] [p]Pea damage: [color=DARK_RED]1 pea[/color].[/p] [p]Firerate: [color=DARK_RED]1.5 seconds[/color].[/p]","Просто стреляет в зомби на линии. -Очки здоровья: [color=DARK_RED]3 укуса[/color]. +Очки здоровья: [color=DARK_RED]6 укусов[/color]. Время перезарядки: [color=DARK_RED]5 секунд[/color]. Урон от гороха: [color=DARK_RED]1 горошина[/color]. Задержка стрельбы: [color=DARK_RED]1.5 секунды[/color]." potatomine,Potato mine,Картофельная мина potatomine_desc,"[p]Explodes when stepped on. Needs some time to prime.[/p] -[p]Health points: [color=DARK_RED]2 bites[/color].[/p] +[p]Health points: [color=DARK_RED]4 bites[/color].[/p] [p]Reload time: [color=DARK_RED]25 seconds[/color].[/p] [p]Explosion damage: [color=DARK_RED]600 peas[/color].[/p] [p]Prime time: [color=DARK_RED]15 seconds[/color].[/p]","Взрывается когда на неё наступают. Требует некоторое время для роста. -Очки здоровья: [color=DARK_RED]2 Укуса[/color]. +Очки здоровья: [color=DARK_RED]4 Укуса[/color]. Время перезарядки: [color=DARK_RED]25 seconds[/color]. Урон от взрыва: [color=DARK_RED]600 горошин[/color]. -Время роста: [color=DARK_RED]15 seconds[/color]." +Время роста: [color=DARK_RED]15 секунд[/color]." snowpea,Snowpea,Снежный горох snowpea_desc,"[p]Shoots slowing peas at zombies.[/p] -[p]Health points: [color=DARK_RED]3 bites[/color].[/p] +[p]Health points: [color=DARK_RED]6 bites[/color].[/p] [p]Reload time: [color=DARK_RED]5 seconds[/color].[/p] [p]Pea damage: [color=DARK_RED]1 pea[/color].[/p] [p]Firerate: [color=DARK_RED]1.5 seconds[/color].[/p] [p]Slow percentage: [color=STEEL_BLUE]25%[/color].[/p]","Стреляет замедляющими горошинами в зомби. -Очки здоровья: [color=DARK_RED]3 укуса[/color]. +Очки здоровья: [color=DARK_RED]6 укусов[/color]. Время перезарядки: [color=DARK_RED]5 секунд[/color]. Урон от гороха: [color=DARK_RED]1 горошина[/color]. Задержка стрельбы: [color=DARK_RED]1.5 секунды[/color]. Процент замедления: [color=STEEL_BLUE]25%[/color]." spikeweed,Spikeweed,Колючка spikeweed_desc,"[p]Attacks zombies that step on it.[/p] -[p]Health points: [color=DARK_RED]3 bites[/color].[/p] +[p]Health points: [color=DARK_RED]6 bites[/color].[/p] [p]Reload time: [color=DARK_RED]5 seconds[/color].[/p] [p]Damage per second: [color=DARK_RED]0.9 peas[/color].[/p]","Атакует наступающих на неё зомби. -Очки здоровья: [color=DARK_RED]3 укуса[/color]. +Очки здоровья: [color=DARK_RED]6 укусов[/color]. Время перезарядки: [color=DARK_RED]5 секунд[/color]. Урон в секунду: [color=DARK_RED]0.9 горошин[/color]." sunflower,Sunflower,Подсолнух sunflower_desc,"[p]Produces sun over time.[/p] -[p]Health points: [color=DARK_RED]3 bites[/color][/p] +[p]Health points: [color=DARK_RED]6 bites[/color][/p] [p]Reload time: [color=DARK_RED]5 seconds[/color].[/p] [p]Initial sun production time: [color=DARK_RED]12 seconds[/color].[/p] [p]Sun production time: [color=DARK_RED]24 seconds[/color](After first sun produced).[/p]","Производит солнце время от времени. -Очки здоровья: [color=DARK_RED]3 укуса[/color] +Очки здоровья: [color=DARK_RED]6 укусов[/color] Время перезарядки: [color=DARK_RED]5 секунд[/color]. Изначальная задержка выработки солнца: [color=DARK_RED]12 секунд[/color]. Задержка выработки солнца: [color=DARK_RED]24 секунды[/color](После первого солнца)." threepeater,Threepeater,Тристрел threepeater_desc,"[p]Shoots peas at zombies in three lanes.[/p] -[p]Health points: [color=DARK_RED]3 bites[/color].[/p] +[p]Health points: [color=DARK_RED]6 bites[/color].[/p] [p]Reload time: [color=DARK_RED]5 seconds[/color].[/p] [p]Pea damage: [color=DARK_RED]1 pea[/color] ([color=DARK_RED]3 pea[/color] when in close quarters).[/p] [p]Firerate: [color=DARK_RED]1.6 seconds[/color].[/p]","Стреляет в зомби по трём линиям. -Очки здоровья: [color=DARK_RED]3 укуса[/color]. +Очки здоровья: [color=DARK_RED]6 укусов[/color]. Время перезарядки: [color=DARK_RED]5 секунд[/color]. Урон от гороха: [color=DARK_RED]1 горошина[/color] ([color=DARK_RED]3 горошины[/color] вблизи). Задержка стрельбы: [color=DARK_RED]1.6 секунд[/color]." wallnut,Wallnut,Стенорех wallnut_desc,"[p]Absorbs zombie damage. Does nothing special[/p] -[p]Health points: [color=DARK_RED]60 bites[/color][/p] +[p]Health points: [color=DARK_RED]120 bites[/color][/p] [p]Reload time: [color=DARK_RED]20 seconds[/color].[/p]","Принимает на себя урон от зомби. Ничего интересного. -Очки здоровья: [color=DARK_RED]60 укусов[/color] +Очки здоровья: [color=DARK_RED]120 укусов[/color] Время перезарядки: [color=DARK_RED]20 секунд[/color]." diff --git a/translations/plants.en.translation b/translations/plants.en.translation index 80e6a4e..d431b30 100644 Binary files a/translations/plants.en.translation and b/translations/plants.en.translation differ diff --git a/translations/plants.ru.translation b/translations/plants.ru.translation index 5662236..dc540f9 100644 Binary files a/translations/plants.ru.translation and b/translations/plants.ru.translation differ diff --git a/translations/zombies.csv b/translations/zombies.csv index 0e3d7eb..a7e1a25 100644 --- a/translations/zombies.csv +++ b/translations/zombies.csv @@ -3,35 +3,35 @@ basic,Basic zombie,Обычный зомби basic_desc,"The most basic zombie that Zomboss has. Health points: [color=darkred]7 peas[/color]. Walk speed: [color=darkred]0.2 tiles/second[/color]. -Attack speed: [color=darkred]1 Hz[/color]. +Attack speed: [color=darkred]2.67 Hz[/color]. Attack damage: [color=darkred]1 bite[/color]. ","Самый обычный зомби, который есть у Зомбосса. Очки здоровья: [color=darkred]7 горошин[/color]. Скорость ходьбы: [color=darkred]0.2 клеток/сек[/color]. -Скорость атаки: [color=darkred]1 Гц[/color]. +Скорость атаки: [color=darkred]2.67 Гц[/color]. Урон от атаки: [color=darkred]1 укус[/color]." buckethead,Buckethead,Ведроголовый buckethead_desc,"Wears metal to protect his remaining brains. Equivalent of ~7 zombies. Health points: [color=darkred]7 peas[/color]. Armour points: [color=darkred]39 peas[/color]. Walk speed: [color=darkred]0.2 tiles/second[/color]. -Attack speed: [color=darkred]1 Hz[/color]. +Attack speed: [color=darkred]2.67 Hz[/color]. Attack damage: [color=darkred]1 bite[/color]. ","Носит ведро чтобы защитить остатки мозгов. Равен примерно 7 зомби. Очки здоровья: [color=darkred]7 горошин[/color]. Очки брони: [color=darkred]39 горошин[/color]. -Скорость ходьбы: [color=darkred]0.2 клеток/сек/color]. -Скорость атаки: [color=darkred]1 Гц[/color]. +Скорость ходьбы: [color=darkred]0.2 клеток/сек[/color]. +Скорость атаки: [color=darkred]2.67 Гц[/color]. Урон от атаки: [color=darkred]1 укус[/color]." conehead,Conehead,Конусоголовый conehead_desc,"Armoured version of basic zombie. Equivalent of ~3 zombies. Health points: [color=darkred]7 peas[/color]. Armour points: [color=darkred]13 peas[/color]. Walk speed: [color=darkred]0.2 tiles/second[/color]. -Attack speed: [color=darkred]1 Hz[/color]. +Attack speed: [color=darkred]2.67 Hz[/color]. Attack damage: [color=darkred]1 bite[/color]. ","Бронированная версия базового зомби. Равен примерно трём зомби. Очки здоровья: [color=darkred]7 горошин[/color]. Очки брони: [color=darkred]13 горошин[/color]. Скорость ходьбы: [color=darkred]0.2 клеток/сек[/color]. -Скорость атаки: [color=darkred]1 Гц[/color]. +Скорость атаки: [color=darkred]2.67 Гц[/color]. Урон от атаки: [color=darkred]1 укус[/color]." hobo,Trash can zombie,Зомби в мусорке hobo_desc,"Some time in the past he met a great conqueror. Hates to live without his can. Equivalent of ~8 zombies. @@ -40,12 +40,14 @@ Health points: [color=darkred]13 peas[/color]. Armour points: [color=darkred]39 peas[/color]. Walk speed: [color=darkred]0.2 tiles/second[/color]. Run speed: [color=darkred]0.6 tiles/second[/color]. -Attack speed: [color=darkred]1 Hz[/color]. +Attack speed when calm: [color=darkred]1 Hz[/color]. +Attack speed when enraged: [color=darkred]8 Hz[/color]. Attack damage: [color=darkred]1 bite[/color]. ","Однажды повстречал великого полководца. Ненавидит жить без своего ведра. Равен примерно 8 зомби. -[color=darkgreen]Имеет иммунитет к эффектам как у чеснока. [/color] +[color=darkgreen]Имеет иммунитет к эффекту чеснока. [/color] Очки здоровья: [color=darkred]13 горошин[/color]. -Armour points: [color=darkred]39 горошин[/color]. +Очки брони: [color=darkred]39 горошин[/color]. Скорость ходьбы: [color=darkred]0.2 клеток/сек[/color]. Скорость бега: [color=darkred]0.6 клеток/сек[/color]. -Скорость атаки: [color=darkred]1 Гц[/color]. +Скорость атаки в покое: [color=darkred]1 Гц[/color]. +Скорость атаки в гневе: [color=darkred]8 Гц[/color]. Урон от атаки: [color=darkred]1 укус[/color]. " diff --git a/translations/zombies.en.translation b/translations/zombies.en.translation index 184a456..88a3679 100644 Binary files a/translations/zombies.en.translation and b/translations/zombies.en.translation differ diff --git a/translations/zombies.ru.translation b/translations/zombies.ru.translation index 6189382..3598bc4 100644 Binary files a/translations/zombies.ru.translation and b/translations/zombies.ru.translation differ