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/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/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/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/inlet/Start/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/inlet/Start/Preinstall.json
index 9287cc7..279b625 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":52,"Y":65},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"$RandomProp","Weight":100,"Attr":null,"Altitude":16,"VerticalSpeed":0}]}],[{"Position":{"X":59,"Y":-5},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1,"MarkList":[{"Id":"$RandomGun","Weight":100,"Attr":null,"Altitude":16,"VerticalSpeed":0}]},{"Position":{"X":11,"Y":-46},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"$RandomProp","Weight":100,"Attr":null,"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/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/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/map/preinstall/ActivityMark.cs b/DungeonShooting_Godot/src/framework/map/preinstall/ActivityMark.cs
index 9516ece..0d266af 100644
--- a/DungeonShooting_Godot/src/framework/map/preinstall/ActivityMark.cs
+++ b/DungeonShooting_Godot/src/framework/map/preinstall/ActivityMark.cs
@@ -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..6be9480 100644
--- a/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs
+++ b/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs
@@ -114,17 +114,40 @@
var index = random.RandomWeight(tempArray);
markInfoItem = markInfo.MarkList[index];
}
-
- mark.Id = markInfoItem.Id;
+
+ var activityBase = PreinstallMarkManager.GetMarkConfig(markInfoItem.Id);
+ mark.ActivityType = (ActivityType)activityBase.Type;
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 (mark.ActivityType == ActivityType.Other) //其他类型
+ {
+ //判断是否是随机标记
+ if (markInfoItem.Id == PreinstallMarkManager.Weapon.Id) //随机武器
+ {
+ mark.Id = Utils.Random.RandomChoose(PreinstallMarkManager.GetMarkConfigsByType(ActivityType.Weapon))?.Id;
+ }
+ else if (markInfoItem.Id == PreinstallMarkManager.Enemy.Id) //随机敌人
+ {
+ mark.Id = Utils.Random.RandomChoose(PreinstallMarkManager.GetMarkConfigsByType(ActivityType.Enemy))?.Id;
+ }
+ else if (markInfoItem.Id == PreinstallMarkManager.Prop.Id) //随机道具
+ {
+ mark.Id = Utils.Random.RandomChoose(PreinstallMarkManager.GetMarkConfigsByType(ActivityType.Prop))?.Id;
+ }
+ else //非随机物体
+ {
+ mark.Id = markInfoItem.Id;
+ }
+ }
+ else if (mark.ActivityType == ActivityType.Enemy) //敌人类型
{
_hsaEnemy = true;
+ mark.Id = markInfoItem.Id;
+ mark.DerivedAttr = new Dictionary();
if (!mark.Attr.TryGetValue("Face", out var face) || face == "0") //随机方向
{
mark.DerivedAttr.Add("Face",
@@ -139,6 +162,10 @@
mark.DerivedAttr.Add("Face", face);
}
}
+ else
+ {
+ mark.Id = markInfoItem.Id;
+ }
}
else if (markInfo.SpecialMarkType == SpecialMarkType.BirthPoint) //玩家出生标记
{
@@ -455,7 +482,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/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..142cc7d 100644
--- a/DungeonShooting_Godot/src/game/GameApplication.cs
+++ b/DungeonShooting_Godot/src/game/GameApplication.cs
@@ -94,6 +94,7 @@
//初始化配置表
ExcelConfig.Init();
+ PreinstallMarkManager.Init();
//初始化房间配置数据
InitRoomConfig();
//初始化TileSet配置数据
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/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..99503ab 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)
{
@@ -186,21 +197,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..8976ca7 100644
--- a/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs
+++ b/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.Linq;
using Config;
using Godot;
@@ -97,15 +98,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());
}
///