diff --git a/DungeonShooting_Godot/excel/ActivityBase.xlsx b/DungeonShooting_Godot/excel/ActivityBase.xlsx index 560af91..e6240ec 100644 --- a/DungeonShooting_Godot/excel/ActivityBase.xlsx +++ b/DungeonShooting_Godot/excel/ActivityBase.xlsx Binary files differ diff --git a/DungeonShooting_Godot/prefab/effect/common/Effect1.tscn b/DungeonShooting_Godot/prefab/effect/common/Effect1.tscn index 9159fe4..c116d1e 100644 --- a/DungeonShooting_Godot/prefab/effect/common/Effect1.tscn +++ b/DungeonShooting_Godot/prefab/effect/common/Effect1.tscn @@ -2,8 +2,8 @@ [ext_resource type="Material" uid="uid://c1chld6lkpgji" path="res://resource/material/SmokeParticleMaterial.tres" id="1_dxavj"] [ext_resource type="Texture2D" uid="uid://bs1lan5uwxyfg" path="res://resource/curve/Curve1.tres" id="1_s60r7"] -[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/effects/common/Smoke.png" id="2_3kyig"] -[ext_resource type="Texture2D" uid="uid://csud4e6kc3iku" path="res://resource/sprite/effects/common/Effect1.png" id="3_1mceu"] +[ext_resource type="Texture2D" uid="uid://h7hkgbwj1li" path="res://resource/sprite/common/Smoke.png" id="2_3kyig"] +[ext_resource type="Texture2D" uid="uid://csud4e6kc3iku" path="res://resource/sprite/common/Effect1.png" id="3_1mceu"] [ext_resource type="Script" path="res://src/game/effects/AutoDestroyParticles.cs" id="3_2tlhx"] [sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_ipadv"] diff --git a/DungeonShooting_Godot/prefab/ui/EditorDungeonGroup.tscn b/DungeonShooting_Godot/prefab/ui/EditorDungeonGroup.tscn index 65d6f74..c29e13b 100644 --- a/DungeonShooting_Godot/prefab/ui/EditorDungeonGroup.tscn +++ b/DungeonShooting_Godot/prefab/ui/EditorDungeonGroup.tscn @@ -7,6 +7,8 @@ anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 script = ExtResource("1_apg3p") [node name="MarginContainer" type="MarginContainer" parent="."] diff --git a/DungeonShooting_Godot/prefab/ui/Main.tscn b/DungeonShooting_Godot/prefab/ui/Main.tscn index 74a3011..364e28a 100644 --- a/DungeonShooting_Godot/prefab/ui/Main.tscn +++ b/DungeonShooting_Godot/prefab/ui/Main.tscn @@ -32,8 +32,8 @@ [node name="Title" type="Label" parent="VBoxContainer"] layout_mode = 2 size_flags_vertical = 6 -theme_override_font_sizes/font_size = 160 -text = "Dungeon Shooting" +theme_override_font_sizes/font_size = 120 +text = "枪火地牢" horizontal_alignment = 1 vertical_alignment = 1 diff --git a/DungeonShooting_Godot/prefab/ui/MapEditor.tscn b/DungeonShooting_Godot/prefab/ui/MapEditor.tscn index 3239d65..144e166 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditor.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditor.tscn @@ -222,6 +222,7 @@ render_target_update_mode = 4 [node name="TileMap" type="TileMap" parent="Bg/VBoxContainer/HSplitContainer/HSplitContainer2/HBoxContainer/Left/MarginContainer/MapView/SubViewport" groups=["navigation"]] +y_sort_enabled = true position = Vector2(500, 540) scale = Vector2(4, 4) format = 2 @@ -284,6 +285,7 @@ [node name="MapEditorMapTile" parent="Bg/VBoxContainer/HSplitContainer/HSplitContainer2/Right/MarginContainer/TabContainer/MapTile" instance=ExtResource("10_4fu5v")] layout_mode = 2 +Layer = 1 [node name="MapMark" type="MarginContainer" parent="Bg/VBoxContainer/HSplitContainer/HSplitContainer2/Right/MarginContainer/TabContainer"] visible = false diff --git a/DungeonShooting_Godot/prefab/ui/MapEditorCreatePreinstall.tscn b/DungeonShooting_Godot/prefab/ui/MapEditorCreatePreinstall.tscn index a90e76d..9ef4b9b 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditorCreatePreinstall.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditorCreatePreinstall.tscn @@ -44,6 +44,23 @@ size_flags_stretch_ratio = 80.0 placeholder_text = "请输入预设名称" +[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 + +[node name="PreinstallNameLabel" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_stretch_ratio = 20.0 +text = "自动填充:" +horizontal_alignment = 2 +vertical_alignment = 1 + +[node name="AutoCheckInput" type="CheckBox" parent="MarginContainer/VBoxContainer/HBoxContainer2"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_stretch_ratio = 80.0 +flat = true + [node name="HBoxContainer4" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] layout_mode = 2 diff --git a/DungeonShooting_Godot/prefab/ui/MapEditorMapMark.tscn b/DungeonShooting_Godot/prefab/ui/MapEditorMapMark.tscn index 8bd0e6d..cfac2e0 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditorMapMark.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditorMapMark.tscn @@ -87,6 +87,22 @@ size_flags_horizontal = 3 size_flags_vertical = 3 +[node name="AutoFillTip" type="ColorRect" parent="VBoxContainer/ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(0, 40) +layout_mode = 2 +color = Color(0.360784, 0.764706, 1, 0.0784314) + +[node name="Label" type="Label" parent="VBoxContainer/ScrollContainer/VBoxContainer/AutoFillTip"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +text = "当前预设启用了自动填充" +horizontal_alignment = 1 +text_overrun_behavior = 3 + [node name="AddWaveButton" type="Button" parent="VBoxContainer/ScrollContainer/VBoxContainer"] layout_mode = 2 text = "添加波数" diff --git a/DungeonShooting_Godot/resource/config/ActivityBase.json b/DungeonShooting_Godot/resource/config/ActivityBase.json index c49dbc4..42cb08e 100644 --- a/DungeonShooting_Godot/resource/config/ActivityBase.json +++ b/DungeonShooting_Godot/resource/config/ActivityBase.json @@ -283,7 +283,7 @@ "Details": "", "IsStatic": false, "__Material": "", - "Prefab": "res://prefab/effect/enemy/Effect0001.tscn", + "Prefab": "res://prefab/prop/buff/BuffProp0001.tscn", "Icon": "res://resource/sprite/prop/buff/BuffProp0001.png", "ShowInMapEditor": true }, diff --git a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json index 669cb82..d8cf525 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json @@ -25,7 +25,12 @@ } ], "BossList": [], - "RewardList": [], + "RewardList": [ + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/Test1/reward/Award1" + } + ], "ShopList": [], "EventList": [], "Remark": "" diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/Preinstall.json index 8a267ba..7ae3c5b 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/Preinstall.json @@ -1 +1 @@ -[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":31,"Y":-17},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":null},"Altitude":0,"VerticalSpeed":0}]}]]}] \ No newline at end of file +[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":true,"WaveList":[[{"Position":{"X":31,"Y":-17},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":null},"Altitude":0,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/Preview.png index ad3a817..3eb065f 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/Preview.png +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/RoomInfo.json index e8c9e2f..6ee53d4 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/RoomInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/RoomInfo.json @@ -1 +1 @@ -{"Position":{"X":-4,"Y":-8},"Size":{"X":16,"Y":14},"DoorAreaInfos":[{"Direction":3,"Start":0,"End":128},{"Direction":1,"Start":0,"End":64},{"Direction":2,"Start":80,"End":192},{"Direction":0,"Start":80,"End":144}],"GroupName":"Test1","RoomType":0,"RoomName":"Battle1","Weight":100,"Remark":""} \ No newline at end of file +{"Position":{"X":-4,"Y":-8},"Size":{"X":16,"Y":14},"DoorAreaInfos":[{"Direction":3,"Start":0,"End":128},{"Direction":1,"Start":0,"End":64},{"Direction":2,"Start":64,"End":192},{"Direction":0,"Start":16,"End":144}],"GroupName":"Test1","RoomType":0,"RoomName":"Battle1","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/TileInfo.json index 1c4664d..bbf43c6 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/TileInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle1/TileInfo.json @@ -1 +1 @@ -{"NavigationVertices":[{"X":154,"Y":6},{"X":154,"Y":66},{"X":134,"Y":38},{"X":138,"Y":6},{"X":134,"Y":-30},{"X":138,"Y":-58},{"X":90,"Y":-58},{"X":74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-7,63,1,4,-6,2,2,5,-7,63,1,5,-6,2,2,5,1,54,1,5,2,1,2,6,-6,54,1,6,-5,1,2,6,1,27,1,6,2,3,2,7,-6,63,1,7,-5,2,2,7,0,27,1,7,1,3,2,8,-6,63,1,8,-5,2,2,9,-2,54,1,9,-1,1,2],"Top":[-4,-8,511,1,-4,-7,511,1,-4,-6,511,1,-4,-5,511,1,-4,-4,511,1,-4,-3,511,1,-4,-2,511,1,-4,-1,511,1,-4,0,511,1,-3,-8,511,1,-3,-7,255,1,-3,-6,219,1,-3,-5,219,1,-3,-4,219,1,-3,-3,219,1,-3,-2,219,1,-3,-1,507,1,-3,0,511,1,-3,1,511,1,-3,2,511,1,-3,3,511,1,-3,4,511,1,-2,-8,511,1,-2,-1,216,1,-2,0,219,1,-2,1,219,1,-2,2,219,1,-2,3,507,1,-2,4,511,1,-1,-8,511,1,-1,3,504,1,-1,4,511,1,0,-8,511,1,0,3,504,1,0,4,511,1,1,-8,511,1,1,3,504,1,1,4,511,1,1,5,511,1,2,-8,511,1,2,3,216,1,2,4,507,1,2,5,511,1,3,-8,511,1,3,4,504,1,3,5,511,1,4,-8,511,1,4,4,504,1,4,5,511,1,5,-8,511,1,5,-2,432,1,5,-1,438,1,5,0,438,1,5,4,504,1,5,5,511,1,6,-8,511,1,6,-7,447,1,6,-2,504,1,6,-1,511,1,6,0,255,1,6,4,504,1,6,5,511,1,7,-8,511,1,7,-7,511,1,7,-2,216,1,7,-1,219,1,7,4,504,1,7,5,511,1,8,-7,511,1,8,4,504,1,8,5,511,1,9,-7,511,1,9,-6,447,1,9,-5,438,1,9,-4,438,1,9,-3,438,1,9,4,504,1,9,5,511,1,10,-7,511,1,10,-6,511,1,10,-5,511,1,10,-4,511,1,10,-3,511,1,10,-2,447,1,10,-1,438,1,10,0,438,1,10,1,438,1,10,2,438,1,10,3,438,1,10,4,510,1,10,5,511,1,11,-3,511,1,11,-2,511,1,11,-1,511,1,11,0,511,1,11,1,511,1,11,2,511,1,11,3,511,1,11,4,511,1,11,5,511,1],"CustomFloor1":[],"CustomFloor2":[],"CustomFloor3":[],"CustomMiddle1":[],"CustomMiddle2":[],"CustomTop":[]} \ No newline at end of file +{"NavigationVertices":[{"X":154,"Y":-58},{"X":154,"Y":66},{"X":134,"Y":38},{"X":134,"Y":-30},{"X":90,"Y":-58},{"X":74,"Y":-30},{"X":74,"Y":38},{"X":38,"Y":66},{"X":38,"Y":50},{"X":-10,"Y":50},{"X":-10,"Y":-14},{"X":-26,"Y":-14},{"X":-26,"Y":-74},{"X":90,"Y":-74}],"NavigationPolygon":[[0,1,2,3],[4,0,3,5],[6,2,1,7,8],[8,9,10,5,6],[10,11,12,13,4,5]],"Floor":[-1,-1,0,3,3,-1,0,3,3,0,0,3,2,0,0,3,2,-1,0,3,1,-1,0,3,0,-1,0,3,0,0,0,3,-1,0,0,3,1,0,0,3,-1,1,0,3,0,1,0,3,1,1,0,3,2,1,0,3,3,1,0,3,4,1,0,3,4,2,0,3,3,2,0,3,2,2,0,3,1,2,0,3,0,2,0,3,-1,2,0,3,4,0,0,3,4,-1,0,3,4,-2,0,3,3,-2,0,3,2,-2,0,3,1,-2,0,3,0,-2,0,3,-1,-2,0,3,-1,-3,0,3,0,-3,0,3,1,-3,0,3,2,-3,0,3,3,-3,0,3,4,-3,0,3,5,-3,0,3,5,-4,0,3,5,-5,0,3,4,-5,0,3,3,-5,0,3,2,-5,0,3,1,-5,0,3,0,-5,0,3,-1,-5,0,3,-2,-5,0,3,-2,-4,0,3,-1,-4,0,3,0,-4,0,3,1,-4,0,3,2,-4,0,3,3,-4,0,3,4,-4,0,3,6,-4,0,3,7,-4,0,3,8,-4,0,3,8,-3,0,3,8,-2,0,3,7,-3,0,3,6,-3,0,3,8,-1,0,3,8,0,0,3,8,1,0,3,8,2,0,3,7,2,0,3,7,3,0,3,6,3,0,3,5,3,0,3,4,3,0,3,3,3,0,3,8,3,0,3,9,3,0,3,9,2,0,3,-2,-3,0,3,-2,-2,0,3,9,0,0,3,9,1,0,3,9,-1,0,3,9,-2,0,3,9,-3,0,3,9,-4,0,3,2,3,0,3,5,2,0,3,6,2,0,3],"Middle":[-2,-7,63,1,-2,-6,2,2,-1,-7,63,1,-1,-6,2,2,0,-7,63,1,0,-6,2,2,1,-7,63,1,1,-6,2,2,2,-7,63,1,2,-6,2,2,3,-7,63,1,3,-6,2,2,4,-7,63,1,4,-6,2,2,5,-7,63,1,5,-6,2,2,5,0,54,1,5,1,1,2,6,-6,54,1,6,-5,1,2,6,0,63,1,6,1,2,2,7,-6,63,1,7,-5,2,2,7,0,27,1,7,1,3,2,8,-6,63,1,8,-5,2,2,9,-6,63,1,9,-5,2,2],"Top":[-4,-8,511,1,-4,-7,511,1,-4,-6,511,1,-4,-5,511,1,-4,-4,511,1,-4,-3,511,1,-4,-2,511,1,-4,-1,511,1,-4,0,511,1,-3,-8,511,1,-3,-7,255,1,-3,-6,219,1,-3,-5,219,1,-3,-4,219,1,-3,-3,219,1,-3,-2,219,1,-3,-1,507,1,-3,0,511,1,-3,1,511,1,-3,2,511,1,-3,3,511,1,-3,4,511,1,-2,-8,511,1,-2,-1,216,1,-2,0,219,1,-2,1,219,1,-2,2,219,1,-2,3,507,1,-2,4,511,1,-1,-8,511,1,-1,3,504,1,-1,4,511,1,0,-8,511,1,0,3,504,1,0,4,511,1,0,5,511,1,1,-8,511,1,1,3,216,1,1,4,507,1,1,5,511,1,2,-8,511,1,2,4,504,1,2,5,511,1,3,-8,511,1,3,4,504,1,3,5,511,1,4,-8,511,1,4,4,504,1,4,5,511,1,5,-8,511,1,5,-2,432,1,5,-1,438,1,5,4,504,1,5,5,511,1,6,-8,511,1,6,-7,447,1,6,-2,504,1,6,-1,511,1,6,4,504,1,6,5,511,1,7,-8,511,1,7,-7,511,1,7,-2,216,1,7,-1,219,1,7,4,504,1,7,5,511,1,8,-7,511,1,8,4,504,1,8,5,511,1,9,-7,511,1,9,4,504,1,9,5,511,1,10,-7,511,1,10,-6,447,1,10,-5,438,1,10,-4,438,1,10,-3,438,1,10,-2,438,1,10,-1,438,1,10,0,438,1,10,1,438,1,10,2,438,1,10,3,438,1,10,4,510,1,10,5,511,1,11,-7,511,1,11,-6,511,1,11,-5,511,1,11,-4,511,1,11,-3,511,1,11,-2,511,1,11,-1,511,1,11,0,511,1,11,1,511,1,11,2,511,1,11,3,511,1,11,4,511,1,11,5,511,1],"CustomFloor1":[0,-4,2,2,6,0,-3,2,5,8,-1,-3,2,1,8,-1,-4,2,1,6,1,-4,2,2,6,1,-3,2,2,7,2,-4,2,2,6,2,-3,2,2,7,3,-4,2,2,6,3,-3,2,2,7,1,-2,2,2,7,0,-2,2,1,7,1,-1,2,2,7,0,-1,2,1,7,1,0,2,2,7,0,0,2,1,7,1,1,2,2,8,0,1,2,1,8,2,0,2,2,7,2,1,2,2,8,3,0,2,2,7,3,1,2,5,8,2,-1,2,2,7,2,-2,2,2,7,3,-2,2,2,7,3,-1,2,2,7,4,-4,2,2,6,4,-3,2,4,8,5,-4,2,2,6,5,-3,2,2,8,6,-4,2,2,6,6,-3,2,2,8,7,-4,2,2,6,7,-3,2,2,8,8,-4,2,2,6,8,-3,2,5,8,9,-4,2,3,6,9,-3,2,3,7,9,-2,2,3,7,8,-2,2,1,7,9,-1,2,3,7,8,-1,2,1,7,9,0,2,3,7,8,0,2,1,7,9,1,2,3,7,8,1,2,1,7,9,2,2,3,7,8,2,2,5,9,9,3,2,3,8,8,3,2,2,8,7,3,2,2,8,7,2,2,2,6,6,3,2,2,8,6,2,2,2,6,5,3,2,2,8,5,2,2,2,6,4,3,2,2,8,4,2,2,4,9,3,3,2,1,8,3,2,2,1,7,4,-2,2,3,7,4,-1,2,3,7,4,0,2,3,7,4,1,2,3,7],"CustomFloor2":[],"CustomFloor3":[],"CustomMiddle1":[],"CustomMiddle2":[],"CustomTop":[]} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/Preinstall.json index 638cd69..a9f951a 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/Preinstall.json @@ -1 +1 @@ -[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[]]}] \ No newline at end of file +[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":true,"WaveList":[[]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/Preview.png index 4feb157..f77bbb8 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/Preview.png +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/TileInfo.json index 6b29eda..d1baf6b 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/TileInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/TileInfo.json @@ -1 +1 @@ -{"NavigationVertices":[{"X":250,"Y":146},{"X":-106,"Y":146},{"X":-106,"Y":-106},{"X":250,"Y":-106}],"NavigationPolygon":[[0,1,2,3]],"Floor":[-7,-7,0,3,-7,-6,0,3,-7,-5,0,3,-7,-4,0,3,-7,-3,0,3,-7,-2,0,3,-7,-1,0,3,-7,0,0,3,-7,1,0,3,-7,2,0,3,-7,3,0,3,-7,4,0,3,-7,5,0,3,-7,6,0,3,-7,7,0,3,-7,8,0,3,-6,7,0,3,-6,8,0,3,-5,7,0,3,-5,8,0,3,-4,7,0,3,-4,8,0,3,-3,7,0,3,-3,8,0,3,-2,7,0,3,-2,8,0,3,-1,7,0,3,-1,8,0,3,0,7,0,3,0,8,0,3,1,7,0,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-1,-8,2,2,0,-9,63,1,0,-8,2,2,1,-9,63,1,1,-8,2,2,2,-9,63,1,2,-8,2,2,3,-9,63,1,3,-8,2,2,4,-9,63,1,4,-8,2,2,5,-9,63,1,5,-8,2,2,6,-9,63,1,6,-8,2,2,7,-9,63,1,7,-8,2,2,8,-9,63,1,8,-8,2,2,9,-9,63,1,9,-8,2,2,10,-9,63,1,10,-8,2,2,11,-9,63,1,11,-8,2,2,12,-9,63,1,12,-8,2,2,13,-9,63,1,13,-8,2,2,14,-9,63,1,14,-8,2,2,15,-9,63,1,15,-8,2,2],"Top":[-9,-10,511,1,-9,-9,511,1,-9,-8,511,1,-9,-7,511,1,-9,-6,511,1,-9,-5,511,1,-9,-4,511,1,-9,-3,511,1,-9,-2,511,1,-9,-1,511,1,-9,0,511,1,-9,1,511,1,-9,2,511,1,-9,3,511,1,-9,4,511,1,-9,5,511,1,-9,6,511,1,-9,7,511,1,-9,8,511,1,-9,9,511,1,-9,10,511,1,-8,-10,511,1,-8,-9,255,1,-8,-8,219,1,-8,-7,219,1,-8,-6,219,1,-8,-5,219,1,-8,-4,219,1,-8,-3,219,1,-8,-2,219,1,-8,-1,219,1,-8,0,219,1,-8,1,219,1,-8,2,219,1,-8,3,219,1,-8,4,219,1,-8,5,219,1,-8,6,219,1,-8,7,219,1,-8,8,219,1,-8,9,507,1,-8,10,511,1,-7,-10,511,1,-7,9,504,1,-7,10,511,1,-6,-10,511,1,-6,9,504,1,-6,10,511,1,-5,-10,511,1,-5,9,504,1,-5,10,511,1,-4,-10,511,1,-4,9,504,1,-4,10,511,1,-3,-10,511,1,-3,9,504,1,-3,10,511,1,-2,-10,511,1,-2,9,504,1,-2,10,511,1,-1,-10,511,1,-1,9,504,1,-1,10,511,1,0,-10,511,1,0,9,504,1,0,10,511,1,1,-10,511,1,1,9,504,1,1,10,511,1,2,-10,511,1,2,9,504,1,2,10,511,1,3,-10,511,1,3,9,504,1,3,10,511,1,4,-10,511,1,4,9,504,1,4,10,511,1,5,-10,511,1,5,9,504,1,5,10,511,1,6,-10,511,1,6,9,504,1,6,10,511,1,7,-10,511,1,7,9,504,1,7,10,511,1,8,-10,511,1,8,9,504,1,8,10,511,1,9,-10,511,1,9,9,504,1,9,10,511,1,10,-10,511,1,10,9,504,1,10,10,511,1,11,-10,511,1,11,9,504,1,11,10,511,1,12,-10,511,1,12,9,504,1,12,10,511,1,13,-10,511,1,13,9,504,1,13,10,511,1,14,-10,511,1,14,9,504,1,14,10,511,1,15,-10,511,1,15,9,504,1,15,10,511,1,16,-10,511,1,16,-9,447,1,16,-8,438,1,16,-7,438,1,16,-6,438,1,16,-5,438,1,16,-4,438,1,16,-3,438,1,16,-2,438,1,16,-1,438,1,16,0,438,1,16,1,438,1,16,2,438,1,16,3,438,1,16,4,438,1,16,5,438,1,16,6,438,1,16,7,438,1,16,8,438,1,16,9,510,1,16,10,511,1,17,-10,511,1,17,-9,511,1,17,-8,511,1,17,-7,511,1,17,-6,511,1,17,-5,511,1,17,-4,511,1,17,-3,511,1,17,-2,511,1,17,-1,511,1,17,0,511,1,17,1,511,1,17,2,511,1,17,3,511,1,17,4,511,1,17,5,511,1,17,6,511,1,17,7,511,1,17,8,511,1,17,9,511,1,17,10,511,1],"CustomFloor1":[3,3,2,2,7,2,3,2,2,7,3,4,2,2,7,2,4,2,2,7,3,5,2,2,7,2,5,2,2,7,1,5,2,2,7,1,4,2,2,7,2,6,2,2,7,1,6,2,2,7,3,6,2,2,7,4,5,2,2,7,4,6,2,2,7,5,5,2,2,7,5,6,2,2,7,10,4,2,2,7,9,4,2,2,7,11,4,2,2,7,11,3,2,2,7,10,3,2,2,7,11,2,2,2,7,10,2,2,2,7,10,1,2,2,7,10,0,2,2,7,8,4,2,2,7,5,4,2,2,7,4,4,2,2,7,4,3,2,2,7,5,3,2,2,7,8,2,2,2,7,8,3,2,2,7,9,2,2,2,7,9,3,2,2,7,9,1,2,2,7,5,-1,2,2,7,6,-1,2,2,7,8,-1,2,2,7,9,-1,2,2,7,9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omMiddle1":[],"CustomMiddle2":[],"CustomTop":[]} \ No newline at end of file +{"NavigationVertices":[{"X":-106,"Y":146},{"X":-26,"Y":54},{"X":154,"Y":6},{"X":198,"Y":6},{"X":250,"Y":146},{"X":198,"Y":-62},{"X":250,"Y":-106},{"X":-106,"Y":-106},{"X":154,"Y":-62},{"X":-70,"Y":54},{"X":-70,"Y":18},{"X":-26,"Y":18},{"X":-26,"Y":-10},{"X":-26,"Y":-46},{"X":-70,"Y":-46},{"X":-70,"Y":-10}],"NavigationPolygon":[[0,1,2,3,4],[3,5,6,4],[7,6,5,8],[9,1,0],[9,0,7,10],[2,1,11],[2,11,12,8],[8,12,13],[7,8,13,14],[15,12,11,10],[15,10,7],[15,7,14]],"Floor":[-7,-7,0,3,-7,-6,0,3,-7,-5,0,3,-7,-4,0,3,-7,-3,0,3,-7,-2,0,3,-7,-1,0,3,-7,0,0,3,-7,1,0,3,-7,2,0,3,-7,3,0,3,-7,4,0,3,-7,5,0,3,-7,6,0,3,-7,7,0,3,-7,8,0,3,-6,7,0,3,-6,8,0,3,-5,7,0,3,-5,8,0,3,-4,7,0,3,-4,8,0,3,-3,7,0,3,-3,8,0,3,-2,7,0,3,-2,8,0,3,-1,7,0,3,-1,8,0,3,0,7,0,3,0,8,0,3,1,7,0,3,1,8,0,3,2,7,0,3,2,8,0,3,3,7,0,3,3,8,0,3,4,7,0,3,4,8,0,3,5,7,0,3,5,8,0,3,6,7,0,3,6,8,0,3,7,7,0,3,7,8,0,3,8,7,0,3,8,8,0,3,9,7,0,3,9,8,0,3,10,7,0,3,10,8,0,3,11,7,0,3,11,8,0,3,12,7,0,3,12,8,0,3,13,7,0,3,13,8,0,3,14,7,0,3,14,8,0,3,15,-7,0,3,15,-6,0,3,15,-5,0,3,15,-4,0,3,15,-3,0,3,15,-2,0,3,15,-1,0,3,15,0,0,3,15,1,0,3,15,2,0,3,15,3,0,3,15,4,0,3,15,5,0,3,15,6,0,3,15,7,0,3,15,8,0,3,-6,-7,0,3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,0,3,11,5,0,3,11,6,0,3,12,-7,0,3,12,-6,0,3,12,-5,0,3,12,-4,0,3,12,-3,0,3,12,-2,0,3,12,-1,0,3,12,0,0,3,12,1,0,3,12,2,0,3,12,3,0,3,12,4,0,3,12,5,0,3,12,6,0,3,13,-7,0,3,13,-5,0,3,13,-4,0,3,13,-3,0,3,13,-2,0,3,13,-1,0,3,13,0,0,3,13,1,0,3,13,2,0,3,13,3,0,3,13,4,0,3,13,5,0,3,13,6,0,3,14,-7,0,3,14,-6,0,3,14,-5,0,3,14,-4,0,3,14,-3,0,3,14,-2,0,3,14,-1,0,3,14,0,0,3,14,1,0,3,14,2,0,3,14,3,0,3,14,4,0,3,14,5,0,3,14,6,0,3,13,-6,0,3],"Middle":[-7,-9,63,1,-7,-8,2,2,-6,-9,63,1,-6,-8,2,2,-5,-9,63,1,-5,-8,2,2,-4,-9,63,1,-4,-8,2,2,-4,-3,48,1,-4,-2,1,2,-4,1,48,1,-4,2,1,2,-3,-9,63,1,-3,-8,2,2,-3,-3,24,1,-3,-2,3,2,-3,1,24,1,-3,2,3,2,-2,-9,63,1,-2,-8,2,2,-1,-9,63,1,-1,-8,2,2,0,-9,63,1,0,-8,2,2,1,-9,63,1,1,-8,2,2,2,-9,63,1,2,-8,2,2,3,-9,63,1,3,-8,2,2,4,-9,63,1,4,-8,2,2,5,-9,63,1,5,-8,2,2,6,-9,63,1,6,-8,2,2,7,-9,63,1,7,-8,2,2,8,-9,63,1,8,-8,2,2,9,-9,63,1,9,-8,2,2,10,-9,63,1,10,-8,2,2,10,-2,54,1,10,-1,1,2,11,-9,63,1,11,-8,2,2,11,-2,27,1,11,-1,3,2,12,-9,63,1,12,-8,2,2,13,-9,63,1,13,-8,2,2,14,-9,63,1,14,-8,2,2,15,-9,63,1,15,-8,2,2],"Top":[-9,-10,511,1,-9,-9,511,1,-9,-8,511,1,-9,-7,511,1,-9,-6,511,1,-9,-5,511,1,-9,-4,511,1,-9,-3,511,1,-9,-2,511,1,-9,-1,511,1,-9,0,511,1,-9,1,511,1,-9,2,511,1,-9,3,511,1,-9,4,511,1,-9,5,511,1,-9,6,511,1,-9,7,511,1,-9,8,511,1,-9,9,511,1,-9,10,511,1,-8,-10,511,1,-8,-9,255,1,-8,-8,219,1,-8,-7,219,1,-8,-6,219,1,-8,-5,219,1,-8,-4,219,1,-8,-3,219,1,-8,-2,219,1,-8,-1,219,1,-8,0,219,1,-8,1,219,1,-8,2,219,1,-8,3,219,1,-8,4,219,1,-8,5,219,1,-8,6,219,1,-8,7,219,1,-8,8,219,1,-8,9,507,1,-8,10,511,1,-7,-10,511,1,-7,9,504,1,-7,10,511,1,-6,-10,511,1,-6,9,504,1,-6,10,511,1,-5,-10,511,1,-5,9,504,1,-5,10,511,1,-4,-10,511,1,-4,9,504,1,-4,10,511,1,-3,-10,511,1,-3,9,504,1,-3,10,511,1,-2,-10,511,1,-2,9,504,1,-2,10,511,1,-1,-10,511,1,-1,9,504,1,-1,10,511,1,0,-10,511,1,0,9,504,1,0,10,511,1,1,-10,511,1,1,9,504,1,1,10,511,1,2,-10,511,1,2,9,504,1,2,10,511,1,3,-10,511,1,3,9,504,1,3,10,511,1,4,-10,511,1,4,9,504,1,4,10,511,1,5,-10,511,1,5,9,504,1,5,10,511,1,6,-10,511,1,6,9,504,1,6,10,511,1,7,-10,511,1,7,9,504,1,7,10,511,1,8,-10,511,1,8,9,504,1,8,10,511,1,9,-10,511,1,9,9,504,1,9,10,511,1,10,-10,511,1,10,-4,432,1,10,-3,438,1,10,9,504,1,10,10,511,1,11,-10,511,1,11,-4,216,1,11,-3,219,1,11,9,504,1,11,10,511,1,12,-10,511,1,12,9,504,1,12,10,511,1,13,-10,511,1,13,9,504,1,13,10,511,1,14,-10,511,1,14,9,504,1,14,10,511,1,15,-10,511,1,15,9,504,1,15,10,511,1,16,-10,511,1,16,-9,447,1,16,-8,438,1,16,-7,438,1,16,-6,438,1,16,-5,438,1,16,-4,438,1,16,-3,438,1,16,-2,438,1,16,-1,438,1,16,0,438,1,16,1,438,1,16,2,438,1,16,3,438,1,16,4,438,1,16,5,438,1,16,6,438,1,16,7,438,1,16,8,438,1,16,9,510,1,16,10,511,1,17,-10,511,1,17,-9,511,1,17,-8,511,1,17,-7,511,1,17,-6,511,1,17,-5,511,1,17,-4,511,1,17,-3,511,1,17,-2,511,1,17,-1,511,1,17,0,511,1,17,1,511,1,17,2,511,1,17,3,511,1,17,4,511,1,17,5,511,1,17,6,511,1,17,7,511,1,17,8,511,1,17,9,511,1,17,10,511,1],"CustomFloor1":[3,3,2,2,7,2,3,2,2,7,3,4,2,2,7,2,4,2,2,7,3,5,2,2,7,2,5,2,2,7,1,5,2,2,7,1,4,2,2,7,2,6,2,2,7,1,6,2,2,7,3,6,2,2,7,4,5,2,2,7,4,6,2,2,7,5,5,2,2,7,5,6,2,2,7,10,4,2,2,7,9,4,2,2,7,11,4,2,2,7,11,3,2,2,7,10,3,2,2,7,11,2,2,2,7,10,2,2,2,7,10,1,2,2,7,10,0,2,2,6,8,4,2,2,7,5,4,2,2,7,4,4,2,2,7,4,3,2,2,7,5,3,2,2,7,8,2,2,2,7,8,3,2,2,7,9,2,2,2,7,9,3,2,2,7,9,1,2,2,7,5,-1,2,2,7,6,-1,2,2,7,8,-1,2,2,7,9,-1,2,3,7,9,0,2,4,9,-1,2,2,2,7,-2,2,2,1,7,-1,3,2,2,7,-2,3,2,5,9,-1,4,2,2,7,-2,4,2,2,7,-1,5,2,2,7,-2,5,2,2,7,0,4,2,2,7,0,5,2,2,7,0,6,2,2,7,-1,6,2,2,7,-2,6,2,2,7,0,2,2,2,7,0,3,2,2,7,1,3,2,2,7,4,-2,2,2,7,3,-2,2,2,7,4,-3,2,2,7,3,-3,2,2,7,4,-4,2,2,7,3,-4,2,2,7,5,-4,2,2,7,5,-3,2,2,7,6,-4,2,2,7,6,-3,2,2,7,7,-4,2,2,7,7,-3,2,2,7,8,-4,2,2,7,8,-3,2,2,7,9,-4,2,3,7,9,-3,2,3,7,8,-2,2,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,7,14,10,5,1,8,14,10,6,1,8,15,9,6,1,7,15,8,6,1,6,15,1,2,1,12,11,-2,6,1,0,15,0,-6,1,0,15,7,-5,1,3,5],"CustomFloor3":[],"CustomMiddle1":[],"CustomMiddle2":[],"CustomTop":[]} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json index 9287cc7..d237444 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json @@ -1 +1 @@ -[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":39,"Y":8},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":-16,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file +[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":true,"WaveList":[[{"Position":{"X":39,"Y":8},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":-16,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":66,"Y":6},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0009","Weight":100,"Attr":{"CurrAmmon":"1","ResidueAmmo":"25"},"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/outlet/End1/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/outlet/End1/Preinstall.json index 638cd69..a9f951a 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/outlet/End1/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/outlet/End1/Preinstall.json @@ -1 +1 @@ -[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[]]}] \ No newline at end of file +[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":true,"WaveList":[[]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preinstall.json new file mode 100644 index 0000000..a9f951a --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preinstall.json @@ -0,0 +1 @@ +[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":true,"WaveList":[[]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preview.png new file mode 100644 index 0000000..ca7df8c --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/RoomInfo.json new file mode 100644 index 0000000..1c2618c --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/RoomInfo.json @@ -0,0 +1 @@ +{"Position":{"X":-7,"Y":-6},"Size":{"X":11,"Y":12},"DoorAreaInfos":[{"Direction":3,"Start":0,"End":112},{"Direction":0,"Start":0,"End":112},{"Direction":2,"Start":0,"End":112},{"Direction":1,"Start":0,"End":112}],"GroupName":"Test1","RoomType":4,"RoomName":"Award1","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/TileInfo.json new file mode 100644 index 0000000..1feed79 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/TileInfo.json @@ -0,0 +1 @@ +{"NavigationVertices":[{"X":26,"Y":66},{"X":-74,"Y":66},{"X":-74,"Y":-42},{"X":26,"Y":-42}],"NavigationPolygon":[[0,1,2,3]],"Floor":[-5,-3,0,3,-5,-2,0,3,-5,-1,0,3,-5,0,0,3,-5,1,0,3,-5,2,0,3,-4,-3,0,3,-4,-2,0,3,-4,-1,0,3,-4,0,0,3,-4,1,0,3,-4,2,0,3,-3,-3,0,3,-3,-2,0,3,-3,-1,0,3,-3,0,0,3,-3,1,0,3,-3,2,0,3,-2,-3,0,3,-2,-2,0,3,-2,-1,0,3,-2,0,0,3,-2,1,0,3,-2,2,0,3,-1,-3,0,3,-1,-2,0,3,-1,-1,0,3,-1,0,0,3,-1,1,0,3,-1,2,0,3,0,-3,0,3,0,-2,0,3,0,-1,0,3,0,0,0,3,0,1,0,3,0,2,0,3,1,-3,0,3,1,-2,0,3,1,-1,0,3,1,0,0,3,1,1,0,3,1,2,0,3,-5,3,0,3,-4,3,0,3,-3,3,0,3,-2,3,0,3,-1,3,0,3,0,3,0,3,1,3,0,3],"Middle":[-5,-5,63,1,-5,-4,2,2,-4,-5,63,1,-4,-4,2,2,-3,-5,63,1,-3,-4,2,2,-2,-5,63,1,-2,-4,2,2,-1,-5,63,1,-1,-4,2,2,0,-5,63,1,0,-4,2,2,1,-5,63,1,1,-4,2,2],"Top":[-7,-6,511,1,-7,-5,511,1,-7,-4,511,1,-7,-3,511,1,-7,-2,511,1,-7,-1,511,1,-7,0,511,1,-7,1,511,1,-7,2,511,1,-7,3,511,1,-7,4,511,1,-7,5,511,1,-6,-6,511,1,-6,-5,255,1,-6,-4,219,1,-6,-3,219,1,-6,-2,219,1,-6,-1,219,1,-6,0,219,1,-6,1,219,1,-6,2,219,1,-6,3,219,1,-6,4,507,1,-6,5,511,1,-5,-6,511,1,-5,4,504,1,-5,5,511,1,-4,-6,511,1,-4,4,504,1,-4,5,511,1,-3,-6,511,1,-3,4,504,1,-3,5,511,1,-2,-6,511,1,-2,4,504,1,-2,5,511,1,-1,-6,511,1,-1,4,504,1,-1,5,511,1,0,-6,511,1,0,4,504,1,0,5,511,1,1,-6,511,1,1,4,504,1,1,5,511,1,2,-6,511,1,2,-5,447,1,2,-4,438,1,2,-3,438,1,2,-2,438,1,2,-1,438,1,2,0,438,1,2,1,438,1,2,2,438,1,2,3,438,1,2,4,510,1,2,5,511,1,3,-6,511,1,3,-5,511,1,3,-4,511,1,3,-3,511,1,3,-2,511,1,3,-1,511,1,3,0,511,1,3,1,511,1,3,2,511,1,3,3,511,1,3,4,511,1,3,5,511,1],"CustomFloor1":[-3,-1,1,18,8,-3,0,1,18,8,-3,1,1,18,8,-2,-1,1,18,8,-2,0,1,18,8,-2,1,1,18,8,-1,-1,1,18,8,-1,0,1,18,8,-1,1,1,18,8,-4,-2,2,4,8,-4,-3,2,2,6,-1,-2,2,2,8,-1,-3,2,2,6,-2,-2,2,2,8,-2,-3,2,2,6,-3,-2,2,2,8,-3,-3,2,2,6,0,-3,2,2,6,0,-2,2,5,8,1,-3,2,3,6,1,-2,2,3,7,1,-1,2,3,7,0,-1,2,1,7,1,0,2,3,7,0,0,2,1,7,1,1,2,3,7,0,1,2,1,7,1,2,2,3,7,0,2,2,5,9,1,3,2,3,8,0,3,2,2,8,-1,3,2,2,8,-1,2,2,2,6,-2,3,2,2,8,-2,2,2,2,6,-3,3,2,2,8,-3,2,2,2,6,-4,3,2,2,8,-4,2,2,4,9,-5,3,2,1,8,-5,2,2,1,7,-4,1,2,3,7,-5,1,2,1,7,-4,0,2,3,7,-5,0,2,1,7,-4,-1,2,3,7,-5,-1,2,1,7,-5,-2,2,1,7,-5,-3,2,1,6],"CustomFloor2":[-4,-2,1,13,5,0,-2,1,13,5,-4,2,1,13,6,0,2,1,13,6],"CustomFloor3":[],"CustomMiddle1":[],"CustomMiddle2":[],"CustomTop":[]} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Dice.png b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Dice.png new file mode 100644 index 0000000..6a767cb --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Dice.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Dice.png.import b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Dice.png.import new file mode 100644 index 0000000..c71ccef --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/Dice.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cg837c2qhscrm" +path="res://.godot/imported/Dice.png-bb14f0cc0f74e12e43728472a30e9dca.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/commonIcon/Dice.png" +dest_files=["res://.godot/imported/Dice.png-bb14f0cc0f74e12e43728472a30e9dca.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/DungeonShooting_Godot/resource/sprite/ui/commonIcon/PackageMark.png b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/PackageMark.png index 67234a6..6f566be 100644 --- a/DungeonShooting_Godot/resource/sprite/ui/commonIcon/PackageMark.png +++ b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/PackageMark.png Binary files differ diff --git a/DungeonShooting_Godot/scene/Main.tscn b/DungeonShooting_Godot/scene/Main.tscn index 346e221..a604cad 100644 --- a/DungeonShooting_Godot/scene/Main.tscn +++ b/DungeonShooting_Godot/scene/Main.tscn @@ -8,12 +8,8 @@ shader = ExtResource("2_fxoum") shader_parameter/offset = Vector2(0, 0) -[node name="Main" type="Node2D" node_paths=PackedStringArray("SubViewport", "SubViewportContainer", "SceneRoot", "GlobalNodeRoot")] +[node name="Main" type="Node2D"] script = ExtResource("1_mh1cq") -SubViewport = NodePath("ViewCanvas/SubViewportContainer/SubViewport") -SubViewportContainer = NodePath("ViewCanvas/SubViewportContainer") -SceneRoot = NodePath("ViewCanvas/SubViewportContainer/SubViewport/SceneRoot") -GlobalNodeRoot = NodePath("GlobalNodeRoot") metadata/_edit_vertical_guides_ = [] [node name="ViewCanvas" type="CanvasLayer" parent="."] diff --git a/DungeonShooting_Godot/scene/World.tscn b/DungeonShooting_Godot/scene/World.tscn index aa995e7..2bdf432 100644 --- a/DungeonShooting_Godot/scene/World.tscn +++ b/DungeonShooting_Godot/scene/World.tscn @@ -9,15 +9,8 @@ glow_strength = 1.05 glow_blend_mode = 1 -[node name="World" type="CanvasModulate" node_paths=PackedStringArray("NormalLayer", "YSortLayer", "TileRoot", "StaticSpriteRoot", "AffiliationAreaRoot", "FogMaskRoot", "NavigationRoot")] +[node name="World" type="CanvasModulate"] script = ExtResource("1_kt3mm") -NormalLayer = NodePath("TileRoot/NormalLayer") -YSortLayer = NodePath("TileRoot/YSortLayer") -TileRoot = NodePath("TileRoot") -StaticSpriteRoot = NodePath("TileRoot/StaticSpriteRoot") -AffiliationAreaRoot = NodePath("TileRoot/AffiliationAreaRoot") -FogMaskRoot = NodePath("TileRoot/FogMaskRoot") -NavigationRoot = NodePath("TileRoot/NavigationRoot") metadata/_edit_vertical_guides_ = [] [node name="WorldEnvironment" type="WorldEnvironment" parent="."] diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityId.cs b/DungeonShooting_Godot/src/framework/activity/ActivityId.cs index f4232b5..de3761c 100644 --- a/DungeonShooting_Godot/src/framework/activity/ActivityId.cs +++ b/DungeonShooting_Godot/src/framework/activity/ActivityId.cs @@ -74,6 +74,9 @@ return ""; } + /// + /// 根据 ActivityType 中的枚举类型获取类型名称的字符串 + /// public static string GetTypeName(ActivityType activityType) { switch (activityType) diff --git a/DungeonShooting_Godot/src/framework/common/SeedRandom.cs b/DungeonShooting_Godot/src/framework/common/SeedRandom.cs index 11acb6f..20e88c5 100644 --- a/DungeonShooting_Godot/src/framework/common/SeedRandom.cs +++ b/DungeonShooting_Godot/src/framework/common/SeedRandom.cs @@ -192,77 +192,73 @@ /// /// 返回指定区域内的随机坐标点, 该函数比较慢, 请谨慎调用 /// - /// 碰撞区域数据 - /// 需要随机点的数量 - public Vector2[] GetRandomPositionInPolygon(List polygonDataList, int count) + public Vector2[] GetRandomPositionInPolygon(List vertices, List polygons, int count) { + if (vertices.Count == 0 || polygons.Count == 0) + { + return Vector2.Zero.MakeArray(count); + } var minX = int.MaxValue; var maxX = int.MinValue; var minY = int.MaxValue; var maxY = int.MinValue; - - var outCount = 0; // 遍历多边形的顶点,找到最小和最大的x、y坐标 - foreach (var navigationPolygonData in polygonDataList) + foreach (var vertex in vertices) { - if (navigationPolygonData.Type == NavigationPolygonType.Out) + if (vertex.X < minX) { - outCount++; + minX = Mathf.CeilToInt(vertex.X); } - foreach (var vertex in navigationPolygonData.GetPoints()) + else if (vertex.X > maxX) { - if (vertex.X < minX) - { - minX = Mathf.CeilToInt(vertex.X); - } - else if (vertex.X > maxX) - { - maxX = Mathf.FloorToInt(vertex.X); - } - if (vertex.Y < minY) - { - minY = Mathf.CeilToInt(vertex.Y); - } - else if (vertex.Y > maxY) - { - maxY = Mathf.FloorToInt(vertex.Y); - } + maxX = Mathf.FloorToInt(vertex.X); + } + if (vertex.Y < minY) + { + minY = Mathf.CeilToInt(vertex.Y); + } + else if (vertex.Y > maxY) + { + maxY = Mathf.FloorToInt(vertex.Y); } } var list = new List(); + var tryCount = 0; while (true) { - var flag = outCount == 0; - var point = new Vector2(RandomRangeInt(minX, maxX), RandomRangeInt(minY, maxY)); - - foreach (var navigationPolygonData in polygonDataList) + if (tryCount >= 2000) //尝试2000次后放弃 { - if (navigationPolygonData.Type == NavigationPolygonType.Out) + while (list.Count < count) { - if (!flag && Utils.IsPointInPolygon(navigationPolygonData.GetPoints(), point)) - { - flag = true; - } + list.Add(Vector2.Zero); } - else - { - if (flag && Utils.IsPointInPolygon(navigationPolygonData.GetPoints(), point)) - { - flag = false; - } - } + break; } - if (flag) + tryCount++; + var point = new Vector2(RandomRangeInt(minX, maxX), RandomRangeInt(minY, maxY)); + foreach (var ps in polygons) { - list.Add(point); - if (list.Count >= count) + var arr = new List(); + foreach (var i in ps) { - return list.ToArray(); + arr.Add(vertices[i]); + } + + if (Utils.IsPointInPolygon(arr, point)) + { + tryCount = 0; + list.Add(point); + if (list.Count >= count) + { + return list.ToArray(); + } } } } + + return list.ToArray(); } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/common/Utils.cs b/DungeonShooting_Godot/src/framework/common/Utils.cs index da9d36d..04657df 100644 --- a/DungeonShooting_Godot/src/framework/common/Utils.cs +++ b/DungeonShooting_Godot/src/framework/common/Utils.cs @@ -330,6 +330,27 @@ return isInside; } + + /// + /// 返回一个点是否在 Polygon 内部 + /// + /// 多边形顶点 + /// 目标点 + public static bool IsPointInPolygon(List polygon, Vector2 point) + { + var isInside = false; + for (int i = 0, j = polygon.Count - 1; i < polygon.Count; j = i++) + { + if ((polygon[i].Y > point.Y) != (polygon[j].Y > point.Y) && + point.X < (polygon[j].X - polygon[i].X) * (point.Y - polygon[i].Y) / (polygon[j].Y - polygon[i].Y) + + polygon[i].X) + { + isInside = !isInside; + } + } + + return isInside; + } /// /// 根据法线翻转向量 diff --git a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs index b43adce..5ff6d7c 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs @@ -192,6 +192,10 @@ { tempPrevRoomInfo = prevRoomInfo; } + else if (nextRoomType == DungeonRoomType.Reward) + { + tempPrevRoomInfo = prevRoomInfo; + } else if (nextRoomType == DungeonRoomType.Battle) { if (chainTryCount < chainMaxTryCount) @@ -460,7 +464,7 @@ //判断房间是否参与计数 private bool IsParticipateCounting(RoomInfo roomInfo) { - return roomInfo.RoomType == DungeonRoomType.Battle || roomInfo.RoomType == DungeonRoomType.Boss; + return roomInfo.RoomType == DungeonRoomType.Battle || roomInfo.RoomType == DungeonRoomType.Boss || roomInfo.RoomType == DungeonRoomType.Reward; } //计算下一个房间类型 @@ -470,6 +474,10 @@ { _nextRoomType = DungeonRoomType.Inlet; } + else if (_count == 0) //奖励房间 + { + _nextRoomType = DungeonRoomType.Reward; + } else if (_count == _config.RoomCount - 1) //最后一个房间是boss房间 { _nextRoomType = DungeonRoomType.Boss; diff --git a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs index 1aef2f9..c5bbaa4 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs @@ -38,17 +38,17 @@ /// /// 根据 startRoom 和 config 数据自动填充 tileMap 参数中的地图数据, 该函数为协程函数 /// - public IEnumerator AutoFillRoomTile(AutoTileConfig config, RoomInfo startRoomInfo, SeedRandom random) + public IEnumerator AutoFillRoomTile(AutoTileConfig config, RoomInfo startRoomInfo, World world) { _connectNavigationItemList.Clear(); - yield return _AutoFillRoomTile(config, startRoomInfo, random); + yield return _AutoFillRoomTile(config, startRoomInfo, world); } - private IEnumerator _AutoFillRoomTile(AutoTileConfig config, RoomInfo roomInfo, SeedRandom random) + private IEnumerator _AutoFillRoomTile(AutoTileConfig config, RoomInfo roomInfo, World world) { foreach (var info in roomInfo.Next) { - yield return _AutoFillRoomTile(config, info, random); + yield return _AutoFillRoomTile(config, info, world); } //铺房间 @@ -110,21 +110,15 @@ //---------------------- 填充tile操作 ---------------------- var terrainInfo = config.TerrainInfo; - - //自动地形层 - //底层 - SetAutoLayerDataFromList(MapLayer.AutoFloorLayer, config.SourceId, roomInfo, tileInfo.Floor, rectPos, terrainInfo); - //中层 - SetAutoLayerDataFromList(MapLayer.AutoMiddleLayer, config.SourceId, roomInfo, tileInfo.Middle, rectPos, terrainInfo); - //顶层 - SetAutoLayerDataFromList(MapLayer.AutoTopLayer, config.SourceId, roomInfo, tileInfo.Top, rectPos, terrainInfo); - //自定义数据层 + SetAutoLayerDataFromList(MapLayer.AutoFloorLayer, config.SourceId, roomInfo, tileInfo.Floor, rectPos, terrainInfo); SetCustomLayerDataFromList(MapLayer.CustomFloorLayer1, roomInfo, tileInfo.CustomFloor1, rectPos); SetCustomLayerDataFromList(MapLayer.CustomFloorLayer2, roomInfo, tileInfo.CustomFloor2, rectPos); SetCustomLayerDataFromList(MapLayer.CustomFloorLayer3, roomInfo, tileInfo.CustomFloor3, rectPos); + SetAutoLayerDataFromList(MapLayer.AutoMiddleLayer, config.SourceId, roomInfo, tileInfo.Middle, rectPos, terrainInfo); SetCustomLayerDataFromList(MapLayer.CustomMiddleLayer1, roomInfo, tileInfo.CustomMiddle1, rectPos); SetCustomLayerDataFromList(MapLayer.CustomMiddleLayer2, roomInfo, tileInfo.CustomMiddle2, rectPos); + SetAutoLayerDataFromList(MapLayer.AutoTopLayer, config.SourceId, roomInfo, tileInfo.Top, rectPos, terrainInfo); SetCustomLayerDataFromList(MapLayer.CustomTopLayer, roomInfo, tileInfo.CustomTop, rectPos); //寻找可用传送点 @@ -155,7 +149,7 @@ else { var weights = roomInfo.RoomSplit.Preinstall.Select(info => info.Weight).ToArray(); - var index = random.RandomWeight(weights); + var index = world.Random.RandomWeight(weights); preinstallInfo = roomInfo.RoomSplit.Preinstall[index]; } } @@ -163,7 +157,7 @@ var roomPreinstall = new RoomPreinstall(roomInfo, preinstallInfo); roomInfo.RoomPreinstall = roomPreinstall; //执行预处理操作 - roomPreinstall.Pretreatment(random); + roomPreinstall.Pretreatment(world); } // yield break; diff --git a/DungeonShooting_Godot/src/framework/map/RandomPool.cs b/DungeonShooting_Godot/src/framework/map/RandomPool.cs new file mode 100644 index 0000000..50d0e33 --- /dev/null +++ b/DungeonShooting_Godot/src/framework/map/RandomPool.cs @@ -0,0 +1,145 @@ + +using System.Collections.Generic; +using Config; +using Godot; + +public class RandomPool +{ + /// + /// 随机数生成器 + /// + public SeedRandom Random { get; } + + /// + /// 所属世界 + /// + public World World { get; } + + public RandomPool(World world) + { + World = world; + Random = world.Random; + } + + /// + /// 获取随机武器 + /// + public ExcelConfig.ActivityBase GetRandomWeapon() + { + return Random.RandomChoose(PreinstallMarkManager.GetMarkConfigsByType(ActivityType.Weapon)); + } + + /// + /// 获取随机敌人 + /// + public ExcelConfig.ActivityBase GetRandomEnemy() + { + return Random.RandomChoose(PreinstallMarkManager.GetMarkConfigsByType(ActivityType.Enemy)); + } + + /// + /// 获取随机道具 + /// + public ExcelConfig.ActivityBase GetRandomProp() + { + return Random.RandomChoose(PreinstallMarkManager.GetMarkConfigsByType(ActivityType.Prop)); + } + + /// + /// 填充自动波次数据 + /// + public void FillAutoWave(RoomPreinstall preinstall) + { + if (preinstall.RoomInfo.RoomType == DungeonRoomType.Battle) + { + FillBattleRoom(preinstall); + } + else if (preinstall.RoomInfo.RoomType == DungeonRoomType.Reward) + { + FillRewardRoom(preinstall); + } + } + + //填充战斗房间 + private void FillBattleRoom(RoomPreinstall preinstall) + { + var count = World.Random.RandomRangeInt(3, 10); + var tileInfo = preinstall.RoomInfo.RoomSplit.TileInfo; + var serializeVector2s = tileInfo.NavigationVertices; + var vertices = new List(); + foreach (var sv2 in serializeVector2s) + { + vertices.Add(sv2.AsVector2()); + } + var positionArray = World.Random.GetRandomPositionInPolygon(vertices, tileInfo.NavigationPolygon, count); + var arr = new ActivityType[] { ActivityType.Enemy, ActivityType.Weapon, ActivityType.Prop }; + var weight = new int[] { 15, 2, 1 }; + for (var i = 0; i < count; i++) + { + var tempWave = GetOrCreateWave(preinstall, World.Random.RandomRangeInt(0, 2)); + var index = World.Random.RandomWeight(weight); + var activityType = arr[index]; + + //创建标记 + var mark = CreateMark(activityType, i * 0.3f, preinstall.RoomInfo.ToGlobalPosition(positionArray[i])); + + if (activityType == ActivityType.Enemy) //敌人 + { + mark.Id = GetRandomEnemy().Id; + mark.Attr.Add("Face", "0"); + mark.DerivedAttr = new Dictionary(); + mark.DerivedAttr.Add("Face", World.Random.RandomChoose((int)FaceDirection.Left, (int)FaceDirection.Right).ToString()); //链朝向 + if (World.Random.RandomBoolean(0.8f)) //手持武器 + { + var weapon = GetRandomWeapon(); + var weaponAttribute = Weapon.GetWeaponAttribute(weapon.Id); + mark.Attr.Add("Weapon", weapon.Id); //武器id + mark.Attr.Add("CurrAmmon", weaponAttribute.AmmoCapacity.ToString()); //弹夹弹药量 + mark.Attr.Add("ResidueAmmo", weaponAttribute.AmmoCapacity.ToString()); //剩余弹药量 + } + } + else if (activityType == ActivityType.Weapon) //武器 + { + mark.Id = GetRandomWeapon().Id; + } + else if (activityType == ActivityType.Prop) //道具 + { + mark.Id = GetRandomProp().Id; + } + tempWave.Add(mark); + } + } + + //填充奖励房间 + private void FillRewardRoom(RoomPreinstall preinstall) + { + var wave = GetOrCreateWave(preinstall, 0); + var mark = CreateMark(ActivityType.Prop, 0, (preinstall.RoomInfo.Waypoints + new Vector2(0.5f, 0.5f)) * GameConfig.TileCellSize); + mark.Id = GetRandomProp().Id; + wave.Add(mark); + } + + private List GetOrCreateWave(RoomPreinstall preinstall,int waveIndex) + { + while (preinstall.WaveList.Count <= waveIndex) + { + preinstall.WaveList.Add(new List()); + } + + return preinstall.WaveList[waveIndex]; + } + + //创建标记 + private ActivityMark CreateMark(ActivityType activityType, float delayTime, Vector2 pos) + { + var mark = new ActivityMark(); + mark.Attr = new Dictionary(); + mark.ActivityType = activityType; + mark.MarkType = SpecialMarkType.Normal; + mark.VerticalSpeed = 0; + mark.Altitude = activityType == ActivityType.Enemy ? 0 : 8; + mark.DelayTime = delayTime; + mark.Position = pos; + return mark; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/preinstall/ActivityMark.cs b/DungeonShooting_Godot/src/framework/map/preinstall/ActivityMark.cs index 9516ece..b1e974b 100644 --- a/DungeonShooting_Godot/src/framework/map/preinstall/ActivityMark.cs +++ b/DungeonShooting_Godot/src/framework/map/preinstall/ActivityMark.cs @@ -10,7 +10,7 @@ public string Id { get; set; } /// - /// 刷新位置 + /// 刷新位置, 单位: 像素 /// public Vector2 Position { get; set; } @@ -20,7 +20,7 @@ public Dictionary Attr { get; set; } /// - /// 衍生属性, 可随意修改值 + /// 衍生属性, 可随意修改值, 通常用于存储随机出来的数据 /// public Dictionary DerivedAttr { get; set; } diff --git a/DungeonShooting_Godot/src/framework/map/preinstall/PreinstallMarkManager.cs b/DungeonShooting_Godot/src/framework/map/preinstall/PreinstallMarkManager.cs new file mode 100644 index 0000000..cde2d24 --- /dev/null +++ b/DungeonShooting_Godot/src/framework/map/preinstall/PreinstallMarkManager.cs @@ -0,0 +1,109 @@ + +using System.Collections.Generic; +using Config; + + +public static class PreinstallMarkManager +{ + /// + /// 随机武器 + /// + public static readonly RandomActivityBase Weapon = new RandomActivityBase() + { + Id = "$RandomGun", + Name = "随机武器", + Type = (int)ActivityType.Other, + Icon = ResourcePath.resource_sprite_ui_commonIcon_Dice_png, + ShowInMapEditor = true + }; + + /// + /// 随机敌人 + /// + public static readonly RandomActivityBase Enemy = new RandomActivityBase() + { + Id = "$RandomEnemy", + Name = "随机敌人", + Type = (int)ActivityType.Other, + Icon = ResourcePath.resource_sprite_ui_commonIcon_Dice_png, + ShowInMapEditor = true + }; + + /// + /// 随机道具 + /// + public static readonly RandomActivityBase Prop = new RandomActivityBase() + { + Id = "$RandomProp", + Name = "随机道具", + Type = (int)ActivityType.Other, + Icon = ResourcePath.resource_sprite_ui_commonIcon_Dice_png, + ShowInMapEditor = true + }; + + private static Dictionary> _cache = + new Dictionary>(); + + private static bool _init = false; + + public static void Init() + { + if (_init)return; + _init = true; + foreach (var activityBase in ExcelConfig.ActivityBase_List) + { + var type = (ActivityType)activityBase.Type; + if (!_cache.TryGetValue(type, out var list)) + { + list = new List(); + _cache.Add(type, list); + } + list.Add(activityBase); + } + } + + /// + /// 根据id获取标记配置, 该函数会自动匹配随机标记 + /// + public static ExcelConfig.ActivityBase GetMarkConfig(string id) + { + if (Weapon.Id == id) + { + return Weapon; + } + else if (Enemy.Id == id) + { + return Enemy; + } + else if (Prop.Id == id) + { + return Prop; + } + + ExcelConfig.ActivityBase_Map.TryGetValue(id, out var activityBase); + return activityBase; + } + + public static List GetMarkConfigsByType(ActivityType type) + { + if (!_cache.TryGetValue(type, out var arr)) + { + arr = new List(); + _cache.Add(type, arr); + } + return arr; + } + + /// + /// 获取特殊标记名称 + /// + public static string GetSpecialName(SpecialMarkType type) + { + if (type == SpecialMarkType.BirthPoint) + { + return "出生标记"; + } + + return string.Empty; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/preinstall/RandomActivityBase.cs b/DungeonShooting_Godot/src/framework/map/preinstall/RandomActivityBase.cs new file mode 100644 index 0000000..77d16ac --- /dev/null +++ b/DungeonShooting_Godot/src/framework/map/preinstall/RandomActivityBase.cs @@ -0,0 +1,9 @@ + +using Config; + +/// +/// 用于随机生成的物体标记 +/// +public class RandomActivityBase : ExcelConfig.ActivityBase +{ +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs b/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs index fdc3258..458b8bc 100644 --- a/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs +++ b/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs @@ -80,7 +80,7 @@ /// /// 预处理操作 /// - public void Pretreatment(SeedRandom random) + public void Pretreatment(World world) { if (_runPretreatment) { @@ -111,38 +111,64 @@ else { var tempArray = markInfo.MarkList.Select(item => item.Weight).ToArray(); - var index = random.RandomWeight(tempArray); + var index = world.Random.RandomWeight(tempArray); markInfoItem = markInfo.MarkList[index]; } - - mark.Id = markInfoItem.Id; + + var activityBase = PreinstallMarkManager.GetMarkConfig(markInfoItem.Id); mark.Attr = markInfoItem.Attr; - mark.DerivedAttr = new Dictionary(); mark.VerticalSpeed = markInfoItem.VerticalSpeed; mark.Altitude = markInfoItem.Altitude; - mark.ActivityType = (ActivityType)ExcelConfig.ActivityBase_Map[markInfoItem.Id].Type; - - if (mark.ActivityType == ActivityType.Enemy) //敌人类型 + + if (activityBase is RandomActivityBase) //随机物体 { - _hsaEnemy = true; - if (!mark.Attr.TryGetValue("Face", out var face) || face == "0") //随机方向 + if (markInfoItem.Id == PreinstallMarkManager.Weapon.Id) //随机武器 { - mark.DerivedAttr.Add("Face", - random.RandomChoose( - ((int)FaceDirection.Left).ToString(), - ((int)FaceDirection.Right).ToString() - ) - ); + mark.Id = world.RandomPool.GetRandomWeapon()?.Id; + mark.ActivityType = ActivityType.Weapon; } - else //指定方向 + else if (markInfoItem.Id == PreinstallMarkManager.Enemy.Id) //随机敌人 { - mark.DerivedAttr.Add("Face", face); + mark.Id = world.RandomPool.GetRandomEnemy()?.Id; + mark.ActivityType = ActivityType.Enemy; + } + else if (markInfoItem.Id == PreinstallMarkManager.Prop.Id) //随机道具 + { + mark.Id = world.RandomPool.GetRandomProp()?.Id; + mark.ActivityType = ActivityType.Prop; + } + else //非随机物体 + { + Debug.LogError("未知的随机物体:" + markInfoItem.Id); + continue; + } + } + else + { + mark.Id = markInfoItem.Id; + mark.ActivityType = (ActivityType)activityBase.Type; + if (mark.ActivityType == ActivityType.Enemy) //敌人类型 + { + mark.DerivedAttr = new Dictionary(); + if (!mark.Attr.TryGetValue("Face", out var face) || face == "0") //随机方向 + { + mark.DerivedAttr.Add("Face", + world.Random.RandomChoose( + ((int)FaceDirection.Left).ToString(), + ((int)FaceDirection.Right).ToString() + ) + ); + } + else //指定方向 + { + mark.DerivedAttr.Add("Face", face); + } } } } else if (markInfo.SpecialMarkType == SpecialMarkType.BirthPoint) //玩家出生标记 { - + } else { @@ -156,18 +182,42 @@ var pos = markInfo.Position.AsVector2(); var birthRect = markInfo.Size.AsVector2(); var tempPos = new Vector2( - random.RandomRangeInt((int)(pos.X - birthRect.X / 2), (int)(pos.X + birthRect.X / 2)), - random.RandomRangeInt((int)(pos.Y - birthRect.Y / 2), (int)(pos.Y + birthRect.Y / 2)) + world.Random.RandomRangeInt((int)(pos.X - birthRect.X / 2), (int)(pos.X + birthRect.X / 2)), + world.Random.RandomRangeInt((int)(pos.Y - birthRect.Y / 2), (int)(pos.Y + birthRect.Y / 2)) ); - //var offset = RoomInfo.RoomSplit.RoomInfo.Position.AsVector2I(); - //mark.Position = RoomInfo.GetWorldPosition() + tempPos - offset; mark.Position = RoomInfo.ToGlobalPosition(tempPos); wave.Add(mark); } - - //排序操作 + } + + //自动填充操作 + if (RoomPreinstallInfo.AutoFill) + { + world.RandomPool.FillAutoWave(this); + } + + //排序操作 + foreach (var wave in WaveList) + { wave.Sort((a, b) => (int)(a.DelayTime * 1000 - b.DelayTime * 1000)); } + //判断是否有敌人 + CheckHasEnemy(); + } + + private void CheckHasEnemy() + { + foreach (var marks in WaveList) + { + foreach (var activityMark in marks) + { + if (activityMark.ActivityType == ActivityType.Enemy) + { + _hsaEnemy = true; + return; + } + } + } } /// @@ -423,6 +473,10 @@ //初始化物体属性 private void InitAttr(ActivityObject activityObject, ActivityMark activityMark) { + if (activityMark.Attr == null) + { + return; + } if (activityMark.ActivityType == ActivityType.Weapon) //武器类型 { var weapon = (Weapon)activityObject; @@ -438,7 +492,7 @@ else if (activityMark.ActivityType == ActivityType.Enemy) //敌人类型 { var role = (Role)activityObject; - if (role is Enemy enemy && activityMark.Attr.TryGetValue("Weapon", out var weaponId)) //使用的武器 + if (role.WeaponPack.Capacity > 0 && role is Enemy enemy && activityMark.Attr.TryGetValue("Weapon", out var weaponId)) //使用的武器 { if (!string.IsNullOrEmpty(weaponId)) { @@ -455,7 +509,7 @@ } } - if (activityMark.DerivedAttr.TryGetValue("Face", out var face)) //脸朝向, 应该只有 -1 和 1 + if (activityMark.DerivedAttr != null && activityMark.DerivedAttr.TryGetValue("Face", out var face)) //脸朝向, 应该只有 -1 和 1 { var faceDir = int.Parse(face); role.Face = (FaceDirection)faceDir; diff --git a/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs b/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs index 7207dcb..e257b69 100644 --- a/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs +++ b/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs @@ -135,6 +135,10 @@ /// public Vector2I Waypoints { get; set; } + /// + /// 导航网格对象 + /// + public NavigationRegion2D NavigationRegion { get; set; } public bool IsDestroyed { get; private set; } private bool _openDoorFlag = true; diff --git a/DungeonShooting_Godot/src/framework/map/serialize/room/RoomPreinstallInfo.cs b/DungeonShooting_Godot/src/framework/map/serialize/room/RoomPreinstallInfo.cs index 7f35576..f9b0f11 100644 --- a/DungeonShooting_Godot/src/framework/map/serialize/room/RoomPreinstallInfo.cs +++ b/DungeonShooting_Godot/src/framework/map/serialize/room/RoomPreinstallInfo.cs @@ -26,6 +26,12 @@ public string Remark; /// + /// 是否自动填充数据 + /// + [JsonInclude] + public bool AutoFill; + + /// /// 波数数据 /// [JsonInclude] diff --git a/DungeonShooting_Godot/src/game/GameApplication.cs b/DungeonShooting_Godot/src/game/GameApplication.cs index 406b960..9e97a76 100644 --- a/DungeonShooting_Godot/src/game/GameApplication.cs +++ b/DungeonShooting_Godot/src/game/GameApplication.cs @@ -15,22 +15,22 @@ /// /// 游戏渲染视口 /// - [Export] public SubViewport SubViewport; + public SubViewport SubViewport; /// /// SubViewportContainer 组件 /// - [Export] public SubViewportContainer SubViewportContainer; + public SubViewportContainer SubViewportContainer; /// /// 场景根节点 /// - [Export] public Node2D SceneRoot; + public Node2D SceneRoot; /// /// 全局根节点 /// - [Export] public Node2D GlobalNodeRoot; + public Node2D GlobalNodeRoot; /// /// 游戏目标帧率 @@ -94,6 +94,7 @@ //初始化配置表 ExcelConfig.Init(); + PreinstallMarkManager.Init(); //初始化房间配置数据 InitRoomConfig(); //初始化TileSet配置数据 @@ -107,9 +108,14 @@ DungeonConfig.GroupName = "Test1"; DungeonConfig.RoomCount = 20; } - + public override void _EnterTree() { + SubViewport = GetNode("ViewCanvas/SubViewportContainer/SubViewport"); + SubViewportContainer = GetNode("ViewCanvas/SubViewportContainer"); + SceneRoot = GetNode("ViewCanvas/SubViewportContainer/SubViewport/SceneRoot"); + GlobalNodeRoot = GetNode("GlobalNodeRoot"); + //背景颜色 RenderingServer.SetDefaultClearColor(new Color(0, 0, 0, 1)); //随机化种子 @@ -159,7 +165,7 @@ /// /// 创建新的 World 对象, 相当于清理房间 /// - public World CreateNewWorld() + public World CreateNewWorld(SeedRandom random) { if (World != null) { @@ -167,8 +173,9 @@ World.QueueFree(); } World = ResourceManager.LoadAndInstantiate(ResourcePath.scene_World_tscn); - World.InitLayer(); SceneRoot.AddChild(World); + World.InitLayer(); + World.InitRandomPool(random); return World; } diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/NoWeaponEnemy.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/NoWeaponEnemy.cs index f3ee163..937f133 100644 --- a/DungeonShooting_Godot/src/game/activity/role/enemy/NoWeaponEnemy.cs +++ b/DungeonShooting_Godot/src/game/activity/role/enemy/NoWeaponEnemy.cs @@ -14,6 +14,7 @@ { base.OnInit(); NoWeaponAttack = true; + WeaponPack.SetCapacity(0); AnimationPlayer.AnimationFinished += OnAnimationFinished; _brushData = LiquidBrushManager.GetBrush("0002"); diff --git a/DungeonShooting_Godot/src/game/camera/GameCamera.cs b/DungeonShooting_Godot/src/game/camera/GameCamera.cs index 1c0ea3b..fed8fd1 100644 --- a/DungeonShooting_Godot/src/game/camera/GameCamera.cs +++ b/DungeonShooting_Godot/src/game/camera/GameCamera.cs @@ -196,12 +196,20 @@ if (EnableShake) { var distance = _CalculateDistanceSquared(delta); - distance = new Vector2(Mathf.Sqrt(distance.X), Mathf.Sqrt(distance.Y)); - var offset = Offset; - _shakeOffset += _processDirection + new Vector2( - (float)GD.RandRange(-distance.X, distance.X) - offset.X, - (float)GD.RandRange(-distance.Y, distance.Y) - offset.Y - ); + if (distance == Vector2.Zero) + { + _shakeOffset += _processDirection - Offset / 2f; + } + else + { + distance = new Vector2(Mathf.Sqrt(distance.X), Mathf.Sqrt(distance.Y)); + var offset = Offset; + _shakeOffset += _processDirection + new Vector2( + (float)GD.RandRange(-distance.X, distance.X) - offset.X, + (float)GD.RandRange(-distance.Y, distance.Y) - offset.Y + ); + } + _processDistanceSquared = Vector2.Zero; _processDirection = _processDirection.Lerp(Vector2.Zero, RecoveryCoefficient * delta); } @@ -220,10 +228,10 @@ foreach (var keyValuePair in _shakeMap) { var shakeData = keyValuePair.Value; - var tempLenght = shakeData.Value.LengthSquared(); - if (tempLenght > length) + var tempLength = shakeData.Value.LengthSquared(); + if (tempLength > length) { - length = tempLenght; + length = tempLength; temp = shakeData.Value; if (shakeData.Decline) { diff --git a/DungeonShooting_Godot/src/game/manager/MapLayerManager.cs b/DungeonShooting_Godot/src/game/manager/MapLayerManager.cs new file mode 100644 index 0000000..3ac25c0 --- /dev/null +++ b/DungeonShooting_Godot/src/game/manager/MapLayerManager.cs @@ -0,0 +1,67 @@ + +using Godot; + +public static class MapLayerManager +{ + public static void InitMapLayer(TileMap tileMap) + { + //删除之前的层级 + var layersCount = tileMap.GetLayersCount(); + for (var i = layersCount - 1; i > 0; i--) + { + tileMap.RemoveLayer(layersCount); + } + tileMap.AddLayer(MapLayer.AutoFloorLayer); + tileMap.SetLayerZIndex(MapLayer.AutoFloorLayer, -10); + tileMap.SetLayerNavigationEnabled(MapLayer.AutoFloorLayer, false); + tileMap.SetLayerName(MapLayer.AutoFloorLayer, nameof(MapLayer.AutoFloorLayer)); + + tileMap.AddLayer(MapLayer.CustomFloorLayer1); + tileMap.SetLayerZIndex(MapLayer.CustomFloorLayer1, -10); + tileMap.SetLayerNavigationEnabled(MapLayer.CustomFloorLayer1, false); + tileMap.SetLayerName(MapLayer.CustomFloorLayer1, nameof(MapLayer.CustomFloorLayer1)); + + tileMap.AddLayer(MapLayer.CustomFloorLayer2); + tileMap.SetLayerZIndex(MapLayer.CustomFloorLayer2, -10); + tileMap.SetLayerNavigationEnabled(MapLayer.CustomFloorLayer2, false); + tileMap.SetLayerName(MapLayer.CustomFloorLayer2, nameof(MapLayer.CustomFloorLayer2)); + + tileMap.AddLayer(MapLayer.CustomFloorLayer3); + tileMap.SetLayerZIndex(MapLayer.CustomFloorLayer3, -10); + tileMap.SetLayerNavigationEnabled(MapLayer.CustomFloorLayer3, false); + tileMap.SetLayerName(MapLayer.CustomFloorLayer3, nameof(MapLayer.CustomFloorLayer3)); + + tileMap.AddLayer(MapLayer.AutoMiddleLayer); + tileMap.SetLayerZIndex(MapLayer.AutoMiddleLayer, 0); + tileMap.SetLayerNavigationEnabled(MapLayer.AutoMiddleLayer, false); + tileMap.SetLayerYSortEnabled(MapLayer.AutoMiddleLayer, true); + tileMap.SetLayerName(MapLayer.AutoMiddleLayer, nameof(MapLayer.AutoMiddleLayer)); + + tileMap.AddLayer(MapLayer.CustomMiddleLayer1); + tileMap.SetLayerZIndex(MapLayer.CustomMiddleLayer1, 0); + tileMap.SetLayerNavigationEnabled(MapLayer.CustomMiddleLayer1, false); + tileMap.SetLayerYSortEnabled(MapLayer.CustomMiddleLayer1, true); + tileMap.SetLayerName(MapLayer.CustomMiddleLayer1, nameof(MapLayer.CustomMiddleLayer1)); + + tileMap.AddLayer(MapLayer.CustomMiddleLayer2); + tileMap.SetLayerZIndex(MapLayer.CustomMiddleLayer2, 0); + tileMap.SetLayerNavigationEnabled(MapLayer.CustomMiddleLayer2, false); + tileMap.SetLayerYSortEnabled(MapLayer.CustomMiddleLayer2, true); + tileMap.SetLayerName(MapLayer.CustomMiddleLayer2, nameof(MapLayer.CustomMiddleLayer2)); + + tileMap.AddLayer(MapLayer.AutoTopLayer); + tileMap.SetLayerZIndex(MapLayer.AutoTopLayer, 10); + tileMap.SetLayerNavigationEnabled(MapLayer.AutoTopLayer, false); + tileMap.SetLayerName(MapLayer.AutoTopLayer, nameof(MapLayer.AutoTopLayer)); + + tileMap.AddLayer(MapLayer.CustomTopLayer); + tileMap.SetLayerZIndex(MapLayer.CustomTopLayer, 10); + tileMap.SetLayerNavigationEnabled(MapLayer.CustomTopLayer, false); + tileMap.SetLayerName(MapLayer.CustomTopLayer, nameof(MapLayer.CustomTopLayer)); + + tileMap.AddLayer(MapLayer.AutoAisleFloorLayer); + tileMap.SetLayerZIndex(MapLayer.AutoAisleFloorLayer, -10); + tileMap.SetLayerNavigationEnabled(MapLayer.AutoAisleFloorLayer, false); + tileMap.SetLayerName(MapLayer.AutoAisleFloorLayer, nameof(MapLayer.AutoAisleFloorLayer)); + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/manager/ResourceManager.cs b/DungeonShooting_Godot/src/game/manager/ResourceManager.cs index 97facb8..09bdfea 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourceManager.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourceManager.cs @@ -191,9 +191,13 @@ else if (markInfo.MarkList.Count == 1) //单个物体 { var id = markInfo.MarkList[0].Id; - if (id != null && ExcelConfig.ActivityBase_Map.TryGetValue(id, out var activityBase)) + if (id != null) { - return LoadTexture2D(activityBase.Icon); + var activityBase = PreinstallMarkManager.GetMarkConfig(id); + if (activityBase != null) + { + return LoadTexture2D(activityBase.Icon); + } } } } diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index eaabb27..2e45225 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -6,6 +6,9 @@ public const string default_bus_layout_tres = "res://default_bus_layout.tres"; public const string default_env_tres = "res://default_env.tres"; public const string icon_png = "res://icon.png"; + public const string _VSCodeCounter_20240121_181451_diff_txt = "res://.VSCodeCounter/2024-01-21_18-14-51/diff.txt"; + public const string _VSCodeCounter_20240121_181451_results_json = "res://.VSCodeCounter/2024-01-21_18-14-51/results.json"; + public const string _VSCodeCounter_20240121_181451_results_txt = "res://.VSCodeCounter/2024-01-21_18-14-51/results.txt"; public const string excelTool_bin_Release_net8_0_winx64_ExcelTool_deps_json = "res://excelTool/bin/Release/net8.0/win-x64/ExcelTool.deps.json"; public const string excelTool_bin_Release_net8_0_winx64_ExcelTool_runtimeconfig_json = "res://excelTool/bin/Release/net8.0/win-x64/ExcelTool.runtimeconfig.json"; public const string excelTool_obj_ExcelTool_csproj_nuget_dgspec_json = "res://excelTool/obj/ExcelTool.csproj.nuget.dgspec.json"; @@ -201,6 +204,7 @@ public const string resource_sound_sfx_shooting_Shooting0009_ogg = "res://resource/sound/sfx/shooting/Shooting0009.ogg"; public const string resource_sound_sfx_shooting_Shooting0010_ogg = "res://resource/sound/sfx/shooting/Shooting0010.ogg"; public const string resource_sound_sfx_shooting_Shooting0011_ogg = "res://resource/sound/sfx/shooting/Shooting0011.ogg"; + public const string resource_sprite_1234_txt = "res://resource/sprite/1234.txt"; public const string resource_sprite_brush_Brush1_png = "res://resource/sprite/brush/Brush1.png"; public const string resource_sprite_brush_Brush2_png = "res://resource/sprite/brush/Brush2.png"; public const string resource_sprite_brush_Brush3_png = "res://resource/sprite/brush/Brush3.png"; @@ -326,6 +330,7 @@ public const string resource_sprite_ui_commonIcon_CenterTool_png = "res://resource/sprite/ui/commonIcon/CenterTool.png"; public const string resource_sprite_ui_commonIcon_Delete_png = "res://resource/sprite/ui/commonIcon/Delete.png"; public const string resource_sprite_ui_commonIcon_Delete2_png = "res://resource/sprite/ui/commonIcon/Delete2.png"; + public const string resource_sprite_ui_commonIcon_Dice_png = "res://resource/sprite/ui/commonIcon/Dice.png"; public const string resource_sprite_ui_commonIcon_DoorTool_png = "res://resource/sprite/ui/commonIcon/DoorTool.png"; public const string resource_sprite_ui_commonIcon_Down_png = "res://resource/sprite/ui/commonIcon/Down.png"; public const string resource_sprite_ui_commonIcon_DragTool_png = "res://resource/sprite/ui/commonIcon/DragTool.png"; @@ -448,13 +453,6 @@ public const string resource_spriteFrames_weapon_Weapon0009_tres = "res://resource/spriteFrames/weapon/Weapon0009.tres"; public const string resource_theme_mainTheme_tres = "res://resource/theme/mainTheme.tres"; public const string resource_theme_theme1_tres = "res://resource/theme/theme1.tres"; - public const string resource_tileSet_TileSet_old_tres = "res://resource/tileSet/TileSet_old.tres"; - public const string resource_tileSet_map1_TileSet1_tres = "res://resource/tileSet/map1/TileSet1.tres"; - public const string resource_tileSet_map1_website_txt = "res://resource/tileSet/map1/website.txt"; - public const string resource_tileSet_map2_TileSet2_tres = "res://resource/tileSet/map2/TileSet2.tres"; - public const string resource_tileSprite_map1_16x16dungeoniiwallreconfigv04spritesheet_png = "res://resource/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png"; - public const string resource_tileSprite_map2_DungeonTilesetSpikes_png = "res://resource/tileSprite/map2/Dungeon Tileset + Spikes.png"; - public const string resource_tileSprite_map2_DungeonTileset_png = "res://resource/tileSprite/map2/Dungeon Tileset.png"; public const string scene_Main_tscn = "res://scene/Main.tscn"; public const string scene_World_tscn = "res://scene/World.tscn"; public const string scene_test_TestCreateSector_tscn = "res://scene/test/TestCreateSector.tscn"; diff --git a/DungeonShooting_Godot/src/game/room/DungeonManager.cs b/DungeonShooting_Godot/src/game/room/DungeonManager.cs index b16c876..032bc8d 100644 --- a/DungeonShooting_Godot/src/game/room/DungeonManager.cs +++ b/DungeonShooting_Godot/src/game/room/DungeonManager.cs @@ -49,7 +49,7 @@ /// 自动图块配置 /// public AutoTileConfig AutoTileConfig { get; private set; } - + private UiBase _prevUi; private DungeonTileMap _dungeonTileMap; private DungeonGenerator _dungeonGenerator; @@ -223,7 +223,7 @@ } yield return 0; //创建世界场景 - World = GameApplication.Instance.CreateNewWorld(); + World = GameApplication.Instance.CreateNewWorld(random); yield return 0; var group = GameApplication.Instance.RoomConfig[CurrConfig.GroupName]; var tileSetSplit = GameApplication.Instance.TileSetConfig[group.TileSet]; @@ -231,7 +231,7 @@ //填充地牢 AutoTileConfig = new AutoTileConfig(0, tileSetSplit.TileSetInfo.Sources[0].Terrain[0]); _dungeonTileMap = new DungeonTileMap(World.TileRoot); - yield return _dungeonTileMap.AutoFillRoomTile(AutoTileConfig, _dungeonGenerator.StartRoomInfo, random); + yield return _dungeonTileMap.AutoFillRoomTile(AutoTileConfig, _dungeonGenerator.StartRoomInfo, World); //yield return _dungeonTileMap.AddOutlineTile(AutoTileConfig.WALL_BLOCK); //生成寻路网格, 这一步操作只生成过道的导航 @@ -405,6 +405,7 @@ navigationPolygon.Name = "NavigationRegion" + (GetChildCount() + 1); navigationPolygon.NavigationPolygon = polygonData; World.NavigationRoot.AddChild(navigationPolygon); + roomInfo.NavigationRegion = navigationPolygon; } //创建门 diff --git a/DungeonShooting_Godot/src/game/room/World.cs b/DungeonShooting_Godot/src/game/room/World.cs index 73ab5ec..af57174 100644 --- a/DungeonShooting_Godot/src/game/room/World.cs +++ b/DungeonShooting_Godot/src/game/room/World.cs @@ -16,22 +16,22 @@ /// /// //对象根节点 /// - [Export] public Node2D NormalLayer; + public Node2D NormalLayer; /// /// 对象根节点, 带y轴排序功能 /// - [Export] public Node2D YSortLayer; + public Node2D YSortLayer; /// /// 地图根节点 /// - [Export] public TileMap TileRoot; + public TileMap TileRoot; - [Export] public Node2D StaticSpriteRoot; - [Export] public Node2D AffiliationAreaRoot; - [Export] public Node2D FogMaskRoot; - [Export] public Node2D NavigationRoot; + public Node2D StaticSpriteRoot; + public Node2D AffiliationAreaRoot; + public Node2D FogMaskRoot; + public Node2D NavigationRoot; /// /// 是否暂停 @@ -66,6 +66,16 @@ /// public List Enemy_InstanceList { get; } = new List(); + /// + /// 随机数对象 + /// + public SeedRandom Random { get; private set; } + + /// + /// 随机对象池 + /// + public RandomPool RandomPool { get; private set; } + private bool _pause = false; private List _coroutineList; @@ -73,6 +83,13 @@ { Color = Colors.Black; //TileRoot.YSortEnabled = false; + NormalLayer = GetNode("TileRoot/NormalLayer"); + YSortLayer = GetNode("TileRoot/YSortLayer"); + TileRoot = GetNode("TileRoot"); + StaticSpriteRoot = GetNode("TileRoot/StaticSpriteRoot"); + FogMaskRoot = GetNode("TileRoot/FogMaskRoot"); + NavigationRoot = GetNode("TileRoot/NavigationRoot"); + AffiliationAreaRoot = GetNode("TileRoot/AffiliationAreaRoot"); } public override void _Process(double delta) @@ -86,39 +103,7 @@ /// public void InitLayer() { - TileRoot.AddLayer(MapLayer.AutoFloorLayer); - TileRoot.SetLayerZIndex(MapLayer.AutoFloorLayer, -10); - TileRoot.SetLayerNavigationEnabled(MapLayer.AutoFloorLayer, false); - TileRoot.AddLayer(MapLayer.CustomFloorLayer1); - TileRoot.SetLayerZIndex(MapLayer.CustomFloorLayer1, -10); - TileRoot.SetLayerNavigationEnabled(MapLayer.CustomFloorLayer1, false); - TileRoot.AddLayer(MapLayer.CustomFloorLayer2); - TileRoot.SetLayerZIndex(MapLayer.CustomFloorLayer2, -10); - TileRoot.SetLayerNavigationEnabled(MapLayer.CustomFloorLayer2, false); - TileRoot.AddLayer(MapLayer.CustomFloorLayer3); - TileRoot.SetLayerZIndex(MapLayer.CustomFloorLayer3, -10); - TileRoot.SetLayerNavigationEnabled(MapLayer.CustomFloorLayer3, false); - TileRoot.AddLayer(MapLayer.AutoMiddleLayer); - TileRoot.SetLayerZIndex(MapLayer.AutoMiddleLayer, 0); - TileRoot.SetLayerNavigationEnabled(MapLayer.AutoMiddleLayer, false); - TileRoot.SetLayerYSortEnabled(MapLayer.AutoMiddleLayer, true); - TileRoot.AddLayer(MapLayer.CustomMiddleLayer1); - TileRoot.SetLayerZIndex(MapLayer.CustomMiddleLayer1, 0); - TileRoot.SetLayerNavigationEnabled(MapLayer.CustomMiddleLayer1, false); - TileRoot.SetLayerYSortEnabled(MapLayer.CustomMiddleLayer1, true); - TileRoot.AddLayer(MapLayer.CustomMiddleLayer2); - TileRoot.SetLayerZIndex(MapLayer.CustomMiddleLayer2, 0); - TileRoot.SetLayerNavigationEnabled(MapLayer.CustomMiddleLayer2, false); - TileRoot.SetLayerYSortEnabled(MapLayer.CustomMiddleLayer2, true); - TileRoot.AddLayer(MapLayer.AutoTopLayer); - TileRoot.SetLayerZIndex(MapLayer.AutoTopLayer, 10); - TileRoot.SetLayerNavigationEnabled(MapLayer.AutoTopLayer, false); - TileRoot.AddLayer(MapLayer.CustomTopLayer); - TileRoot.SetLayerZIndex(MapLayer.CustomTopLayer, 10); - TileRoot.SetLayerNavigationEnabled(MapLayer.CustomTopLayer, false); - TileRoot.AddLayer(MapLayer.AutoAisleFloorLayer); - TileRoot.SetLayerZIndex(MapLayer.AutoAisleFloorLayer, -10); - TileRoot.SetLayerNavigationEnabled(MapLayer.AutoAisleFloorLayer, false); + MapLayerManager.InitMapLayer(TileRoot); } /// @@ -181,4 +166,13 @@ { ProxyCoroutineHandler.ProxyStopAllCoroutine(ref _coroutineList); } + + /// + /// 初始化随机池 + /// + public void InitRandomPool(SeedRandom random) + { + Random = random; + RandomPool = new RandomPool(this); + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs b/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs index 152f4df..76a3d90 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs @@ -792,13 +792,13 @@ //读取地块数据 SetAutoLayerDataFromList(MapLayer.AutoFloorLayer, tileInfo.Floor); - SetAutoLayerDataFromList(MapLayer.AutoMiddleLayer, tileInfo.Middle); - SetAutoLayerDataFromList(MapLayer.AutoTopLayer, tileInfo.Top); SetCustomLayerDataFromList(MapLayer.CustomFloorLayer1, tileInfo.CustomFloor1); SetCustomLayerDataFromList(MapLayer.CustomFloorLayer2, tileInfo.CustomFloor2); SetCustomLayerDataFromList(MapLayer.CustomFloorLayer3, tileInfo.CustomFloor3); + SetAutoLayerDataFromList(MapLayer.AutoMiddleLayer, tileInfo.Middle); SetCustomLayerDataFromList(MapLayer.CustomMiddleLayer1, tileInfo.CustomMiddle1); SetCustomLayerDataFromList(MapLayer.CustomMiddleLayer2, tileInfo.CustomMiddle2); + SetAutoLayerDataFromList(MapLayer.AutoTopLayer, tileInfo.Top); SetCustomLayerDataFromList(MapLayer.CustomTopLayer, tileInfo.CustomTop); //如果有图块错误, 则找出错误的点位 @@ -862,24 +862,7 @@ _initLayer = true; //初始化层级数据 - AddLayer(MapLayer.AutoFloorLayer); - SetLayerZIndex(MapLayer.AutoFloorLayer, MapLayer.AutoFloorLayer); - AddLayer(MapLayer.CustomFloorLayer1); - SetLayerZIndex(MapLayer.CustomFloorLayer1, MapLayer.CustomFloorLayer1); - AddLayer(MapLayer.CustomFloorLayer2); - SetLayerZIndex(MapLayer.CustomFloorLayer2, MapLayer.CustomFloorLayer2); - AddLayer(MapLayer.CustomFloorLayer3); - SetLayerZIndex(MapLayer.CustomFloorLayer3, MapLayer.CustomFloorLayer3); - AddLayer(MapLayer.AutoMiddleLayer); - SetLayerZIndex(MapLayer.AutoMiddleLayer, MapLayer.AutoMiddleLayer); - AddLayer(MapLayer.CustomMiddleLayer1); - SetLayerZIndex(MapLayer.CustomMiddleLayer1, MapLayer.CustomMiddleLayer1); - AddLayer(MapLayer.CustomMiddleLayer2); - SetLayerZIndex(MapLayer.CustomMiddleLayer2, MapLayer.CustomMiddleLayer2); - AddLayer(MapLayer.AutoTopLayer); - SetLayerZIndex(MapLayer.AutoTopLayer, MapLayer.AutoTopLayer); - AddLayer(MapLayer.CustomTopLayer); - SetLayerZIndex(MapLayer.CustomTopLayer, MapLayer.CustomTopLayer); + MapLayerManager.InitMapLayer(this); } //缩小 diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs index 0dce3e9..8377944 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs @@ -81,7 +81,6 @@ if (_markInfo.SpecialMarkType == SpecialMarkType.BirthPoint) //出生标记 { var markInfoItem = new MarkInfoItem(); - markInfoItem.Id = ActivityObject.Ids.Id_role0001; markInfoItem.SpecialMarkType = _markInfo.SpecialMarkType; _grid.Add(markInfoItem); //隐藏选项 @@ -203,10 +202,25 @@ //选中物体回调, 创建标记数据 private void OnSelectObject(ExcelConfig.ActivityBase activityObject) { - _grid.Add(new MarkInfoItem() + var markInfoItem = new MarkInfoItem() { Id = activityObject.Id, Weight = 100, - }); + }; + + //初始高度 + if (activityObject.Type == (int)ActivityType.Weapon || activityObject.Type == (int)ActivityType.Prop) + { + markInfoItem.Altitude = 8; + } + else if (activityObject.Type == (int)ActivityType.Other) + { + //随机道具或者随机武器 + if (activityObject.Id == PreinstallMarkManager.Weapon.Id || activityObject.Id == PreinstallMarkManager.Prop.Id) + { + markInfoItem.Altitude = 8; + } + } + _grid.Add(markInfoItem); } } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs index b42ac54..8b2c588 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs @@ -24,34 +24,45 @@ public override void OnSetData(MarkInfoItem data) { - //记得判断随机对象, 后面再做 - _activityObject = ExcelConfig.ActivityBase_Map[data.Id]; - //图标 - if (string.IsNullOrEmpty(_activityObject.Icon)) - { - CellNode.L_VBoxContainer.L_HBoxContainer.L_Icon.Instance.Visible = false; - } - else - { - CellNode.L_VBoxContainer.L_HBoxContainer.L_Icon.Instance.Visible = true; - CellNode.L_VBoxContainer.L_HBoxContainer.L_Icon.Instance.Texture = ResourceManager.LoadTexture2D(_activityObject.Icon); - } //物体Id CellNode.L_VBoxContainer.L_HBoxContainer.L_IdLabel.Instance.Text = data.Id; - //物体名称 - CellNode.L_VBoxContainer.L_HBoxContainer.L_NameLabel.Instance.Text = _activityObject.Name; - //物体类型 - CellNode.L_VBoxContainer.L_HBoxContainer.L_TypeLabel.Instance.Text = NameManager.GetActivityTypeName(_activityObject.Type); //权重 CellNode.L_VBoxContainer.L_HBoxContainer.L_WeightEdit.Instance.Value = data.Weight; if (data.SpecialMarkType == SpecialMarkType.BirthPoint) //出生标记 { + //物体名称 + CellNode.L_VBoxContainer.L_HBoxContainer.L_NameLabel.Instance.Text = PreinstallMarkManager.GetSpecialName(data.SpecialMarkType); + //物体类型 + CellNode.L_VBoxContainer.L_HBoxContainer.L_TypeLabel.Instance.Text = ActivityId.GetTypeName(ActivityType.Player); + + //图标 + CellNode.L_VBoxContainer.L_HBoxContainer.L_Icon.Instance.Visible = true; + CellNode.L_VBoxContainer.L_HBoxContainer.L_Icon.Instance.Texture = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_ui_commonIcon_BirthMark_png); + CellNode.L_VBoxContainer.L_HBoxContainer.L_CenterContainer.L_DeleteButton.Instance.Visible = false; CellNode.L_VBoxContainer.L_HBoxContainer.L_WeightEdit.Instance.Visible = false; } else //普通标记 { + //记得判断随机对象, 后面再做 + _activityObject = PreinstallMarkManager.GetMarkConfig(data.Id); + //物体名称 + CellNode.L_VBoxContainer.L_HBoxContainer.L_NameLabel.Instance.Text = _activityObject.Name; + //物体类型 + CellNode.L_VBoxContainer.L_HBoxContainer.L_TypeLabel.Instance.Text = NameManager.GetActivityTypeName(_activityObject.Type); + + //图标 + if (string.IsNullOrEmpty(_activityObject.Icon)) + { + CellNode.L_VBoxContainer.L_HBoxContainer.L_Icon.Instance.Visible = false; + } + else + { + CellNode.L_VBoxContainer.L_HBoxContainer.L_Icon.Instance.Visible = true; + CellNode.L_VBoxContainer.L_HBoxContainer.L_Icon.Instance.Texture = ResourceManager.LoadTexture2D(_activityObject.Icon); + } + // 包含额外属性 if (_expandPanel == null) { @@ -66,8 +77,11 @@ { if (_expandPanel != null) { - _attributeBases.Clear(); - _attributeBases = null; + if (_attributeBases != null) + { + _attributeBases.Clear(); + _attributeBases = null; + } _expandPanel.QueueFree(); _expandPanel = null; _altitude = null; @@ -186,21 +200,10 @@ if (markInfoItem != null) { - if (markInfoItem.Attr == null) - { - //初始高度 - if (activityObject.Type == (int)ActivityType.Weapon || activityObject.Type == (int)ActivityType.Prop) - { - _altitude.L_NumInput.Instance.Value = 8; - } - } - else - { - //海拔高度 - _altitude.L_NumInput.Instance.Value = markInfoItem.Altitude; - //纵轴速度 - _vSpeed.L_NumInput.Instance.Value = markInfoItem.VerticalSpeed; - } + //海拔高度 + _altitude.L_NumInput.Instance.Value = markInfoItem.Altitude; + //纵轴速度 + _vSpeed.L_NumInput.Instance.Value = markInfoItem.VerticalSpeed; } if (activityObject.Type == (int)ActivityType.Weapon) //武器类型 diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorCreatePreinstall/MapEditorCreatePreinstall.cs b/DungeonShooting_Godot/src/game/ui/mapEditorCreatePreinstall/MapEditorCreatePreinstall.cs index 21b973f..11e247b 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorCreatePreinstall/MapEditorCreatePreinstall.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorCreatePreinstall/MapEditorCreatePreinstall.cs @@ -12,7 +12,7 @@ { get { - if (_L_MarginContainer == null) _L_MarginContainer = new MarginContainer((MapEditorCreatePreinstallPanel)this, GetNodeOrNull("MarginContainer")); + if (_L_MarginContainer == null) _L_MarginContainer = new MarginContainer((MapEditorCreatePreinstallPanel)this, GetNode("MarginContainer")); return _L_MarginContainer; } } @@ -25,6 +25,7 @@ public sealed override void OnInitNestedUi() { + } /// @@ -57,7 +58,7 @@ { get { - if (_L_PreinstallNameLabel == null) _L_PreinstallNameLabel = new PreinstallNameLabel(UiPanel, Instance.GetNodeOrNull("PreinstallNameLabel")); + if (_L_PreinstallNameLabel == null) _L_PreinstallNameLabel = new PreinstallNameLabel(UiPanel, Instance.GetNode("PreinstallNameLabel")); return _L_PreinstallNameLabel; } } @@ -70,7 +71,7 @@ { get { - if (_L_PreinstallNameInput == null) _L_PreinstallNameInput = new PreinstallNameInput(UiPanel, Instance.GetNodeOrNull("PreinstallNameInput")); + if (_L_PreinstallNameInput == null) _L_PreinstallNameInput = new PreinstallNameInput(UiPanel, Instance.GetNode("PreinstallNameInput")); return _L_PreinstallNameInput; } } @@ -81,6 +82,59 @@ } /// + /// 类型: , 路径: MapEditorCreatePreinstall.MarginContainer.VBoxContainer.HBoxContainer2.PreinstallNameLabel + /// + public class PreinstallNameLabel_1 : UiNode + { + public PreinstallNameLabel_1(MapEditorCreatePreinstallPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override PreinstallNameLabel_1 Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorCreatePreinstall.MarginContainer.VBoxContainer.HBoxContainer2.AutoCheckInput + /// + public class AutoCheckInput : UiNode + { + public AutoCheckInput(MapEditorCreatePreinstallPanel uiPanel, Godot.CheckBox node) : base(uiPanel, node) { } + public override AutoCheckInput Clone() => new (UiPanel, (Godot.CheckBox)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorCreatePreinstall.MarginContainer.VBoxContainer.HBoxContainer2 + /// + public class HBoxContainer2 : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorCreatePreinstall.MarginContainer.VBoxContainer.PreinstallNameLabel + /// + public PreinstallNameLabel_1 L_PreinstallNameLabel + { + get + { + if (_L_PreinstallNameLabel == null) _L_PreinstallNameLabel = new PreinstallNameLabel_1(UiPanel, Instance.GetNode("PreinstallNameLabel")); + return _L_PreinstallNameLabel; + } + } + private PreinstallNameLabel_1 _L_PreinstallNameLabel; + + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorCreatePreinstall.MarginContainer.VBoxContainer.AutoCheckInput + /// + public AutoCheckInput L_AutoCheckInput + { + get + { + if (_L_AutoCheckInput == null) _L_AutoCheckInput = new AutoCheckInput(UiPanel, Instance.GetNode("AutoCheckInput")); + return _L_AutoCheckInput; + } + } + private AutoCheckInput _L_AutoCheckInput; + + public HBoxContainer2(MapEditorCreatePreinstallPanel uiPanel, Godot.HBoxContainer node) : base(uiPanel, node) { } + public override HBoxContainer2 Clone() => new (UiPanel, (Godot.HBoxContainer)Instance.Duplicate()); + } + + /// /// 类型: , 路径: MapEditorCreatePreinstall.MarginContainer.VBoxContainer.HBoxContainer4.WeightNameLabel /// public class WeightNameLabel : UiNode @@ -110,7 +164,7 @@ { get { - if (_L_WeightNameLabel == null) _L_WeightNameLabel = new WeightNameLabel(UiPanel, Instance.GetNodeOrNull("WeightNameLabel")); + if (_L_WeightNameLabel == null) _L_WeightNameLabel = new WeightNameLabel(UiPanel, Instance.GetNode("WeightNameLabel")); return _L_WeightNameLabel; } } @@ -123,7 +177,7 @@ { get { - if (_L_WeightInput == null) _L_WeightInput = new WeightInput(UiPanel, Instance.GetNodeOrNull("WeightInput")); + if (_L_WeightInput == null) _L_WeightInput = new WeightInput(UiPanel, Instance.GetNode("WeightInput")); return _L_WeightInput; } } @@ -163,7 +217,7 @@ { get { - if (_L_RemarkNameLabel == null) _L_RemarkNameLabel = new RemarkNameLabel(UiPanel, Instance.GetNodeOrNull("RemarkNameLabel")); + if (_L_RemarkNameLabel == null) _L_RemarkNameLabel = new RemarkNameLabel(UiPanel, Instance.GetNode("RemarkNameLabel")); return _L_RemarkNameLabel; } } @@ -176,7 +230,7 @@ { get { - if (_L_RemarkInput == null) _L_RemarkInput = new RemarkInput(UiPanel, Instance.GetNodeOrNull("RemarkInput")); + if (_L_RemarkInput == null) _L_RemarkInput = new RemarkInput(UiPanel, Instance.GetNode("RemarkInput")); return _L_RemarkInput; } } @@ -198,20 +252,33 @@ { get { - if (_L_HBoxContainer == null) _L_HBoxContainer = new HBoxContainer(UiPanel, Instance.GetNodeOrNull("HBoxContainer")); + if (_L_HBoxContainer == null) _L_HBoxContainer = new HBoxContainer(UiPanel, Instance.GetNode("HBoxContainer")); return _L_HBoxContainer; } } private HBoxContainer _L_HBoxContainer; /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorCreatePreinstall.MarginContainer.HBoxContainer2 + /// + public HBoxContainer2 L_HBoxContainer2 + { + get + { + if (_L_HBoxContainer2 == null) _L_HBoxContainer2 = new HBoxContainer2(UiPanel, Instance.GetNode("HBoxContainer2")); + return _L_HBoxContainer2; + } + } + private HBoxContainer2 _L_HBoxContainer2; + + /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorCreatePreinstall.MarginContainer.HBoxContainer4 /// public HBoxContainer4 L_HBoxContainer4 { get { - if (_L_HBoxContainer4 == null) _L_HBoxContainer4 = new HBoxContainer4(UiPanel, Instance.GetNodeOrNull("HBoxContainer4")); + if (_L_HBoxContainer4 == null) _L_HBoxContainer4 = new HBoxContainer4(UiPanel, Instance.GetNode("HBoxContainer4")); return _L_HBoxContainer4; } } @@ -224,7 +291,7 @@ { get { - if (_L_HBoxContainer5 == null) _L_HBoxContainer5 = new HBoxContainer5(UiPanel, Instance.GetNodeOrNull("HBoxContainer5")); + if (_L_HBoxContainer5 == null) _L_HBoxContainer5 = new HBoxContainer5(UiPanel, Instance.GetNode("HBoxContainer5")); return _L_HBoxContainer5; } } @@ -246,7 +313,7 @@ { get { - if (_L_VBoxContainer == null) _L_VBoxContainer = new VBoxContainer(UiPanel, Instance.GetNodeOrNull("VBoxContainer")); + if (_L_VBoxContainer == null) _L_VBoxContainer = new VBoxContainer(UiPanel, Instance.GetNode("VBoxContainer")); return _L_VBoxContainer; } } @@ -258,11 +325,6 @@ /// - /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorCreatePreinstall.MarginContainer.VBoxContainer.HBoxContainer.PreinstallNameLabel - /// - public PreinstallNameLabel S_PreinstallNameLabel => L_MarginContainer.L_VBoxContainer.L_HBoxContainer.L_PreinstallNameLabel; - - /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorCreatePreinstall.MarginContainer.VBoxContainer.HBoxContainer.PreinstallNameInput /// public PreinstallNameInput S_PreinstallNameInput => L_MarginContainer.L_VBoxContainer.L_HBoxContainer.L_PreinstallNameInput; @@ -273,6 +335,16 @@ public HBoxContainer S_HBoxContainer => L_MarginContainer.L_VBoxContainer.L_HBoxContainer; /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorCreatePreinstall.MarginContainer.VBoxContainer.HBoxContainer2.AutoCheckInput + /// + public AutoCheckInput S_AutoCheckInput => L_MarginContainer.L_VBoxContainer.L_HBoxContainer2.L_AutoCheckInput; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorCreatePreinstall.MarginContainer.VBoxContainer.HBoxContainer2 + /// + public HBoxContainer2 S_HBoxContainer2 => L_MarginContainer.L_VBoxContainer.L_HBoxContainer2; + + /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorCreatePreinstall.MarginContainer.VBoxContainer.HBoxContainer4.WeightNameLabel /// public WeightNameLabel S_WeightNameLabel => L_MarginContainer.L_VBoxContainer.L_HBoxContainer4.L_WeightNameLabel; diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorCreatePreinstall/MapEditorCreatePreinstallPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorCreatePreinstall/MapEditorCreatePreinstallPanel.cs index 15ec1ca..d9637ab 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorCreatePreinstall/MapEditorCreatePreinstallPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorCreatePreinstall/MapEditorCreatePreinstallPanel.cs @@ -25,6 +25,7 @@ InitData(roomType); _roomPreinstallInfo = preinstallInfo; S_PreinstallNameInput.Instance.Text = preinstallInfo.Name; + S_AutoCheckInput.Instance.ButtonPressed = preinstallInfo.AutoFill; S_WeightInput.Instance.Value = preinstallInfo.Weight; S_RemarkInput.Instance.Text = preinstallInfo.Remark; } @@ -52,6 +53,7 @@ return null; } + data.AutoFill = S_AutoCheckInput.Instance.ButtonPressed; data.Remark = S_RemarkInput.Instance.Text; data.Weight = (int)S_WeightInput.Instance.Value; } @@ -73,6 +75,7 @@ return null; } + data.AutoFill = S_AutoCheckInput.Instance.ButtonPressed; data.Remark = S_RemarkInput.Instance.Text; data.Weight = (int)S_WeightInput.Instance.Value; //预加载波 diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorMarkCell.cs b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorMarkCell.cs index c4928ca..155885f 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorMarkCell.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorMarkCell.cs @@ -32,19 +32,19 @@ str += ","; } - str += ExcelConfig.ActivityBase_Map[markInfoItem.Id].Name; + str += PreinstallMarkManager.GetMarkConfig(markInfoItem.Id).Name; } text += str; } else { - if (data.MarkInfo.SpecialMarkType == SpecialMarkType.BirthPoint) + if (data.MarkInfo.SpecialMarkType != SpecialMarkType.Normal) { - text = "出生标记"; + text = PreinstallMarkManager.GetSpecialName(data.MarkInfo.SpecialMarkType); } else { - text += "空"; + text = "空"; } } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMark.cs b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMark.cs index 75f5c82..ed20637 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMark.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMark.cs @@ -197,6 +197,37 @@ } /// + /// 类型: , 路径: MapEditorMapMark.VBoxContainer.ScrollContainer.VBoxContainer.AutoFillTip.Label + /// + public class Label : UiNode + { + public Label(MapEditorMapMarkPanel uiPanel, Godot.Label node) : base(uiPanel, node) { } + public override Label Clone() => new (UiPanel, (Godot.Label)Instance.Duplicate()); + } + + /// + /// 类型: , 路径: MapEditorMapMark.VBoxContainer.ScrollContainer.VBoxContainer.AutoFillTip + /// + public class AutoFillTip : UiNode + { + /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorMapMark.VBoxContainer.ScrollContainer.VBoxContainer.Label + /// + public Label L_Label + { + get + { + if (_L_Label == null) _L_Label = new Label(UiPanel, Instance.GetNode("Label")); + return _L_Label; + } + } + private Label _L_Label; + + public AutoFillTip(MapEditorMapMarkPanel uiPanel, Godot.ColorRect node) : base(uiPanel, node) { } + public override AutoFillTip Clone() => new (UiPanel, (Godot.ColorRect)Instance.Duplicate()); + } + + /// /// 类型: , 路径: MapEditorMapMark.VBoxContainer.ScrollContainer.VBoxContainer.AddWaveButton /// public class AddWaveButton : UiNode @@ -484,6 +515,19 @@ public class VBoxContainer_1 : UiNode { /// + /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorMapMark.VBoxContainer.ScrollContainer.AutoFillTip + /// + public AutoFillTip L_AutoFillTip + { + get + { + if (_L_AutoFillTip == null) _L_AutoFillTip = new AutoFillTip(UiPanel, Instance.GetNode("AutoFillTip")); + return _L_AutoFillTip; + } + } + private AutoFillTip _L_AutoFillTip; + + /// /// 使用 Instance 属性获取当前节点实例对象, 节点类型: , 节点路径: MapEditorMapMark.VBoxContainer.ScrollContainer.AddWaveButton /// public AddWaveButton L_AddWaveButton @@ -661,6 +705,16 @@ public DynamicTool S_DynamicTool => L_VBoxContainer.L_DynamicTool; /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorMapMark.VBoxContainer.ScrollContainer.VBoxContainer.AutoFillTip.Label + /// + public Label S_Label => L_VBoxContainer.L_ScrollContainer.L_VBoxContainer.L_AutoFillTip.L_Label; + + /// + /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorMapMark.VBoxContainer.ScrollContainer.VBoxContainer.AutoFillTip + /// + public AutoFillTip S_AutoFillTip => L_VBoxContainer.L_ScrollContainer.L_VBoxContainer.L_AutoFillTip; + + /// /// 场景中唯一名称的节点, 节点类型: , 节点路径: MapEditorMapMark.VBoxContainer.ScrollContainer.VBoxContainer.AddWaveButton /// public AddWaveButton S_AddWaveButton => L_VBoxContainer.L_ScrollContainer.L_VBoxContainer.L_AddWaveButton; diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMarkPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMarkPanel.cs index 39554ab..712977d 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMarkPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/MapEditorMapMarkPanel.cs @@ -62,6 +62,7 @@ //S_DynamicTool.Instance.GetParent().RemoveChild(S_DynamicTool.Instance); S_DynamicTool.Instance.Visible = false; + S_AutoFillTip.Instance.Visible = false; _grid = new UiGrid>(S_WaveItem, typeof(EditorWaveCell)); _grid.SetCellOffset(new Vector2I(0, 10)); @@ -179,6 +180,8 @@ { _grid.RemoveAll(); } + + RefreshAutoFillTip(); } /// @@ -291,6 +294,7 @@ //修改下拉菜单数据 var optionButton = S_PreinstallOption.Instance; optionButton.SetItemText(optionButton.Selected, $"{preinstall.Name} ({preinstall.Weight})"); + RefreshAutoFillTip(); //派发数据修改事件 EventManager.EmitEvent(EventEnum.OnTileMapDirty); }); @@ -475,4 +479,15 @@ }); } } + + private void RefreshAutoFillTip() + { + var preinstall = EditorTileMapManager.SelectPreinstall; + if (preinstall != null) + { + S_AutoFillTip.Instance.Visible = preinstall.AutoFill; + return; + } + S_AutoFillTip.Instance.Visible = false; + } } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs index 5776073..79b68f0 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs @@ -1,4 +1,6 @@ + using System; +using System.Collections.Generic; using System.Linq; using Config; using Godot; @@ -97,15 +99,39 @@ } //搜索结果 - var arr = ExcelConfig.ActivityBase_List.Where( - o => + var arr = new List(); + switch (type) + { + //全部类型 + case -1: + arr.Add(PreinstallMarkManager.Enemy); + arr.Add(PreinstallMarkManager.Prop); + arr.Add(PreinstallMarkManager.Weapon); + break; + //随机武器 + case (int)ActivityType.Weapon: + arr.Add(PreinstallMarkManager.Weapon); + break; + //随机道具 + case (int)ActivityType.Prop: + arr.Add(PreinstallMarkManager.Prop); + break; + //随机敌人 + case (int)ActivityType.Enemy: + arr.Add(PreinstallMarkManager.Enemy); + break; + } + foreach (var o in ExcelConfig.ActivityBase_List) + { + if (o.ShowInMapEditor && + (string.IsNullOrEmpty(name) || o.Name.Contains(name) || o.Id.Contains(name)) && + (type < 0 ? _typeArray.Contains(o.Type) : o.Type == type)) { - return o.ShowInMapEditor && - (string.IsNullOrEmpty(name) || o.Name.Contains(name) || o.Id.Contains(name)) && - (type < 0 ? _typeArray.Contains(o.Type) : o.Type == type); + arr.Add(o); } - ).ToArray(); - _objectGrid.SetDataList(arr); + } + + _objectGrid.SetDataList(arr.ToArray()); } /// diff --git a/README.md b/README.md index 579c8da..6377c77 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,11 @@ --- ### 游戏定义 -**游戏名称:** 待定 +**游戏名称:**《枪火地牢》 +**英文名称:**《Gunfire Dungeon》 **美术风格:** 2D像素(完美像素) -**游戏类型:** Roguelite, 俯视角, 地牢探索, 双摇杆射击 -**参考游戏:** 挺进地牢, 元气骑士, 废土之王 +**游戏标签:** Roguelite, 俯视角, 地牢探索, 双摇杆射击 +**参考游戏:** 《挺进地牢》, 《元气骑士》, 《废土之王》 **核心简介:** 游戏整体流程由数层地牢组成, 每层又由数个房间组成, 每个房间有一堵门隔开, 玩家每进入一个房间, 需要清理房间内所有的敌人, 方可离开和进入下一个房间, 玩家需要在这些房间中探索, 战斗, 收集掉落的道具和被动, 一步步成长, 击败boss, 进入下一层, 如此往复, 直到击败最后一层boss即可通关. 但本作与市面上常规地牢射击游戏不同的是, 玩家与敌人共用武器资源, 玩家击败敌人便可拾起敌人的武器, 并且更加注重环境互动要素