diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Room1.tscn b/DungeonShooting_Godot/resource/map/tileMaps/Room1.tscn index cb89658..38f57cb 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Room1.tscn +++ b/DungeonShooting_Godot/resource/map/tileMaps/Room1.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=5 format=3 uid="uid://degtollvmf37f"] +[gd_scene load_steps=4 format=3 uid="uid://degtollvmf37f"] [ext_resource type="TileSet" uid="uid://b00g22o1cqhe8" path="res://resource/map/tileset/TileSet1.tres" id="1_luio1"] [ext_resource type="Script" path="res://src/framework/map/DungeonRoomTemplate.cs" id="1_wwejn"] [ext_resource type="Script" path="res://src/framework/map/mark/EnemyMark.cs" id="3_2xk8s"] -[ext_resource type="Script" path="res://src/framework/map/mark/WeaponMark.cs" id="4_eqloj"] [node name="Room1" type="TileMap"] tile_set = ExtResource("1_luio1") @@ -12,35 +11,44 @@ script = ExtResource("1_wwejn") [node name="EnemyMark" type="Node2D" parent="."] -position = Vector2(114, -53) +position = Vector2(0, -56) script = ExtResource("3_2xk8s") -Weapon1Id = "0001" -Weapon1Ammo = 20 +Weapon1Id = "0002" +Weapon1Ammo = 15 +Weapon2Id = "0003" +Weapon2Ammo = 15 Type = 3 ItemId = "0001" Layer = 1 [node name="EnemyMark2" type="Node2D" parent="."] -position = Vector2(118, 74) +position = Vector2(0, 70) script = ExtResource("3_2xk8s") Weapon1Id = "0002" +Weapon1Ammo = 15 +Weapon2Id = "0003" +Weapon2Ammo = 15 +Type = 3 +ItemId = "0001" +Layer = 1 +DelayTime = 2.0 + +[node name="EnemyMark3" type="Node2D" parent="."] +position = Vector2(114, -54) +script = ExtResource("3_2xk8s") +Weapon1Id = "0004" Type = 3 ItemId = "0001" Layer = 1 WaveNumber = 2 -[node name="EnemyMark3" type="Node2D" parent="."] -position = Vector2(117, 4) +[node name="EnemyMark4" type="Node2D" parent="."] +position = Vector2(114, 72) script = ExtResource("3_2xk8s") -Weapon1Id = "0003" +Weapon1Id = "0001" +Weapon1Ammo = 45 Type = 3 ItemId = "0001" Layer = 1 -WaveNumber = 3 - -[node name="WeaponMark" type="Node2D" parent="."] -position = Vector2(-120, 72) -script = ExtResource("4_eqloj") -CurrAmmon = 0 -Type = 4 -ItemId = "0003" +WaveNumber = 2 +DelayTime = 2.0 diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Room2.tscn b/DungeonShooting_Godot/resource/map/tileMaps/Room2.tscn index 65649ad..2d8bf86 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Room2.tscn +++ b/DungeonShooting_Godot/resource/map/tileMaps/Room2.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://hbgdhf84okk6"] +[gd_scene load_steps=5 format=3 uid="uid://hbgdhf84okk6"] [ext_resource type="Script" path="res://src/framework/map/DungeonRoomTemplate.cs" id="1_hg3w8"] [ext_resource type="TileSet" uid="uid://b00g22o1cqhe8" path="res://resource/map/tileset/TileSet1.tres" id="1_u22xh"] [ext_resource type="Script" path="res://src/framework/map/mark/EnemyMark.cs" id="3_tgvyr"] +[ext_resource type="Script" path="res://src/framework/map/mark/WeaponMark.cs" id="4_x0odx"] [node name="Room2" type="TileMap"] tile_set = ExtResource("1_u22xh") @@ -11,8 +12,28 @@ script = ExtResource("1_hg3w8") [node name="EnemyMark" type="Node2D" parent="."] -position = Vector2(136, 72) +position = Vector2(77, 138) script = ExtResource("3_tgvyr") +Weapon1Id = "0002" +Weapon1Ammo = 25 Type = 3 ItemId = "0001" Layer = 1 + +[node name="EnemyMark2" type="Node2D" parent="."] +position = Vector2(190, 15) +script = ExtResource("3_tgvyr") +Weapon1Id = "0003" +Weapon1Ammo = 15 +Type = 3 +ItemId = "0001" +Layer = 1 + +[node name="WeaponMark" type="Node2D" parent="."] +position = Vector2(136, 71) +script = ExtResource("4_x0odx") +CurrAmmon = 30 +ResidueAmmo = 30 +Type = 4 +ItemId = "0001" +WaveNumber = 2 diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Room3.tscn b/DungeonShooting_Godot/resource/map/tileMaps/Room3.tscn index 80b9d59..6b12ae3 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Room3.tscn +++ b/DungeonShooting_Godot/resource/map/tileMaps/Room3.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=4 format=3 uid="uid://c83qc7utiy3pd"] +[gd_scene load_steps=5 format=3 uid="uid://c83qc7utiy3pd"] [ext_resource type="Script" path="res://src/framework/map/DungeonRoomTemplate.cs" id="1_n5qca"] [ext_resource type="TileSet" uid="uid://b00g22o1cqhe8" path="res://resource/map/tileset/TileSet1.tres" id="1_ngr66"] [ext_resource type="Script" path="res://src/framework/map/mark/EnemyMark.cs" id="3_jwvnp"] +[ext_resource type="Script" path="res://src/framework/map/mark/WeaponMark.cs" id="4_6je2e"] [node name="Room3" type="TileMap"] tile_set = ExtResource("1_ngr66") @@ -11,10 +12,39 @@ script = ExtResource("1_n5qca") [node name="EnemyMark" type="Node2D" parent="."] -position = Vector2(251, 212) +position = Vector2(230, 215) script = ExtResource("3_jwvnp") -Weapon1Id = "0003" -Weapon1Ammo = 20 Type = 3 ItemId = "0001" Layer = 1 + +[node name="EnemyMark2" type="Node2D" parent="."] +position = Vector2(261, 217) +script = ExtResource("3_jwvnp") +Type = 3 +ItemId = "0001" +Layer = 1 + +[node name="WeaponMark" type="Node2D" parent="."] +position = Vector2(248, 160) +script = ExtResource("4_6je2e") +ResidueAmmo = 12 +Type = 4 +ItemId = "0002" + +[node name="WeaponMark2" type="Node2D" parent="."] +position = Vector2(249, 268) +script = ExtResource("4_6je2e") +ResidueAmmo = 7 +Type = 4 +ItemId = "0003" + +[node name="EnemyMark3" type="Node2D" parent="."] +position = Vector2(246, 215) +script = ExtResource("3_jwvnp") +Weapon1Id = "0001" +Weapon1Ammo = 30 +Type = 3 +ItemId = "0001" +Layer = 1 +WaveNumber = 2 diff --git a/DungeonShooting_Godot/resource/theme/mainTheme.tres b/DungeonShooting_Godot/resource/theme/mainTheme.tres index 928f4ed..a5f82e0 100644 --- a/DungeonShooting_Godot/resource/theme/mainTheme.tres +++ b/DungeonShooting_Godot/resource/theme/mainTheme.tres @@ -352,7 +352,7 @@ [sub_resource type="ImageTexture" id="58"] -[sub_resource type="Image" id="Image_84wdf"] +[sub_resource type="Image" id="Image_jkfhj"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 66, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 66, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 39, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 75, 255, 255, 255, 39, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 39, 255, 255, 255, 67, 255, 255, 255, 67, 255, 255, 255, 39, 255, 255, 255, 1, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -362,7 +362,7 @@ } [sub_resource type="ImageTexture" id="60"] -image = SubResource("Image_84wdf") +image = SubResource("Image_jkfhj") [sub_resource type="StyleBoxTexture" id="61"] content_margin_left = 2.0 @@ -372,7 +372,7 @@ texture = SubResource("60") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_e5ni7"] +[sub_resource type="Image" id="Image_5b7nt"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 248, 248, 0, 248, 248, 248, 164, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 164, 248, 248, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 247, 247, 0, 247, 247, 247, 97, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 248, 248, 248, 186, 247, 247, 247, 97, 247, 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 191, 191, 191, 4, 247, 247, 247, 98, 248, 248, 248, 167, 248, 248, 248, 167, 247, 247, 247, 98, 191, 191, 191, 4, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 191, 191, 0, 247, 247, 247, 0, 248, 248, 248, 0, 248, 248, 248, 0, 247, 247, 247, 0, 191, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -382,7 +382,7 @@ } [sub_resource type="ImageTexture" id="63"] -image = SubResource("Image_e5ni7") +image = SubResource("Image_5b7nt") [sub_resource type="StyleBoxTexture" id="64"] content_margin_left = 2.0 @@ -392,7 +392,7 @@ texture = SubResource("63") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_nteam"] +[sub_resource type="Image" id="Image_4krwq"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 0, 173, 173, 173, 163, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 163, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 172, 172, 0, 172, 172, 172, 96, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 173, 173, 173, 185, 172, 172, 172, 96, 172, 172, 172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 127, 127, 127, 4, 173, 173, 173, 97, 173, 173, 173, 166, 173, 173, 173, 166, 173, 173, 173, 97, 127, 127, 127, 4, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 173, 173, 173, 0, 127, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -402,7 +402,7 @@ } [sub_resource type="ImageTexture" id="66"] -image = SubResource("Image_nteam") +image = SubResource("Image_4krwq") [sub_resource type="StyleBoxTexture" id="67"] content_margin_left = 2.0 @@ -412,7 +412,7 @@ texture = SubResource("66") region_rect = Rect2(0, 0, 12, 12) -[sub_resource type="Image" id="Image_urgwx"] +[sub_resource type="Image" id="Image_hxb67"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 16, 255, 255, 255, 21, 255, 255, 255, 21, 255, 255, 255, 16, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 4, 255, 255, 255, 16, 255, 255, 255, 16, 255, 255, 255, 4, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -422,7 +422,7 @@ } [sub_resource type="ImageTexture" id="69"] -image = SubResource("Image_urgwx") +image = SubResource("Image_hxb67") [sub_resource type="StyleBoxTexture" id="70"] content_margin_left = 0.0 @@ -446,7 +446,7 @@ content_margin_right = 4.0 content_margin_bottom = 4.0 -[sub_resource type="Image" id="Image_g5usv"] +[sub_resource type="Image" id="Image_wwkfg"] data = { "data": PackedByteArray(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 228, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 228, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 18, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 17, 255, 255, 255, 186, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 191, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 187, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 187, 255, 255, 255, 229, 255, 255, 255, 188, 255, 255, 255, 18, 255, 255, 255, 19, 255, 255, 255, 188, 255, 255, 255, 229, 255, 255, 255, 186, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 17, 255, 255, 255, 185, 255, 255, 255, 229, 255, 255, 255, 189, 255, 255, 255, 19, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 189, 255, 255, 255, 229, 255, 255, 255, 185, 255, 255, 255, 17, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 76, 255, 255, 255, 229, 255, 255, 255, 190, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 190, 255, 255, 255, 229, 255, 255, 255, 76, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 77, 255, 255, 255, 19, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 19, 255, 255, 255, 77, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), "format": "RGBA8", @@ -456,7 +456,7 @@ } [sub_resource type="ImageTexture" id="56"] -image = SubResource("Image_g5usv") +image = SubResource("Image_wwkfg") [sub_resource type="StyleBoxFlat" id="57"] content_margin_left = 6.0 diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs index 84b1505..2ff215f 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityObject_Register.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Reflection; +using Godot; public partial class ActivityObject { @@ -102,7 +103,7 @@ { return (T)instance; } - + GD.PrintErr("创建实例失败, 未找到id为'" + itemId + "'的物体!"); return null; } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs b/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs index a38d89f..c67ac6a 100644 --- a/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs +++ b/DungeonShooting_Godot/src/framework/map/AffiliationArea.cs @@ -69,7 +69,7 @@ if (activityObject.Affiliation != null) { - activityObject.Affiliation.RemoveItem(activityObject); + _includeItems.Remove(activityObject); } activityObject.Affiliation = this; _includeItems.Add(activityObject); @@ -86,6 +86,10 @@ /// public void RemoveItem(ActivityObject activityObject) { + if (activityObject.Affiliation == null) + { + return; + } activityObject.Affiliation = null; _includeItems.Remove(activityObject); } diff --git a/DungeonShooting_Godot/src/framework/map/DungeonTile.cs b/DungeonShooting_Godot/src/framework/map/DungeonTile.cs index 89d8c87..c8356a8 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonTile.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonTile.cs @@ -106,6 +106,7 @@ activityMark.GetParent().RemoveChild(activityMark); var pos = activityMark.GlobalPosition - offset; _tileRoot.AddChild(activityMark); + activityMark.Visible = false; activityMark.GlobalPosition = roomInfo.GetWorldPosition() + pos; } roomInfo.ActivityMarks.AddRange(activityMarks); diff --git a/DungeonShooting_Godot/src/framework/map/GenerateDungeon.cs b/DungeonShooting_Godot/src/framework/map/GenerateDungeon.cs index 7e140fb..5baba5b 100644 --- a/DungeonShooting_Godot/src/framework/map/GenerateDungeon.cs +++ b/DungeonShooting_Godot/src/framework/map/GenerateDungeon.cs @@ -148,6 +148,7 @@ //随机选择一个房间 var roomSplit = Utils.RandomChoose(GameApplication.Instance.RoomConfig); + //var roomSplit = GameApplication.Instance.RoomConfig[0]; var room = new RoomInfo(_count, roomSplit); //房间大小 diff --git a/DungeonShooting_Godot/src/framework/map/RoomInfo.cs b/DungeonShooting_Godot/src/framework/map/RoomInfo.cs index a0437b1..6207edd 100644 --- a/DungeonShooting_Godot/src/framework/map/RoomInfo.cs +++ b/DungeonShooting_Godot/src/framework/map/RoomInfo.cs @@ -63,9 +63,11 @@ /// public bool IsSeclusion { get; private set; } = false; + private bool _beReady = false; private bool _waveStart = false; private int _currWaveIndex = 0; private int _currWaveNumber = 0; + private List _currActivityMarks = new List(); /// /// 获取房间的全局坐标, 单位: 像素 @@ -128,26 +130,71 @@ //没有标记, 啥都不要做 if (ActivityMarks.Count == 0) { + _beReady = true; + IsSeclusion = false; return; } IsSeclusion = true; - - //按照 WaveNumber 排序 - ActivityMarks.Sort((x, y) => + _waveStart = false; + + if (!_beReady) { - return x.WaveNumber - y.WaveNumber; - }); - + _beReady = true; + //按照 WaveNumber 排序 + ActivityMarks.Sort((x, y) => + { + return x.WaveNumber - y.WaveNumber; + }); + } + //关门 foreach (var doorInfo in Doors) { doorInfo.Door.CloseDoor(); } - + + //执行第一波生成 NextWave(); } /// + /// 当前房间所有敌人都被清除了 + /// + public void OnClearRoom() + { + if (_currWaveIndex >= ActivityMarks.Count) //所有 mark 全部走完了 + { + IsSeclusion = false; + _currActivityMarks.Clear(); + //开门 + foreach (var doorInfo in Doors) + { + doorInfo.Door.OpenDoor(); + } + } + else //执行下一波 + { + NextWave(); + } + } + + /// + /// 返回当前这一波所有的标记的 Doing 函数是否执行完成 + /// + public bool IsCurrWaveOver() + { + for (var i = 0; i < _currActivityMarks.Count; i++) + { + if (!_currActivityMarks[i].IsOver()) + { + return false; + } + } + + return true; + } + + /// /// 执行下一轮标记 /// private void NextWave() @@ -158,24 +205,23 @@ _currWaveIndex = 0; _currWaveNumber = ActivityMarks[0].WaveNumber; } - + GD.Print("执行下一波, 当前: " + _currWaveNumber); + + _currActivityMarks.Clear(); //根据标记生成对象 - foreach (var mark in ActivityMarks) + for (; _currWaveIndex < ActivityMarks.Count; _currWaveIndex++) { - mark.BeReady(this); - } - } - - /// - /// 当前房间所有敌人都被清除了 - /// - public void OnClearRoom() - { - IsSeclusion = false; - //开门 - foreach (var doorInfo in Doors) - { - doorInfo.Door.OpenDoor(); + var mark = ActivityMarks[_currWaveIndex]; + if (mark.WaveNumber != _currWaveNumber) //当前这波已经执行完成了 + { + _currWaveNumber = mark.WaveNumber; + break; + } + else //生成操作 + { + mark.BeReady(this); + _currActivityMarks.Add(mark); + } } } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs b/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs index 0ea9181..f42fc93 100644 --- a/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs +++ b/DungeonShooting_Godot/src/framework/map/mark/ActivityMark.cs @@ -43,8 +43,9 @@ /// protected Color DrawColor = new Color(0.4F, 0.56078434F, 0.8784314F); - //是否已经开始 - private bool _isStart = false; + //是否已经结束 + private bool _isOver = true; + private float _overTimer = 0; private float _timer = 0; private RoomInfo _tempRoom; @@ -58,14 +59,21 @@ public override void _Process(double delta) { - if (_isStart && DelayTime > 0) + if (_isOver) { - _timer += (float)delta; - if (_timer >= DelayTime) + _overTimer += (float)delta; + } + else + { + if (DelayTime > 0) { - Doing(_tempRoom); - _tempRoom = null; - _isStart = false; + _timer += (float)delta; + if (_timer >= DelayTime) + { + Doing(_tempRoom); + _tempRoom = null; + _isOver = true; + } } } } @@ -75,11 +83,12 @@ /// public void BeReady(RoomInfo roomInfo) { - _isStart = true; + _isOver = false; + _overTimer = 0; if (DelayTime <= 0) { Doing(roomInfo); - _isStart = false; + _isOver = true; } else { @@ -93,32 +102,19 @@ /// public bool IsOver() { - return !_isStart; + return _isOver && _overTimer >= 1; } /// - /// 调用该函数表示该标记可以生成物体了, 使用标记创建实例必须调用 CreateInstance(id) + /// 调用该函数表示该标记可以生成物体了 /// public virtual void Doing(RoomInfo roomInfo) { - CreateInstance(GetItemId()); + var instance = ActivityObject.Create(GetItemId()); + instance.PutDown(GlobalPosition, Layer); Visible = false; } - - /// - /// 创建实例,并放入场景中,使用标记创建实例必须调用 CreateInstance(id) - /// - protected T CreateInstance(string id) where T : ActivityObject - { - var instance = ActivityObject.Create(id); - instance.PutDown(GlobalPosition, Layer); - if (instance is Enemy) - { - - } - return instance; - } - + public override void _Draw() { if (Engine.IsEditorHint() || GameApplication.Instance.Debug) diff --git a/DungeonShooting_Godot/src/game/role/Role.cs b/DungeonShooting_Godot/src/game/role/Role.cs index 883e7c5..aead7a9 100644 --- a/DungeonShooting_Godot/src/game/role/Role.cs +++ b/DungeonShooting_Godot/src/game/role/Role.cs @@ -295,7 +295,14 @@ //身上的武器的所属区域也得跟着变 Holster.ForEach((weapon, i) => { - weapon.Affiliation = Affiliation; + if (Affiliation != null) + { + Affiliation.InsertItem(weapon); + } + else if (weapon.Affiliation != null) + { + weapon.Affiliation.RemoveItem(weapon); + } }); } diff --git a/DungeonShooting_Godot/src/game/room/RoomManager.cs b/DungeonShooting_Godot/src/game/room/RoomManager.cs index 2c81832..0302485 100644 --- a/DungeonShooting_Godot/src/game/room/RoomManager.cs +++ b/DungeonShooting_Godot/src/game/room/RoomManager.cs @@ -45,6 +45,8 @@ private int _affiliationIndex = 0; + private float _checkEnemyTimer = 0; + //房间内所有静态导航网格数据 private static List _roomStaticNavigationList = new List(); @@ -55,7 +57,7 @@ _font = ResourceManager.Load(ResourcePath.resource_font_cn_font_36_tres); //绑定事件 - EventManager.AddEventListener(EventEnum.OnEnemyDie, OnEnemyDie); + //EventManager.AddEventListener(EventEnum.OnEnemyDie, OnEnemyDie); EventManager.AddEventListener(EventEnum.OnPlayerFirstEnterRoom, OnPlayerFirstEnterRoom); EventManager.AddEventListener(EventEnum.OnPlayerEnterRoom, OnPlayerEnterRoom); @@ -105,6 +107,17 @@ cursor.SetMountRole(Player); } + public override void _PhysicsProcess(double delta) + { + _checkEnemyTimer += (float)delta; + if (_checkEnemyTimer >= 1) + { + _checkEnemyTimer %= 1; + //检查房间内的敌人存活状况 + OnCheckEnemy(); + } + } + /// /// 获取指定层级根节点 /// @@ -250,17 +263,25 @@ } /// - /// 敌人死亡回调 + /// 检测当前房间敌人是否已经消灭干净, 应当每秒执行一次 /// - private void OnEnemyDie(object o) + private void OnCheckEnemy() { - var inst = (ActivityObject)o; - var count = ActiveAffiliation.FindIncludeItemsCount( - activityObject => activityObject != inst && activityObject.CollisionWithMask(PhysicsLayer.Enemy) - ); - if (count == 0) + var activeRoom = ActiveRoom; + if (activeRoom.IsSeclusion) { - ActiveRoom.OnClearRoom(); + if (activeRoom.IsCurrWaveOver()) //所有标记执行完成 + { + //存活敌人数量 + var count = ActiveAffiliation.FindIncludeItemsCount( + activityObject => activityObject.CollisionWithMask(PhysicsLayer.Enemy) + ); + GD.Print("当前房间存活数量: " + count); + if (count == 0) + { + activeRoom.OnClearRoom(); + } + } } }