diff --git a/assets/tileset/ashlands/ashlands-32x32.png b/assets/tileset/ashlands/ashlands-32x32.png new file mode 100644 index 0000000..0abb309 Binary files /dev/null and b/assets/tileset/ashlands/ashlands-32x32.png differ diff --git a/assets/tileset/ashlands/ashlands-32x32.png.import b/assets/tileset/ashlands/ashlands-32x32.png.import new file mode 100644 index 0000000..3c1ee02 --- /dev/null +++ b/assets/tileset/ashlands/ashlands-32x32.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d36b03p0hs8kw" +path="res://.godot/imported/ashlands-32x32.png-5a12b8ffccd561fa811259d566bd64e6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/tileset/ashlands/ashlands-32x32.png" +dest_files=["res://.godot/imported/ashlands-32x32.png-5a12b8ffccd561fa811259d566bd64e6.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/project.godot b/project.godot index d12489c..ba1a407 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="Frontier of Hell" -run/main_scene="res://scenes/stages/stage_5.tscn" +run/main_scene="res://scenes/stages/stage_6.tscn" config/features=PackedStringArray("4.1", "Mobile") boot_splash/bg_color=Color(0.141176, 0.141176, 0.141176, 1) boot_splash/image="res://assets/icons/logo.png" diff --git a/scenes/stages/stage_6.tscn b/scenes/stages/stage_6.tscn new file mode 100644 index 0000000..4ef0d13 --- /dev/null +++ b/scenes/stages/stage_6.tscn @@ -0,0 +1,719 @@ +[gd_scene load_steps=15 format=3 uid="uid://dcecwku0if8tg"] + +[ext_resource type="Script" path="res://scripts/stages/6/game_manager.gd" id="1_04mdc"] +[ext_resource type="Texture2D" uid="uid://d36b03p0hs8kw" path="res://assets/tileset/ashlands/ashlands-32x32.png" id="1_a4nl1"] +[ext_resource type="PackedScene" uid="uid://bhnv1dsggssil" path="res://scenes/ui/pause_menu.tscn" id="2_hovgl"] +[ext_resource type="PackedScene" uid="uid://cd5r1v6f8hahx" path="res://scenes/ui/tower_menu.tscn" id="3_8n8lc"] +[ext_resource type="Script" path="res://scripts/stages/6/summon.gd" id="3_gvmm4"] +[ext_resource type="PackedScene" uid="uid://cy88k4uxt1v37" path="res://scenes/ui/game_stats.tscn" id="4_k4wyn"] +[ext_resource type="PackedScene" uid="uid://dud7to2ncqrqe" path="res://scenes/enemies/demon_shark.tscn" id="4_kv0eg"] +[ext_resource type="PackedScene" uid="uid://bvoenhbaqiqj2" path="res://scenes/towers/placement/placement.tscn" id="5_ypi0p"] +[ext_resource type="PackedScene" uid="uid://cikgeqqhctm7k" path="res://scenes/base/base.tscn" id="6_h3kdb"] + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ebym7"] +texture = ExtResource("1_a4nl1") +texture_region_size = Vector2i(32, 32) +1:0/0 = 0 +2:0/0 = 0 +3:0/0 = 0 +4:0/0 = 0 +5:0/0 = 0 +6:0/0 = 0 +7:0/0 = 0 +8:0/0 = 0 +9:0/0 = 0 +10:0/0 = 0 +11:0/0 = 0 +12:0/0 = 0 +20:0/0 = 0 +21:0/0 = 0 +22:0/0 = 0 +23:0/0 = 0 +24:0/0 = 0 +32:0/0 = 0 +34:0/0 = 0 +0:1/0 = 0 +1:1/0 = 0 +2:1/0 = 0 +3:1/0 = 0 +4:1/0 = 0 +5:1/0 = 0 +6:1/0 = 0 +7:1/0 = 0 +8:1/0 = 0 +9:1/0 = 0 +10:1/0 = 0 +11:1/0 = 0 +12:1/0 = 0 +13:1/0 = 0 +19:1/0 = 0 +20:1/0 = 0 +21:1/0 = 0 +22:1/0 = 0 +23:1/0 = 0 +24:1/0 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 +25:9/0 = 0 +26:9/0 = 0 +27:9/0 = 0 +28:9/0 = 0 +34:9/0 = 0 +0:10/0 = 0 +1:10/0 = 0 +2:10/0 = 0 +3:10/0 = 0 +4:10/0 = 0 +5:10/0 = 0 +6:10/0 = 0 +7:10/0 = 0 +8:10/0 = 0 +9:10/0 = 0 +10:10/0 = 0 +11:10/0 = 0 +12:10/0 = 0 +13:10/0 = 0 +14:10/0 = 0 +15:10/0 = 0 +16:10/0 = 0 +20:10/0 = 0 +21:10/0 = 0 +22:10/0 = 0 +23:10/0 = 0 +24:10/0 = 0 +25:10/0 = 0 +26:10/0 = 0 +27:10/0 = 0 +0:11/0 = 0 +1:11/0 = 0 +2:11/0 = 0 +3:11/0 = 0 +4:11/0 = 0 +5:11/0 = 0 +6:11/0 = 0 +7:11/0 = 0 +8:11/0 = 0 +9:11/0 = 0 +10:11/0 = 0 +11:11/0 = 0 +12:11/0 = 0 +13:11/0 = 0 +14:11/0 = 0 +15:11/0 = 0 +20:11/0 = 0 +21:11/0 = 0 +22:11/0 = 0 +23:11/0 = 0 +24:11/0 = 0 +25:11/0 = 0 +26:11/0 = 0 +27:11/0 = 0 +1:12/0 = 0 +2:12/0 = 0 +3:12/0 = 0 +4:12/0 = 0 +5:12/0 = 0 +6:12/0 = 0 +7:12/0 = 0 +8:12/0 = 0 +9:12/0 = 0 +10:12/0 = 0 +11:12/0 = 0 +12:12/0 = 0 +13:12/0 = 0 +14:12/0 = 0 +15:12/0 = 0 +20:12/0 = 0 +21:12/0 = 0 +22:12/0 = 0 +23:12/0 = 0 +24:12/0 = 0 +25:12/0 = 0 +0:13/0 = 0 +1:13/0 = 0 +2:13/0 = 0 +3:13/0 = 0 +4:13/0 = 0 +5:13/0 = 0 +6:13/0 = 0 +7:13/0 = 0 +8:13/0 = 0 +9:13/0 = 0 +10:13/0 = 0 +11:13/0 = 0 +12:13/0 = 0 +13:13/0 = 0 +14:13/0 = 0 +15:13/0 = 0 +16:13/0 = 0 +20:13/0 = 0 +21:13/0 = 0 +22:13/0 = 0 +23:13/0 = 0 +24:13/0 = 0 +25:13/0 = 0 +0:14/0 = 0 +1:14/0 = 0 +2:14/0 = 0 +3:14/0 = 0 +4:14/0 = 0 +5:14/0 = 0 +6:14/0 = 0 +7:14/0 = 0 +8:14/0 = 0 +9:14/0 = 0 +10:14/0 = 0 +11:14/0 = 0 +12:14/0 = 0 +13:14/0 = 0 +14:14/0 = 0 +15:14/0 = 0 +16:14/0 = 0 +20:14/0 = 0 +21:14/0 = 0 +0:15/0 = 0 +1:15/0 = 0 +2:15/0 = 0 +3:15/0 = 0 +4:15/0 = 0 +5:15/0 = 0 +6:15/0 = 0 +7:15/0 = 0 +8:15/0 = 0 +9:15/0 = 0 +10:15/0 = 0 +11:15/0 = 0 +12:15/0 = 0 +13:15/0 = 0 +14:15/0 = 0 +15:15/0 = 0 +20:15/0 = 0 +21:15/0 = 0 +1:16/0 = 0 +2:16/0 = 0 +3:16/0 = 0 +4:16/0 = 0 +5:16/0 = 0 +6:16/0 = 0 +7:16/0 = 0 +8:16/0 = 0 +9:16/0 = 0 +10:16/0 = 0 +11:16/0 = 0 +12:16/0 = 0 +13:16/0 = 0 +14:16/0 = 0 +15:16/0 = 0 +20:16/0 = 0 +21:16/0 = 0 +22:16/0 = 0 +23:16/0 = 0 +24:16/0 = 0 +25:16/0 = 0 +26:16/0 = 0 +27:16/0 = 0 +28:16/0 = 0 +0:17/0 = 0 +1:17/0 = 0 +2:17/0 = 0 +3:17/0 = 0 +4:17/0 = 0 +5:17/0 = 0 +6:17/0 = 0 +7:17/0 = 0 +8:17/0 = 0 +9:17/0 = 0 +10:17/0 = 0 +11:17/0 = 0 +12:17/0 = 0 +13:17/0 = 0 +14:17/0 = 0 +15:17/0 = 0 +16:17/0 = 0 +20:17/0 = 0 +21:17/0 = 0 +22:17/0 = 0 +23:17/0 = 0 +24:17/0 = 0 +25:17/0 = 0 +26:17/0 = 0 +27:17/0 = 0 +0:18/0 = 0 +1:18/0 = 0 +2:18/0 = 0 +3:18/0 = 0 +4:18/0 = 0 +5:18/0 = 0 +6:18/0 = 0 +7:18/0 = 0 +8:18/0 = 0 +9:18/0 = 0 +10:18/0 = 0 +11:18/0 = 0 +12:18/0 = 0 +13:18/0 = 0 +14:18/0 = 0 +15:18/0 = 0 +16:18/0 = 0 +20:18/0 = 0 +21:18/0 = 0 +22:18/0 = 0 +23:18/0 = 0 +24:18/0 = 0 +25:18/0 = 0 +26:18/0 = 0 +27:18/0 = 0 +32:18/0 = 0 +33:18/0 = 0 +34:18/0 = 0 +35:18/0 = 0 +36:18/0 = 0 +37:18/0 = 0 +0:19/0 = 0 +1:19/0 = 0 +2:19/0 = 0 +3:19/0 = 0 +4:19/0 = 0 +5:19/0 = 0 +6:19/0 = 0 +7:19/0 = 0 +8:19/0 = 0 +9:19/0 = 0 +10:19/0 = 0 +11:19/0 = 0 +12:19/0 = 0 +13:19/0 = 0 +14:19/0 = 0 +15:19/0 = 0 +20:19/0 = 0 +21:19/0 = 0 +22:19/0 = 0 +23:19/0 = 0 +24:19/0 = 0 +25:19/0 = 0 +26:19/0 = 0 +27:19/0 = 0 +1:20/0 = 0 +2:20/0 = 0 +3:20/0 = 0 +6:20/0 = 0 +7:20/0 = 0 +8:20/0 = 0 +11:20/0 = 0 +12:20/0 = 0 +13:20/0 = 0 +31:14/size_in_atlas = Vector2i(8, 4) +31:14/0 = 0 +31:11/size_in_atlas = Vector2i(4, 3) +31:11/0 = 0 +35:11/size_in_atlas = Vector2i(4, 3) +35:11/0 = 0 +31:9/size_in_atlas = Vector2i(3, 1) +31:9/0 = 0 +31:10/size_in_atlas = Vector2i(2, 1) +31:10/0 = 0 +33:10/size_in_atlas = Vector2i(2, 1) +33:10/0 = 0 +38:9/size_in_atlas = Vector2i(1, 2) +38:9/0 = 0 +35:9/size_in_atlas = Vector2i(3, 1) +35:9/0 = 0 +35:10/size_in_atlas = Vector2i(3, 1) +35:10/0 = 0 +22:14/size_in_atlas = Vector2i(1, 2) +22:14/0 = 0 +23:14/size_in_atlas = Vector2i(2, 2) +23:14/0 = 0 +25:14/size_in_atlas = Vector2i(3, 2) +25:14/0 = 0 +26:12/size_in_atlas = Vector2i(2, 1) +26:12/0 = 0 +26:13/size_in_atlas = Vector2i(2, 1) +26:13/0 = 0 + +[sub_resource type="TileSet" id="TileSet_jrxg4"] +tile_size = Vector2i(32, 32) +sources/10 = SubResource("TileSetAtlasSource_ebym7") + +[sub_resource type="Curve2D" id="Curve2D_iccfv"] +_data = { +"points": PackedVector2Array(0, 0, 0, 0, -18, 130, 0, 0, 0, 0, 284, 132, 0, 0, 0, 0, 285, 295, 0, 0, 0, 0, 509, 297, 0, 0, 0, 0, 513, 516, 0, 0, 0, 0, 133, 519, 0, 0, 0, 0, 128, 663) +} +point_count = 7 + +[sub_resource type="Curve2D" id="Curve2D_yqbmq"] +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 799, -21, 0, 0, 0, 0, 797, 293, 0, 0, 0, 0, 505, 298, 0, 0, 0, 0, 512, 517, 0, 0, 0, 0, 699, 519, 0, 0, 0, 0, 702, 662) +} +point_count = 6 + +[sub_resource type="Curve2D" id="Curve2D_pfk7y"] +_data = { +"points": PackedVector2Array(0, 0, 0, 0, 1173, 389, 0, 0, 0, 0, 797, 385, 0, 0, 0, 0, 792, 296, 0, 0, 0, 0, 505, 298, 0, 0, 0, 0, 513, 514, 0, 0, 0, 0, 696, 524, 0, 0, 0, 0, 703, 659) +} +point_count = 7 + +[node name="GameManager" type="Node2D"] +script = ExtResource("1_04mdc") + +[node name="TileMap" type="TileMap" parent="."] +tile_set = SubResource("TileSet_jrxg4") +format = 2 +layer_0/tile_data = PackedInt32Array(196608, 65546, 1, 196609, 65546, 1, 196610, 65546, 1, 196611, 65546, 1, 196612, 65546, 1, 196613, 65546, 1, 196614, 65546, 1, 196615, 65546, 1, 196616, 65546, 1, 196617, 65546, 1, 262153, 65546, 1, 327689, 65546, 1, 393225, 65546, 1, 1245187, 65546, 1, 1179651, 65546, 1, 1114115, 65546, 1, 1048579, 65546, 1, 983043, 65546, 1, 983044, 65546, 1, 983045, 65546, 1, 983046, 65546, 1, 983047, 65546, 1, 983048, 65546, 1, 983049, 65546, 1, 983050, 65546, 1, 983051, 65546, 1, 983052, 65546, 1, 983053, 65546, 1, 983054, 65546, 1, 983055, 65546, 1, 983056, 65546, 1, 983057, 65546, 1, 983058, 65546, 1, 917520, 65546, 1, 851984, 65546, 1, 786448, 65546, 1, 720912, 65546, 1, 655376, 65546, 1, 589840, 65546, 1, 524304, 65546, 1, 524297, 65546, 1, 524298, 65546, 1, 524299, 65546, 1, 524300, 65546, 1, 524301, 65546, 1, 524302, 65546, 1, 524303, 65546, 1, 458761, 65546, 1, 524305, 65546, 1, 524306, 65546, 1, 524307, 65546, 1, 524308, 65546, 1, 524309, 65546, 1, 524310, 65546, 1, 524311, 65546, 1, 524312, 65546, 1, -65512, 65546, 1, 24, 65546, 1, 65560, 65546, 1, 131096, 65546, 1, 196632, 65546, 1, 262168, 65546, 1, 327704, 65546, 1, 393240, 65546, 1, 458776, 65546, 1, 786456, 65546, 1, 720920, 65546, 1, 655384, 65546, 1, 589848, 65546, 1, 786457, 65546, 1, 786458, 65546, 1, 786459, 65546, 1, 786460, 65546, 1, 786461, 65546, 1, 786462, 65546, 1, 786463, 65546, 1, 786464, 65546, 1, 786465, 65546, 1, 786466, 65546, 1, 786467, 65546, 1, 1310723, 65546, 1, 786468, 65546, 1, 262143, 65546, 1, 983062, 65546, 1, 1048598, 65546, 1, 1114134, 65546, 1, 1179670, 65546, 1, 1245206, 65546, 1, 1310742, 65546, 1, 983059, 65546, 1, 983060, 65546, 1, 983061, 65546, 1, 327679, 65546, 1, 262144, 65546, 1, 262145, 65546, 1, 262146, 65546, 1, 262147, 65546, 1, 262148, 65546, 1, 262149, 65546, 1, 262150, 65546, 1, 262151, 65546, 1, 262152, 65546, 1, 327688, 65546, 1, 393224, 65546, 1, 458760, 65546, 1, 524296, 65546, 1, 589832, 65546, 1, 589833, 65546, 1, 589834, 65546, 1, 589835, 65546, 1, 589836, 65546, 1, 589837, 65546, 1, 589838, 65546, 1, 589839, 65546, 1, 655375, 65546, 1, 720911, 65546, 1, 786447, 65546, 1, 851983, 65546, 1, 917519, 65546, 1, 1310724, 65546, 1, 1245188, 65546, 1, 1179652, 65546, 1, 1114116, 65546, 1, 1048580, 65546, 1, 1048581, 65546, 1, 1048582, 65546, 1, 1048583, 65546, 1, 1048584, 65546, 1, 1048585, 65546, 1, 1048586, 65546, 1, 1048587, 65546, 1, 1048588, 65546, 1, 1048589, 65546, 1, 1048590, 65546, 1, 1048591, 65546, 1, 1048592, 65546, 1, 1048593, 65546, 1, 1048594, 65546, 1, 1048595, 65546, 1, 1048596, 65546, 1, 1048597, 65546, 1, 1114133, 65546, 1, 1179669, 65546, 1, 1245205, 65546, 1, 1310741, 65546, 1, 589841, 65546, 1, 589842, 65546, 1, 589843, 65546, 1, 589844, 65546, 1, 589845, 65546, 1, 589846, 65546, 1, 589847, 65546, 1, -65511, 65546, 1, 25, 65546, 1, 65561, 65546, 1, 131097, 65546, 1, 196633, 65546, 1, 262169, 65546, 1, 327705, 65546, 1, 393241, 65546, 1, 458777, 65546, 1, 524313, 65546, 1, 589849, 65546, 1, 655385, 65546, 1, 720921, 65546, 1, 720922, 65546, 1, 720923, 65546, 1, 720924, 65546, 1, 720925, 65546, 1, 720926, 65546, 1, 720927, 65546, 1, 720928, 65546, 1, 720929, 65546, 1, 720930, 65546, 1, 720931, 65546, 1, 720932, 65546, 1, 852004, 458762, 13, 852003, 458762, 13, 852002, 458762, 13, 852001, 458762, 13, 852000, 458762, 13, 851999, 458762, 13, 851998, 458762, 13, 851997, 458762, 13, 851996, 458762, 13, 851995, 458762, 13, 851994, 458762, 13, 851993, 458762, 13, 851992, 458762, 13, 655378, 458762, 13, 655379, 458762, 13, 655380, 458762, 13, 655381, 458762, 13, 655382, 458762, 13, 1114131, 458762, 13, 1114130, 458762, 13, 1114129, 458762, 13, 1114128, 458762, 13, 1114127, 458762, 13, 1114126, 458762, 13, 1114125, 458762, 13, 1114124, 458762, 13, 1114123, 458762, 13, 1114122, 458762, 13, 1114121, 458762, 13, 1114120, 458762, 13, 1114119, 458762, 13, 1114118, 458762, 13, 655373, 458762, 13, 655372, 458762, 13, 655371, 458762, 13, 655370, 458762, 13, 655369, 458762, 13, 655368, 458762, 13, 327686, 458762, 13, 327685, 458762, 13, 327684, 458762, 13, 327683, 458762, 13, 327682, 458762, 13, 327681, 458762, 13, 327680, 458762, 13, 393215, 458762, 13, 196607, 458762, 15, 131072, 458762, 15, 131073, 458762, 15, 131074, 458762, 15, 131075, 458762, 15, 131076, 458762, 15, 131077, 458762, 15, 131078, 458762, 15, 131079, 458762, 15, 131080, 458762, 15, 131081, 458762, 15, 458763, 458762, 15, 458764, 458762, 15, 458765, 458762, 15, 458766, 458762, 15, 458767, 458762, 15, 458768, 458762, 15, 458769, 458762, 15, 458770, 458762, 15, 458771, 458762, 15, 458772, 458762, 15, 458773, 458762, 15, 458774, 458762, 15, 655387, 458762, 15, 655388, 458762, 15, 655389, 458762, 15, 655390, 458762, 15, 655391, 458762, 15, 655392, 458762, 15, 655393, 458762, 15, 655394, 458762, 15, 655395, 458762, 15, 655396, 458762, 15, 917522, 458762, 15, 917523, 458762, 15, 917524, 458762, 15, 917525, 458762, 15, 917526, 458762, 15, 917517, 458762, 15, 917516, 458762, 15, 917515, 458762, 15, 917514, 458762, 15, 917513, 458762, 15, 917512, 458762, 15, 917511, 458762, 15, 917510, 458762, 15, 917509, 458762, 15, 917508, 458762, 15, 917507, 458762, 15, 720913, 393226, 14, 786449, 393226, 14, 851985, 393226, 14, 327690, 393226, 14, 393226, 393226, 14, 196618, 393226, 14, 262154, 393226, 14, -65510, 393226, 14, 26, 393226, 14, 65562, 393226, 14, 131098, 393226, 14, 196634, 393226, 14, 262170, 393226, 14, 327706, 393226, 14, 393242, 393226, 14, 458778, 393226, 14, 524314, 393226, 14, 589850, 393226, 14, 983063, 393226, 14, 1048599, 393226, 14, 1114135, 393226, 14, 1179671, 393226, 14, 1245207, 393226, 14, 1310743, 393226, 14, 1179653, 393226, 14, 1245189, 393226, 14, 1310725, 393226, 14, 720910, 524298, 14, 786446, 524298, 14, 851982, 524298, 14, 720919, 524298, 14, 786455, 524298, 14, 1179668, 524298, 14, 1245204, 524298, 14, 1310740, 524298, 14, 393223, 524298, 14, 458759, 524298, 14, 524295, 524298, 14, 589831, 524298, 14, -65513, 524298, 14, 23, 524298, 14, 65559, 524298, 14, 131095, 524298, 14, 196631, 524298, 14, 262167, 524298, 14, 327703, 524298, 14, 393239, 524298, 14, 655386, 393226, 15, 458762, 393226, 15, 917521, 393226, 15, 458775, 524298, 15, 917518, 524298, 15, 655383, 524298, 13, 655374, 524298, 13, 1114132, 524298, 13, 327687, 524298, 13, 851991, 655370, 13, 655367, 655370, 13, 655377, 393226, 13, 1114117, 393226, 13, 917527, 589834, 14, 131082, 589834, 14, 983042, 524298, 14, 1048578, 524298, 14, 1114114, 524298, 14, 1179650, 524298, 14, 1245186, 524298, 14, 1310722, 524298, 14, 917506, 655370, 14, 393216, 458762, 14, 458752, 458762, 14, 524288, 458762, 14, 589824, 458762, 14, 655360, 458762, 14, 720896, 458762, 14, 786432, 458762, 14, 851968, 458762, 14, 393217, 458762, 14, 458753, 458762, 14, 524289, 458762, 14, 589825, 458762, 14, 655361, 458762, 14, 720897, 458762, 14, 786433, 458762, 14, 851969, 458762, 14, 393218, 458762, 14, 458754, 458762, 14, 524290, 458762, 14, 589826, 458762, 14, 655362, 458762, 14, 720898, 458762, 14, 786434, 458762, 14, 851970, 458762, 14, 393219, 458762, 14, 458755, 458762, 14, 524291, 458762, 14, 589827, 458762, 14, 655363, 458762, 14, 720899, 458762, 14, 786435, 458762, 14, 851971, 458762, 14, 393220, 458762, 14, 458756, 458762, 14, 524292, 458762, 14, 589828, 458762, 14, 655364, 458762, 14, 720900, 458762, 14, 786436, 458762, 14, 851972, 458762, 14, 393221, 458762, 14, 458757, 458762, 14, 524293, 458762, 14, 589829, 458762, 14, 655365, 458762, 14, 720901, 458762, 14, 786437, 458762, 14, 851973, 458762, 14, 393222, 458762, 14, 458758, 458762, 14, 524294, 458762, 14, 589830, 458762, 14, 655366, 458762, 14, 720902, 458762, 14, 786438, 458762, 14, 851974, 458762, 14, 720903, 458762, 14, 786439, 458762, 14, 851975, 458762, 14, 720904, 458762, 14, 786440, 458762, 14, 851976, 458762, 14, 720905, 458762, 14, 786441, 458762, 14, 851977, 458762, 14, 720906, 458762, 14, 786442, 458762, 14, 851978, 458762, 14, 720907, 458762, 14, 786443, 458762, 14, 851979, 458762, 14, 720908, 458762, 14, 786444, 458762, 14, 851980, 458762, 14, 720909, 458762, 14, 786445, 458762, 14, 851981, 458762, 14, 917504, 458762, 14, 983040, 458762, 14, 1048576, 458762, 14, 1114112, 458762, 14, 1179648, 458762, 14, 1245184, 458762, 14, 1310720, 458762, 14, 917505, 458762, 14, 983041, 458762, 14, 1048577, 458762, 14, 1114113, 458762, 14, 1179649, 458762, 14, 1245185, 458762, 14, 1310721, 458762, 14, 720914, 458762, 14, 786450, 458762, 14, 851986, 458762, 14, 720915, 458762, 14, 786451, 458762, 14, 851987, 458762, 14, 720916, 458762, 14, 786452, 458762, 14, 851988, 458762, 14, 720917, 458762, 14, 786453, 458762, 14, 851989, 458762, 14, 720918, 458762, 14, 786454, 458762, 14, 851990, 458762, 14, 11, 458762, 14, 65547, 458762, 14, 131083, 458762, 14, 196619, 458762, 14, 262155, 458762, 14, 327691, 458762, 14, 393227, 458762, 14, 12, 458762, 14, 65548, 458762, 14, 131084, 458762, 14, 196620, 458762, 14, 262156, 458762, 14, 327692, 458762, 14, 393228, 458762, 14, 13, 458762, 14, 65549, 458762, 14, 131085, 458762, 14, 196621, 458762, 14, 262157, 458762, 14, 327693, 458762, 14, 393229, 458762, 14, 14, 458762, 14, 65550, 458762, 14, 131086, 458762, 14, 196622, 458762, 14, 262158, 458762, 14, 327694, 458762, 14, 393230, 458762, 14, 15, 458762, 14, 65551, 458762, 14, 131087, 458762, 14, 196623, 458762, 14, 262159, 458762, 14, 327695, 458762, 14, 393231, 458762, 14, 16, 458762, 14, 65552, 458762, 14, 131088, 458762, 14, 196624, 458762, 14, 262160, 458762, 14, 327696, 458762, 14, 393232, 458762, 14, 17, 458762, 14, 65553, 458762, 14, 131089, 458762, 14, 196625, 458762, 14, 262161, 458762, 14, 327697, 458762, 14, 393233, 458762, 14, 18, 458762, 14, 65554, 458762, 14, 131090, 458762, 14, 196626, 458762, 14, 262162, 458762, 14, 327698, 458762, 14, 393234, 458762, 14, 19, 458762, 14, 65555, 458762, 14, 131091, 458762, 14, 196627, 458762, 14, 262163, 458762, 14, 327699, 458762, 14, 393235, 458762, 14, 20, 458762, 14, 65556, 458762, 14, 131092, 458762, 14, 196628, 458762, 14, 262164, 458762, 14, 327700, 458762, 14, 393236, 458762, 14, 21, 458762, 14, 65557, 458762, 14, 131093, 458762, 14, 196629, 458762, 14, 262165, 458762, 14, 327701, 458762, 14, 393237, 458762, 14, 22, 458762, 14, 65558, 458762, 14, 131094, 458762, 14, 196630, 458762, 14, 262166, 458762, 14, 327702, 458762, 14, 393238, 458762, 14, 0, 458762, 14, 65536, 458762, 14, 1, 458762, 14, 65537, 458762, 14, 2, 458762, 14, 65538, 458762, 14, 3, 458762, 14, 65539, 458762, 14, 4, 458762, 14, 65540, 458762, 14, 5, 458762, 14, 65541, 458762, 14, 6, 458762, 14, 65542, 458762, 14, 7, 458762, 14, 65543, 458762, 14, 8, 458762, 14, 65544, 458762, 14, 9, 458762, 14, 65545, 458762, 14, 10, 458762, 14, 65546, 458762, 14, 1179654, 458762, 14, 1245190, 458762, 14, 1310726, 458762, 14, 1179655, 458762, 14, 1245191, 458762, 14, 1310727, 458762, 14, 1179656, 458762, 14, 1245192, 458762, 14, 1310728, 458762, 14, 1179657, 458762, 14, 1245193, 458762, 14, 1310729, 458762, 14, 1179658, 458762, 14, 1245194, 458762, 14, 1310730, 458762, 14, 1179659, 458762, 14, 1245195, 458762, 14, 1310731, 458762, 14, 1179660, 458762, 14, 1245196, 458762, 14, 1310732, 458762, 14, 1179661, 458762, 14, 1245197, 458762, 14, 1310733, 458762, 14, 1179662, 458762, 14, 1245198, 458762, 14, 1310734, 458762, 14, 1179663, 458762, 14, 1245199, 458762, 14, 1310735, 458762, 14, 1179664, 458762, 14, 1245200, 458762, 14, 1310736, 458762, 14, 1179665, 458762, 14, 1245201, 458762, 14, 1310737, 458762, 14, 1179666, 458762, 14, 1245202, 458762, 14, 1310738, 458762, 14, 1179667, 458762, 14, 1245203, 458762, 14, 1310739, 458762, 14, 917528, 458762, 14, 983064, 458762, 14, 1048600, 458762, 14, 1114136, 458762, 14, 1179672, 458762, 14, 1245208, 458762, 14, 1310744, 458762, 14, 917529, 458762, 14, 983065, 458762, 14, 1048601, 458762, 14, 1114137, 458762, 14, 1179673, 458762, 14, 1245209, 458762, 14, 1310745, 458762, 14, 917530, 458762, 14, 983066, 458762, 14, 1048602, 458762, 14, 1114138, 458762, 14, 1179674, 458762, 14, 1245210, 458762, 14, 1310746, 458762, 14, 917531, 458762, 14, 983067, 458762, 14, 1048603, 458762, 14, 1114139, 458762, 14, 1179675, 458762, 14, 1245211, 458762, 14, 1310747, 458762, 14, 917532, 458762, 14, 983068, 458762, 14, 1048604, 458762, 14, 1114140, 458762, 14, 1179676, 458762, 14, 1245212, 458762, 14, 1310748, 458762, 14, 917533, 458762, 14, 983069, 458762, 14, 1048605, 458762, 14, 1114141, 458762, 14, 1179677, 458762, 14, 1245213, 458762, 14, 1310749, 458762, 14, 917534, 458762, 14, 983070, 458762, 14, 1048606, 458762, 14, 1114142, 458762, 14, 1179678, 458762, 14, 1245214, 458762, 14, 1310750, 458762, 14, 917535, 458762, 14, 983071, 458762, 14, 1048607, 458762, 14, 1114143, 458762, 14, 1179679, 458762, 14, 1245215, 458762, 14, 1310751, 458762, 14, 917536, 458762, 14, 983072, 458762, 14, 1048608, 458762, 14, 1114144, 458762, 14, 1179680, 458762, 14, 1245216, 458762, 14, 1310752, 458762, 14, 917537, 458762, 14, 983073, 458762, 14, 1048609, 458762, 14, 1114145, 458762, 14, 1179681, 458762, 14, 1245217, 458762, 14, 1310753, 458762, 14, 917538, 458762, 14, 983074, 458762, 14, 1048610, 458762, 14, 1114146, 458762, 14, 1179682, 458762, 14, 1245218, 458762, 14, 1310754, 458762, 14, 917539, 458762, 14, 983075, 458762, 14, 1048611, 458762, 14, 1114147, 458762, 14, 1179683, 458762, 14, 1245219, 458762, 14, 1310755, 458762, 14, 27, 458762, 14, 65563, 458762, 14, 131099, 458762, 14, 196635, 458762, 14, 262171, 458762, 14, 327707, 458762, 14, 393243, 458762, 14, 458779, 458762, 14, 524315, 458762, 14, 589851, 458762, 14, 28, 458762, 14, 65564, 458762, 14, 131100, 458762, 14, 196636, 458762, 14, 262172, 458762, 14, 327708, 458762, 14, 393244, 458762, 14, 458780, 458762, 14, 524316, 458762, 14, 589852, 458762, 14, 29, 458762, 14, 65565, 458762, 14, 131101, 458762, 14, 196637, 458762, 14, 262173, 458762, 14, 327709, 458762, 14, 393245, 458762, 14, 458781, 458762, 14, 524317, 458762, 14, 589853, 458762, 14, 30, 458762, 14, 65566, 458762, 14, 131102, 458762, 14, 196638, 458762, 14, 262174, 458762, 14, 327710, 458762, 14, 393246, 458762, 14, 458782, 458762, 14, 524318, 458762, 14, 589854, 458762, 14, 31, 458762, 14, 65567, 458762, 14, 131103, 458762, 14, 196639, 458762, 14, 262175, 458762, 14, 327711, 458762, 14, 393247, 458762, 14, 458783, 458762, 14, 524319, 458762, 14, 589855, 458762, 14, 32, 458762, 14, 65568, 458762, 14, 131104, 458762, 14, 196640, 458762, 14, 262176, 458762, 14, 327712, 458762, 14, 393248, 458762, 14, 458784, 458762, 14, 524320, 458762, 14, 589856, 458762, 14, 33, 458762, 14, 65569, 458762, 14, 131105, 458762, 14, 196641, 458762, 14, 262177, 458762, 14, 327713, 458762, 14, 393249, 458762, 14, 458785, 458762, 14, 524321, 458762, 14, 589857, 458762, 14, 34, 458762, 14, 65570, 458762, 14, 131106, 458762, 14, 196642, 458762, 14, 262178, 458762, 14, 327714, 458762, 14, 393250, 458762, 14, 458786, 458762, 14, 524322, 458762, 14, 589858, 458762, 14, 35, 458762, 14, 65571, 458762, 14, 131107, 458762, 14, 196643, 458762, 14, 262179, 458762, 14, 327715, 458762, 14, 393251, 458762, 14, 458787, 458762, 14, 524323, 458762, 14, 589859, 458762, 14, 1376259, 65546, 1, 1376260, 65546, 1, 1376277, 65546, 1, 1376278, 65546, 1, 1376279, 393226, 14, 1376261, 393226, 14, 1376258, 524298, 14, 1376276, 524298, 14, 1376256, 458762, 14, 1376257, 458762, 14, 1376262, 458762, 14, 1376263, 458762, 14, 1376264, 458762, 14, 1376265, 458762, 14, 1376266, 458762, 14, 1376267, 458762, 14, 1376268, 458762, 14, 1376269, 458762, 14, 1376270, 458762, 14, 1376271, 458762, 14, 1376272, 458762, 14, 1376273, 458762, 14, 1376274, 458762, 14, 1376275, 458762, 14, 1376291, 458762, 14, 1376290, 458762, 14, 1376289, 458762, 14, 1376288, 458762, 14, 1376287, 458762, 14, 1376286, 458762, 14, 1376285, 458762, 14, 1376284, 458762, 14, 1376283, 458762, 14, 1376282, 458762, 14, 1376281, 458762, 14, 1376280, 458762, 14) +layer_1/name = "" +layer_1/enabled = true +layer_1/modulate = Color(1, 1, 1, 1) +layer_1/y_sort_enabled = false +layer_1/y_sort_origin = 0 +layer_1/z_index = 0 +layer_1/tile_data = PackedInt32Array(851979, 1507338, 16, 786444, 1376266, 16, 786452, 1310730, 16, 851989, 1441802, 16, 1245209, 1507338, 16, 1179678, 1638410, 14, 1114143, 1507338, 14, 1114140, 1441802, 14, 589827, 1638410, 14, 262160, 1703946, 12, 458784, 1703946, 13, 327698, 1507338, 16, 393246, 1376266, 16, 524319, 1310730, 16, 1179659, 1441802, 14, 1179660, 1376266, 14) + +[node name="Path2D" type="Path2D" parent="."] +curve = SubResource("Curve2D_iccfv") +script = ExtResource("3_gvmm4") + +[node name="Timer" type="Timer" parent="Path2D"] +one_shot = true + +[node name="Path2D2" type="Path2D" parent="."] +curve = SubResource("Curve2D_yqbmq") +script = ExtResource("3_gvmm4") +type = 1 + +[node name="Timer" type="Timer" parent="Path2D2"] +one_shot = true + +[node name="Path2D3" type="Path2D" parent="."] +curve = SubResource("Curve2D_pfk7y") +script = ExtResource("3_gvmm4") +type = 2 + +[node name="Timer" type="Timer" parent="Path2D3"] +one_shot = true + +[node name="Enemy" parent="Path2D3" instance=ExtResource("4_kv0eg")] +position = Vector2(695.355, 523.855) +progress = 1150.78 + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="PauseMenu" parent="CanvasLayer" instance=ExtResource("2_hovgl")] +visible = false + +[node name="TowerMenu" parent="CanvasLayer" instance=ExtResource("3_8n8lc")] +visible = false + +[node name="GameStats" parent="CanvasLayer" instance=ExtResource("4_k4wyn")] +metadata/_edit_use_anchors_ = true + +[node name="Placements" type="Node2D" parent="."] + +[node name="placement" parent="Placements" instance=ExtResource("5_ypi0p")] +position = Vector2(203, 444) + +[node name="placement2" parent="Placements" instance=ExtResource("5_ypi0p")] +position = Vector2(372, 184) + +[node name="placement3" parent="Placements" instance=ExtResource("5_ypi0p")] +position = Vector2(720, 182) + +[node name="placement4" parent="Placements" instance=ExtResource("5_ypi0p")] +position = Vector2(598, 411) + +[node name="placement5" parent="Placements" instance=ExtResource("5_ypi0p")] +position = Vector2(940, 304) + +[node name="Bases" type="Node2D" parent="."] + +[node name="base" parent="Bases" instance=ExtResource("6_h3kdb")] +position = Vector2(683, 667) + +[node name="base2" parent="Bases" instance=ExtResource("6_h3kdb")] +position = Vector2(724, 666) + +[node name="base3" parent="Bases" instance=ExtResource("6_h3kdb")] +position = Vector2(106, 667) + +[node name="base4" parent="Bases" instance=ExtResource("6_h3kdb")] +position = Vector2(149, 667) + +[connection signal="timeout" from="Path2D/Timer" to="Path2D" method="_on_timer_timeout"] +[connection signal="timeout" from="Path2D2/Timer" to="Path2D2" method="_on_timer_timeout"] +[connection signal="timeout" from="Path2D3/Timer" to="Path2D3" method="_on_timer_timeout"] diff --git a/scripts/stages/6/config.gd b/scripts/stages/6/config.gd new file mode 100644 index 0000000..a3080e7 --- /dev/null +++ b/scripts/stages/6/config.gd @@ -0,0 +1,232 @@ +extends Node + + +var game = { + "health": 6, + "resource": 100, + "spawn_timer": 3.0, + "offset": [-20.0, 20.0], + "path_direction": [ + [ + { + "progress": 0, + "direction": "right", + }, + { + "progress": 303, + "direction": "front" + }, + { + "progress": 466, + "direction": "right" + }, + { + "progress": 690, + "direction": "front" + }, + { + "progress": 909, + "direction": "left" + }, + { + "progress": 1289, + "direction": "front" + } + ], + [ + { + "progress": 0, + "direction": "front", + }, + { + "progress": 315, + "direction": "left" + }, + { + "progress": 607, + "direction": "front" + }, + { + "progress": 826, + "direction": "right" + }, + { + "progress": 1011, + "direction": "front" + } + ], + [ + { + "progress": 0, + "direction": "left", + }, + { + "progress": 376, + "direction": "back" + }, + { + "progress": 465, + "direction": "left" + }, + { + "progress": 751, + "direction": "front" + }, + { + "progress": 969, + "direction": "right" + }, + { + "progress": 1150, + "direction": "front" + } + ] + ] +} + +var menu = [ + { + "name": "Cannon", + "image": load("res://assets/icons/towers/cannon-1.png"), + "image_disabled": load("res://assets/icons/towers/cannon-1-disabled.png"), + "price": 10 + }, + { + "name": "Railgun", + "image": load("res://assets/icons/towers/railgun-1.png"), + "image_disabled": load("res://assets/icons/towers/railgun-1-disabled.png"), + "price": 20 + }, + { + "name": "Cannon (V2)", + "image": load("res://assets/icons/towers/cannon-2.png"), + "image_disabled": load("res://assets/icons/towers/cannon-2-disabled.png"), + "price": 50 + }, + { + "name": "Railgun (V2)", + "image": load("res://assets/icons/towers/railgun-2.png"), + "image_disabled": load("res://assets/icons/towers/railgun-2-disabled.png"), + "price": 60 + }, + { + "name": "Cannon (V3)", + "image": load("res://assets/icons/towers/cannon-3.png"), + "image_disabled": load("res://assets/icons/towers/cannon-3-disabled.png"), + "price": 90 + }, + { + "name": "Railgun (V3)", + "image": load("res://assets/icons/towers/railgun-3.png"), + "image_disabled": load("res://assets/icons/towers/railgun-3-disabled.png"), + "price": 100 + } +] + +var tower = [ + { + "name": "Cannon", + "asset": preload("res://scenes/towers/cannon_1.tscn"), + "bullet": preload("res://scenes/bullets/bullet_1.tscn"), + "timer": 1, + "speed": 200, + "damage": 30, + "health": 100, + "durability_reduction": 10 + }, + { + "name": "Railgun", + "asset": preload("res://scenes/towers/railgun_1.tscn"), + "bullet": preload("res://scenes/bullets/bullet_1.tscn"), + "timer": 1, + "speed": 200, + "damage": 40, + "health": 100, + "durability_reduction": 10 + }, + { + "name": "Cannon (V2)", + "asset": preload("res://scenes/towers/cannon_2.tscn"), + "bullet": preload("res://scenes/bullets/bullet_1.tscn"), + "timer": 1, + "speed": 200, + "damage": 40, + "health": 100, + "durability_reduction": 10 + }, + { + "name": "Railgun (V2)", + "asset": preload("res://scenes/towers/railgun_2.tscn"), + "bullet": preload("res://scenes/bullets/bullet_1.tscn"), + "timer": 1, + "speed": 200, + "damage": 40, + "health": 100, + "durability_reduction": 10 + }, + { + "name": "Cannon (V3)", + "asset": preload("res://scenes/towers/cannon_3.tscn"), + "bullet": preload("res://scenes/bullets/bullet_1.tscn"), + "timer": 1, + "speed": 200, + "damage": 40, + "health": 100, + "durability_reduction": 10 + }, + { + "name": "Railgun (V3)", + "asset": preload("res://scenes/towers/railgun_3.tscn"), + "bullet": preload("res://scenes/bullets/bullet_1.tscn"), + "timer": 1, + "speed": 200, + "damage": 40, + "health": 100, + "durability_reduction": 10 + } +] + +var enemy = [ + { + "name": "Demon", + "health": 100, + "speed": 30, + "damage": 1, + "reward": 10 + }, + { + "name": "Orc", + "health": 100, + "speed": 30, + "damage": 1, + "reward": 20 + }, + { + "name": "Cyclops", + "health": 100, + "speed": 30, + "damage": 1, + "reward": 30 + }, + { + "name": "Demon Boar", + "health": 100, + "speed": 30, + "damage": 1, + "reward": 40 + }, + { + "name": "Demon Fungus", + "health": 100, + "speed": 30, + "damage": 1, + "reward": 50 + }, + { + "name": "Demon Shark", + "health": 100, + "speed": 30, + "damage": 1, + "reward": 60 + } +] diff --git a/scripts/stages/6/game_manager.gd b/scripts/stages/6/game_manager.gd new file mode 100644 index 0000000..0384bff --- /dev/null +++ b/scripts/stages/6/game_manager.gd @@ -0,0 +1,93 @@ +extends Node2D + +var config_path = "res://scripts/stages/6/config.gd" +var config = load(config_path).new() + +var data = { + "paused": false, + "tower": {}, + "health": config.game['health'], + "resource": config.game['resource'] +} + +func _ready(): + $CanvasLayer/GameStats.connect("on_paused", on_game_paused) + $CanvasLayer/PauseMenu.connect("on_resume", on_game_resume) + $CanvasLayer/GameStats.set_resource(data['resource']) + var bases = $Bases.get_children() + for base in bases: + base.connect("enemy_entered_base", on_enemy_entered_base) + var placements = $Placements.get_children() + for placement in placements: + placement.connect("on_placement", on_tower_placement) + $CanvasLayer/TowerMenu.connect("build_tower", on_build_tower) + +func on_game_paused(): + data['paused'] = !data['paused'] + get_tree().paused = data['paused'] + $CanvasLayer/PauseMenu.show_menu() + +func on_game_resume(): + data['paused'] = !data['paused'] + get_tree().paused = data['paused'] + $CanvasLayer/PauseMenu.hide_menu() + +func on_tower_placement(pos, tower_placement_id): + var tower_id = null + var disabled = false + var disabled_2 = false + if data['tower'].has(str(tower_placement_id)): + match data['tower'][str(tower_placement_id)]['id']: + 0: + tower_id = 2 + 1: + tower_id = 3 + 2: + tower_id = 4 + 3: + tower_id = 5 + _: + tower_id = null + + if data['resource'] < config.menu[tower_id]['price']: + disabled = true + else: + if data['resource'] < config.menu[0]['price']: + disabled = true + if data['resource'] < config.menu[1]['price']: + disabled_2 = true + $CanvasLayer/TowerMenu.show_menu(tower_id, pos, tower_placement_id, disabled, disabled_2) + +func on_build_tower(pos, tower_id, tower_placement_id): + if data['tower'].has(str(tower_placement_id)): + var current_tower = get_tree().current_scene.get_node(str(data['tower'][str(tower_placement_id)]['name'])) + current_tower.queue_free() + else: + data['tower'][str(tower_placement_id)] = {} + + var tower = config.tower[tower_id]['asset'].instantiate() + get_tree().current_scene.add_child(tower) + tower.set_config(config_path) + tower.set_tower(tower_id, tower_placement_id) + tower.set_timer() + tower.global_position = pos + tower.connect("on_destroy", on_tower_destroy) + + data['tower'][str(tower_placement_id)]['id'] = tower_id + data['tower'][str(tower_placement_id)]['name'] = tower.name + data['resource'] -= config.menu[tower_id]['price'] + $CanvasLayer/GameStats.set_resource(data['resource']) + +func on_tower_destroy(tower_placement_id): + data['tower'].erase(str(tower_placement_id)) + +func on_enemy_entered_base(enemy): + data['health'] -= enemy.damage + $CanvasLayer/GameStats.set_damage(enemy.damage) + + if data['health'] < 1: + print("Game Over") + +func on_enemy_reward(value: int): + data['resource'] += value + $CanvasLayer/GameStats.set_resource(data['resource']) diff --git a/scripts/stages/6/summon.gd b/scripts/stages/6/summon.gd new file mode 100644 index 0000000..a61025c --- /dev/null +++ b/scripts/stages/6/summon.gd @@ -0,0 +1,30 @@ +extends Path2D + +@onready var timer = $Timer +@export var type: int = 0 + +var config_path = "res://scripts/stages/6/config.gd" +var config = load(config_path).new() + +var spawn_first: bool = true + +var enemy: PackedScene = preload("res://scenes/enemies/demon.tscn") + +func _ready(): + summon() + timer.wait_time = config.game['spawn_timer'] + timer.start() + +func _on_timer_timeout(): + summon() + timer.start() + +func summon(): + var rng = RandomNumberGenerator.new() + + var enemy_instance = enemy.instantiate() + add_child(enemy_instance) + enemy_instance.set_config(config_path) + enemy_instance.set_enemy(0) + enemy_instance.set_direction(type) + enemy_instance.set_v_offset(rng.randf_range(config.game['offset'][0], config.game['offset'][1]))