diff --git a/DungeonShooting_Godot/excel/ActivityBase.xlsx b/DungeonShooting_Godot/excel/ActivityBase.xlsx
index e6240ec..5cd0698 100644
--- a/DungeonShooting_Godot/excel/ActivityBase.xlsx
+++ b/DungeonShooting_Godot/excel/ActivityBase.xlsx
Binary files differ
diff --git a/DungeonShooting_Godot/excel/EnemyBase.xlsx b/DungeonShooting_Godot/excel/EnemyBase.xlsx
index cec7fac..88cd072 100644
--- a/DungeonShooting_Godot/excel/EnemyBase.xlsx
+++ b/DungeonShooting_Godot/excel/EnemyBase.xlsx
Binary files differ
diff --git a/DungeonShooting_Godot/excelTool/ExcelGenerator.cs b/DungeonShooting_Godot/excelTool/ExcelGenerator.cs
index 0268b2a..c206007 100644
--- a/DungeonShooting_Godot/excelTool/ExcelGenerator.cs
+++ b/DungeonShooting_Godot/excelTool/ExcelGenerator.cs
@@ -524,7 +524,20 @@
var cellStringValue = GetCellStringValue(cell);
if (cellStringValue.Length == 0)
{
- data.Add(field, null);
+ if (mappingData.TypeStr == nameof(ActivityQuality))
+ {
+ ActivityQuality v = default;
+ data.Add(field, v);
+ }
+ else if (mappingData.TypeStr == nameof(ActivityType))
+ {
+ ActivityType v = default;
+ data.Add(field, v);
+ }
+ else
+ {
+ data.Add(field, null);
+ }
}
else
{
@@ -691,6 +704,8 @@
case "vector2": return "SerializeVector2";
case "vector3": return "SerializeVector3";
case "color": return "SerializeColor";
+ case "activityType": return "ActivityType";
+ case "activityQuality": return "ActivityQuality";
}
return typeName;
@@ -716,6 +731,8 @@
case "vector2": return "SerializeVector2";
case "vector3": return "SerializeVector3";
case "color": return "SerializeColor";
+ case "activityType": return "ActivityType";
+ case "activityQuality": return "ActivityQuality";
}
return typeName;
diff --git a/DungeonShooting_Godot/excelTool/serialize/ActivityQuality.cs b/DungeonShooting_Godot/excelTool/serialize/ActivityQuality.cs
new file mode 100644
index 0000000..9d5641d
--- /dev/null
+++ b/DungeonShooting_Godot/excelTool/serialize/ActivityQuality.cs
@@ -0,0 +1,39 @@
+
+///
+/// 物体品质
+///
+public enum ActivityQuality
+{
+ ///
+ /// 未设置
+ ///
+ None = 0,
+ ///
+ /// 通用物品
+ ///
+ Common = 1,
+ ///
+ /// 基础
+ ///
+ Basic = 2,
+ ///
+ /// 普通
+ ///
+ Ordinary = 3,
+ ///
+ /// 稀有
+ ///
+ Rare = 4,
+ ///
+ /// 史诗
+ ///
+ Epic = 5,
+ ///
+ /// 传说
+ ///
+ Legend = 6,
+ ///
+ /// 独一无二
+ ///
+ Unique = 7
+}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/excelTool/serialize/ActivityType.cs b/DungeonShooting_Godot/excelTool/serialize/ActivityType.cs
new file mode 100644
index 0000000..3a82149
--- /dev/null
+++ b/DungeonShooting_Godot/excelTool/serialize/ActivityType.cs
@@ -0,0 +1,51 @@
+
+///
+/// 物体类型
+///
+public enum ActivityType
+{
+ ///
+ /// 无类型
+ ///
+ None,
+ ///
+ /// 玩家
+ ///
+ Player,
+ ///
+ /// 测试对象
+ ///
+ Test,
+ ///
+ /// 角色
+ ///
+ Role,
+ ///
+ /// 敌人
+ ///
+ Enemy,
+ ///
+ /// 武器
+ ///
+ Weapon,
+ ///
+ /// 子弹
+ ///
+ Bullet,
+ ///
+ /// 弹壳
+ ///
+ Shell,
+ ///
+ /// 特效
+ ///
+ Effect,
+ ///
+ /// 道具
+ ///
+ Prop,
+ ///
+ /// 其它类型
+ ///
+ Other = 99,
+}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/excelTool/version b/DungeonShooting_Godot/excelTool/version
index 56a6051..e440e5c 100644
--- a/DungeonShooting_Godot/excelTool/version
+++ b/DungeonShooting_Godot/excelTool/version
@@ -1 +1 @@
-1
\ No newline at end of file
+3
\ No newline at end of file
diff --git a/DungeonShooting_Godot/resource/config/ActivityBase.json b/DungeonShooting_Godot/resource/config/ActivityBase.json
index 42cb08e..da0ffac 100644
--- a/DungeonShooting_Godot/resource/config/ActivityBase.json
+++ b/DungeonShooting_Godot/resource/config/ActivityBase.json
@@ -3,6 +3,7 @@
"Id": "role0001",
"Type": 3,
"Name": "\u73A9\u5BB6",
+ "Quality": 0,
"Intro": "\u73A9\u5BB6",
"Details": "",
"IsStatic": false,
@@ -15,6 +16,7 @@
"Id": "enemy0001",
"Type": 4,
"Name": "\u654C\u4EBA",
+ "Quality": 0,
"Intro": "\u654C\u4EBA",
"Details": "",
"IsStatic": false,
@@ -27,6 +29,7 @@
"Id": "enemy0002",
"Type": 4,
"Name": "\u654C\u4EBA2",
+ "Quality": 0,
"Intro": "\u654C\u4EBA2",
"Details": "",
"IsStatic": false,
@@ -39,6 +42,7 @@
"Id": "weapon0001",
"Type": 5,
"Name": "\u6B65\u67AA",
+ "Quality": 3,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -51,6 +55,7 @@
"Id": "weapon0002",
"Type": 5,
"Name": "\u9730\u5F39\u67AA",
+ "Quality": 3,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -63,6 +68,7 @@
"Id": "weapon0003",
"Type": 5,
"Name": "\u624B\u67AA",
+ "Quality": 2,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -75,6 +81,7 @@
"Id": "weapon0004",
"Type": 5,
"Name": "\u5200",
+ "Quality": 4,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -87,6 +94,7 @@
"Id": "weapon0005",
"Type": 5,
"Name": "\u72D9\u51FB\u67AA",
+ "Quality": 4,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -99,6 +107,7 @@
"Id": "weapon0006",
"Type": 5,
"Name": "\u51B2\u950B\u67AA",
+ "Quality": 2,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -111,6 +120,7 @@
"Id": "weapon0007",
"Type": 5,
"Name": "\u6C64\u59C6\u900A\u51B2\u950B\u67AA",
+ "Quality": 4,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -123,6 +133,7 @@
"Id": "weapon0008",
"Type": 5,
"Name": "\u6FC0\u5149\u624B\u67AA",
+ "Quality": 4,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -135,6 +146,7 @@
"Id": "weapon0009",
"Type": 5,
"Name": "\u69B4\u5F39\u53D1\u5C04\u5668",
+ "Quality": 4,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -147,6 +159,7 @@
"Id": "bullet0001",
"Type": 6,
"Name": "",
+ "Quality": 0,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -159,6 +172,7 @@
"Id": "bullet0002",
"Type": 6,
"Name": "",
+ "Quality": 0,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -171,6 +185,7 @@
"Id": "bullet0003",
"Type": 6,
"Name": "",
+ "Quality": 0,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -183,6 +198,7 @@
"Id": "bullet0004",
"Type": 6,
"Name": "\u69B4\u5F39\u70AE",
+ "Quality": 0,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -195,6 +211,7 @@
"Id": "bullet0005",
"Type": 6,
"Name": "\u629B\u7269\u7EBF\u7C98\u6DB2\u5B50\u5F39",
+ "Quality": 0,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -207,6 +224,7 @@
"Id": "shell0001",
"Type": 7,
"Name": "",
+ "Quality": 0,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -219,6 +237,7 @@
"Id": "shell0002",
"Type": 7,
"Name": "",
+ "Quality": 0,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -231,6 +250,7 @@
"Id": "shell0003",
"Type": 7,
"Name": "",
+ "Quality": 0,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -243,6 +263,7 @@
"Id": "shell0004",
"Type": 7,
"Name": "",
+ "Quality": 0,
"Intro": "",
"Details": "",
"IsStatic": false,
@@ -255,6 +276,7 @@
"Id": "enemy_dead0001",
"Type": 8,
"Name": "",
+ "Quality": 0,
"Intro": "\u654C\u4EBA1\u6B7B\u4EA1\u788E\u7247",
"Details": "",
"IsStatic": false,
@@ -267,6 +289,7 @@
"Id": "enemy_dead0002",
"Type": 8,
"Name": "",
+ "Quality": 0,
"Intro": "\u654C\u4EBA2\u6B7B\u4EA1",
"Details": "",
"IsStatic": false,
@@ -279,6 +302,7 @@
"Id": "prop0001",
"Type": 9,
"Name": "\u978B\u5B50",
+ "Quality": 4,
"Intro": "\u63D0\u9AD8\u79FB\u52A8\u901F\u5EA6",
"Details": "",
"IsStatic": false,
@@ -291,6 +315,7 @@
"Id": "prop0002",
"Type": 9,
"Name": "\u5FC3\u4E4B\u5BB9\u5668",
+ "Quality": 3,
"Intro": "\u63D0\u9AD8\u8840\u91CF\u4E0A\u9650",
"Details": "",
"IsStatic": false,
@@ -303,6 +328,7 @@
"Id": "prop0003",
"Type": 9,
"Name": "\u62A4\u76FE",
+ "Quality": 3,
"Intro": "\u53EF\u4EE5\u62B5\u6321\u5B50\u5F39\uFF0C\u968F\u65F6\u95F4\u63A8\u79FB\u81EA\u52A8\u6062\u590D",
"Details": "",
"IsStatic": false,
@@ -315,6 +341,7 @@
"Id": "prop0004",
"Type": 9,
"Name": "\u62A4\u76FE\u8BA1\u65F6\u5668",
+ "Quality": 4,
"Intro": "\u63D0\u9AD8\u62A4\u76FE\u6062\u590D\u901F\u5EA6",
"Details": "",
"IsStatic": false,
@@ -327,6 +354,7 @@
"Id": "prop0005",
"Type": 9,
"Name": "\u6740\u4F24\u5F39",
+ "Quality": 4,
"Intro": "\u63D0\u9AD8\u5B50\u5F39\u4F24\u5BB3",
"Details": "",
"IsStatic": false,
@@ -339,6 +367,7 @@
"Id": "prop0006",
"Type": 9,
"Name": "\u7EA2\u5B9D\u77F3\u6212\u6307",
+ "Quality": 4,
"Intro": "\u53D7\u4F24\u540E\u5EF6\u957F\u65E0\u654C\u65F6\u95F4",
"Details": "",
"IsStatic": false,
@@ -351,6 +380,7 @@
"Id": "prop0007",
"Type": 9,
"Name": "\u5907\u7528\u62A4\u76FE",
+ "Quality": 3,
"Intro": "\u53D7\u4F24\u65F6\u6709\u4E00\u5B9A\u6982\u7387\u62B5\u6D88\u4F24\u5BB3",
"Details": "",
"IsStatic": false,
@@ -363,6 +393,7 @@
"Id": "prop0008",
"Type": 9,
"Name": "\u773C\u955C",
+ "Quality": 3,
"Intro": "\u63D0\u9AD8\u6B66\u5668\u7CBE\u51C6\u5EA6",
"Details": "",
"IsStatic": false,
@@ -375,6 +406,7 @@
"Id": "prop0009",
"Type": 9,
"Name": "\u9AD8\u901F\u5B50\u5F39",
+ "Quality": 3,
"Intro": "\u63D0\u9AD8\u5B50\u5F39\u901F\u5EA6\u548C\u5C04\u7A0B",
"Details": "",
"IsStatic": false,
@@ -387,6 +419,7 @@
"Id": "prop0010",
"Type": 9,
"Name": "\u5206\u88C2\u5B50\u5F39",
+ "Quality": 4,
"Intro": "\u5B50\u5F39\u6570\u91CF\u7FFB\u500D, \u4F46\u662F\u7CBE\u51C6\u5EA6, \u51FB\u9000\u548C\u4F24\u5BB3\u964D\u4F4E",
"Details": "",
"IsStatic": false,
@@ -399,6 +432,7 @@
"Id": "prop0011",
"Type": 9,
"Name": "\u5F39\u5C04\u5B50\u5F39",
+ "Quality": 4,
"Intro": "\u5B50\u5F39\u53CD\u5F39\u6B21\u6570\u002B2",
"Details": "",
"IsStatic": false,
@@ -411,6 +445,7 @@
"Id": "prop0012",
"Type": 9,
"Name": "\u7A7F\u900F\u5B50\u5F39",
+ "Quality": 4,
"Intro": "\u5B50\u5F39\u7A7F\u900F\u002B1",
"Details": "",
"IsStatic": false,
@@ -423,6 +458,7 @@
"Id": "prop0013",
"Type": 9,
"Name": "\u6B66\u5668\u80CC\u5305",
+ "Quality": 2,
"Intro": "\u6B66\u5668\u5BB9\u91CF\u002B1",
"Details": "",
"IsStatic": false,
@@ -435,6 +471,7 @@
"Id": "prop0014",
"Type": 9,
"Name": "\u9053\u5177\u80CC\u5305",
+ "Quality": 2,
"Intro": "\u9053\u5177\u5BB9\u91CF\u002B1",
"Details": "",
"IsStatic": false,
@@ -447,6 +484,7 @@
"Id": "prop5000",
"Type": 9,
"Name": "\u533B\u836F\u7BB1",
+ "Quality": 1,
"Intro": "\u4F7F\u7528\u540E\u56DE\u590D\u4E00\u9897\u7EA2\u5FC3",
"Details": "",
"IsStatic": false,
@@ -459,6 +497,7 @@
"Id": "prop5001",
"Type": 9,
"Name": "\u5F39\u836F\u7BB1",
+ "Quality": 1,
"Intro": "\u4F7F\u7528\u540E\u8865\u5145\u5F53\u524D\u6B66\u5668\u5907\u7528\u5F39\u836F",
"Details": "",
"IsStatic": false,
@@ -471,6 +510,7 @@
"Id": "other_door_e",
"Type": 99,
"Name": "",
+ "Quality": 0,
"Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u4E1C\u4FA7)",
"Details": "",
"IsStatic": true,
@@ -483,6 +523,7 @@
"Id": "other_door_w",
"Type": 99,
"Name": "",
+ "Quality": 0,
"Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u897F\u4FA7)",
"Details": "",
"IsStatic": true,
@@ -495,6 +536,7 @@
"Id": "other_door_s",
"Type": 99,
"Name": "",
+ "Quality": 0,
"Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u5357\u4FA7)",
"Details": "",
"IsStatic": true,
@@ -507,6 +549,7 @@
"Id": "other_door_n",
"Type": 99,
"Name": "",
+ "Quality": 0,
"Intro": "\u5730\u7262\u623F\u95F4\u7684\u95E8(\u5317\u4FA7)",
"Details": "",
"IsStatic": true,
diff --git a/DungeonShooting_Godot/resource/config/EnemyBase.json b/DungeonShooting_Godot/resource/config/EnemyBase.json
index 968950a..b14294d 100644
--- a/DungeonShooting_Godot/resource/config/EnemyBase.json
+++ b/DungeonShooting_Godot/resource/config/EnemyBase.json
@@ -3,7 +3,8 @@
"Id": "0001",
"__Activity": "enemy0001",
"Remark": "\u654C\u4EBA1",
- "MoveSpeed": 120,
+ "Hp": 20,
+ "MoveSpeed": 80,
"Acceleration": 1500,
"Friction": 900,
"CanPickUpWeapon": true,
@@ -15,6 +16,7 @@
"Id": "0002",
"__Activity": "enemy0002",
"Remark": "\u654C\u4EBA2",
+ "Hp": 20,
"MoveSpeed": 120,
"Acceleration": 1500,
"Friction": 900,
diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/shop/Shop1/Preview.png.import b/DungeonShooting_Godot/resource/map/tileMaps/Test1/shop/Shop1/Preview.png.import
new file mode 100644
index 0000000..8ac948a
--- /dev/null
+++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/shop/Shop1/Preview.png.import
@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://b8sw1xi6iosg4"
+path="res://.godot/imported/Preview.png-a6cb6d2603055a6ca060f3ff00e023de.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://resource/map/tileMaps/Test1/shop/Shop1/Preview.png"
+dest_files=["res://.godot/imported/Preview.png-a6cb6d2603055a6ca060f3ff00e023de.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/src/config/ExcelConfig_ActivityBase.cs b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityBase.cs
index 76d7bfb..421c3e4 100644
--- a/DungeonShooting_Godot/src/config/ExcelConfig_ActivityBase.cs
+++ b/DungeonShooting_Godot/src/config/ExcelConfig_ActivityBase.cs
@@ -26,7 +26,7 @@
/// Other(其它类型): 99
///
[JsonInclude]
- public int Type;
+ public ActivityType Type;
///
/// 物体名称
@@ -35,6 +35,19 @@
public string Name;
///
+ /// 物体品质, 用于武器和道具
+ /// 通用物品: 1
+ /// 基础: 2
+ /// 普通: 3
+ /// 稀有: 4
+ /// 史诗: 5
+ /// 传说: 6
+ /// 独一无二: 7
+ ///
+ [JsonInclude]
+ public ActivityQuality Quality;
+
+ ///
/// 物体简介
/// 一句对物体简短的介绍, 比如拾起物体时弹出的描述
///
@@ -88,6 +101,7 @@
inst.Id = Id;
inst.Type = Type;
inst.Name = Name;
+ inst.Quality = Quality;
inst.Intro = Intro;
inst.Details = Details;
inst.IsStatic = IsStatic;
diff --git a/DungeonShooting_Godot/src/config/ExcelConfig_EnemyBase.cs b/DungeonShooting_Godot/src/config/ExcelConfig_EnemyBase.cs
index cedad80..2521e9f 100644
--- a/DungeonShooting_Godot/src/config/ExcelConfig_EnemyBase.cs
+++ b/DungeonShooting_Godot/src/config/ExcelConfig_EnemyBase.cs
@@ -25,6 +25,12 @@
public string Remark;
///
+ /// 血量
+ ///
+ [JsonInclude]
+ public int Hp;
+
+ ///
/// 移动速度
///
[JsonInclude]
@@ -75,6 +81,7 @@
inst.Id = Id;
inst.Activity = Activity;
inst.Remark = Remark;
+ inst.Hp = Hp;
inst.MoveSpeed = MoveSpeed;
inst.Acceleration = Acceleration;
inst.Friction = Friction;
diff --git a/DungeonShooting_Godot/src/framework/activity/ActivityQuality.cs b/DungeonShooting_Godot/src/framework/activity/ActivityQuality.cs
new file mode 100644
index 0000000..9d5641d
--- /dev/null
+++ b/DungeonShooting_Godot/src/framework/activity/ActivityQuality.cs
@@ -0,0 +1,39 @@
+
+///
+/// 物体品质
+///
+public enum ActivityQuality
+{
+ ///
+ /// 未设置
+ ///
+ None = 0,
+ ///
+ /// 通用物品
+ ///
+ Common = 1,
+ ///
+ /// 基础
+ ///
+ Basic = 2,
+ ///
+ /// 普通
+ ///
+ Ordinary = 3,
+ ///
+ /// 稀有
+ ///
+ Rare = 4,
+ ///
+ /// 史诗
+ ///
+ Epic = 5,
+ ///
+ /// 传说
+ ///
+ Legend = 6,
+ ///
+ /// 独一无二
+ ///
+ Unique = 7
+}
\ No newline at end of file
diff --git a/DungeonShooting_Godot/src/framework/map/preinstall/PreinstallMarkManager.cs b/DungeonShooting_Godot/src/framework/map/preinstall/PreinstallMarkManager.cs
index cde2d24..f292bd4 100644
--- a/DungeonShooting_Godot/src/framework/map/preinstall/PreinstallMarkManager.cs
+++ b/DungeonShooting_Godot/src/framework/map/preinstall/PreinstallMarkManager.cs
@@ -8,11 +8,11 @@
///
/// 随机武器
///
- public static readonly RandomActivityBase Weapon = new RandomActivityBase()
+ public static readonly RandomActivityBase RandomWeapon = new RandomActivityBase()
{
Id = "$RandomGun",
Name = "随机武器",
- Type = (int)ActivityType.Other,
+ Type = ActivityType.Other,
Icon = ResourcePath.resource_sprite_ui_commonIcon_Dice_png,
ShowInMapEditor = true
};
@@ -20,11 +20,11 @@
///
/// 随机敌人
///
- public static readonly RandomActivityBase Enemy = new RandomActivityBase()
+ public static readonly RandomActivityBase RandomEnemy = new RandomActivityBase()
{
Id = "$RandomEnemy",
Name = "随机敌人",
- Type = (int)ActivityType.Other,
+ Type = ActivityType.Other,
Icon = ResourcePath.resource_sprite_ui_commonIcon_Dice_png,
ShowInMapEditor = true
};
@@ -32,17 +32,16 @@
///
/// 随机道具
///
- public static readonly RandomActivityBase Prop = new RandomActivityBase()
+ public static readonly RandomActivityBase RandomProp = new RandomActivityBase()
{
Id = "$RandomProp",
Name = "随机道具",
- Type = (int)ActivityType.Other,
+ Type = ActivityType.Other,
Icon = ResourcePath.resource_sprite_ui_commonIcon_Dice_png,
ShowInMapEditor = true
};
- private static Dictionary> _cache =
- new Dictionary>();
+ private static Dictionary> _cache = new Dictionary>();
private static bool _init = false;
@@ -67,17 +66,17 @@
///
public static ExcelConfig.ActivityBase GetMarkConfig(string id)
{
- if (Weapon.Id == id)
+ if (RandomWeapon.Id == id)
{
- return Weapon;
+ return RandomWeapon;
}
- else if (Enemy.Id == id)
+ else if (RandomEnemy.Id == id)
{
- return Enemy;
+ return RandomEnemy;
}
- else if (Prop.Id == id)
+ else if (RandomProp.Id == id)
{
- return Prop;
+ return RandomProp;
}
ExcelConfig.ActivityBase_Map.TryGetValue(id, out var activityBase);
diff --git a/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs b/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs
index 458b8bc..df8f650 100644
--- a/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs
+++ b/DungeonShooting_Godot/src/framework/map/preinstall/RoomPreinstall.cs
@@ -122,17 +122,17 @@
if (activityBase is RandomActivityBase) //随机物体
{
- if (markInfoItem.Id == PreinstallMarkManager.Weapon.Id) //随机武器
+ if (markInfoItem.Id == PreinstallMarkManager.RandomWeapon.Id) //随机武器
{
mark.Id = world.RandomPool.GetRandomWeapon()?.Id;
mark.ActivityType = ActivityType.Weapon;
}
- else if (markInfoItem.Id == PreinstallMarkManager.Enemy.Id) //随机敌人
+ else if (markInfoItem.Id == PreinstallMarkManager.RandomEnemy.Id) //随机敌人
{
mark.Id = world.RandomPool.GetRandomEnemy()?.Id;
mark.ActivityType = ActivityType.Enemy;
}
- else if (markInfoItem.Id == PreinstallMarkManager.Prop.Id) //随机道具
+ else if (markInfoItem.Id == PreinstallMarkManager.RandomProp.Id) //随机道具
{
mark.Id = world.RandomPool.GetRandomProp()?.Id;
mark.ActivityType = ActivityType.Prop;
diff --git a/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs b/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs
index 47aa18d..40ecd73 100644
--- a/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs
+++ b/DungeonShooting_Godot/src/game/activity/role/enemy/Enemy.cs
@@ -165,6 +165,8 @@
var enemyBase = GetEnemyAttribute(ActivityBase.Id).Clone();
_enemyAttribute = enemyBase;
+ MaxHp = enemyBase.Hp;
+ Hp = enemyBase.Hp;
roleState.CanPickUpWeapon = enemyBase.CanPickUpWeapon;
roleState.MoveSpeed = enemyBase.MoveSpeed;
roleState.Acceleration = enemyBase.Acceleration;
diff --git a/DungeonShooting_Godot/src/game/manager/NameManager.cs b/DungeonShooting_Godot/src/game/manager/NameManager.cs
index e823f5b..b19589e 100644
--- a/DungeonShooting_Godot/src/game/manager/NameManager.cs
+++ b/DungeonShooting_Godot/src/game/manager/NameManager.cs
@@ -4,9 +4,9 @@
///
/// 获取物体属性名称字符串
///
- public static string GetActivityTypeName(int type)
+ public static string GetActivityTypeName(ActivityType type)
{
- switch ((ActivityType)type)
+ switch (type)
{
case ActivityType.None:
return "";
diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs
index 8377944..0ac1067 100644
--- a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs
+++ b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs
@@ -209,14 +209,14 @@
};
//初始高度
- if (activityObject.Type == (int)ActivityType.Weapon || activityObject.Type == (int)ActivityType.Prop)
+ if (activityObject.Type == ActivityType.Weapon || activityObject.Type == ActivityType.Prop)
{
markInfoItem.Altitude = 8;
}
- else if (activityObject.Type == (int)ActivityType.Other)
+ else if (activityObject.Type == ActivityType.Other)
{
//随机道具或者随机武器
- if (activityObject.Id == PreinstallMarkManager.Weapon.Id || activityObject.Id == PreinstallMarkManager.Prop.Id)
+ if (activityObject.Id == PreinstallMarkManager.RandomWeapon.Id || activityObject.Id == PreinstallMarkManager.RandomProp.Id)
{
markInfoItem.Altitude = 8;
}
diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs
index 8b2c588..64ccf45 100644
--- a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs
+++ b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs
@@ -206,7 +206,7 @@
_vSpeed.L_NumInput.Instance.Value = markInfoItem.VerticalSpeed;
}
- if (activityObject.Type == (int)ActivityType.Weapon) //武器类型
+ if (activityObject.Type == ActivityType.Weapon) //武器类型
{
var numberBar = CellNode.UiPanel.CreateNumberBar("CurrAmmon", "弹夹弹药量:");
var numberBar2 = CellNode.UiPanel.CreateNumberBar("ResidueAmmo", "剩余弹药量:");
@@ -246,7 +246,7 @@
}
}
}
- else if (activityObject.Type == (int)ActivityType.Enemy) //敌人
+ else if (activityObject.Type == ActivityType.Enemy) //敌人
{
var faceBar = CellNode.UiPanel.CreateOptionBar("Face", "脸朝向:");
faceBar.Instance.AddItem("随机", 0);
diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs
index 79b68f0..101e836 100644
--- a/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs
+++ b/DungeonShooting_Godot/src/game/ui/mapEditorSelectObject/MapEditorSelectObjectPanel.cs
@@ -23,9 +23,9 @@
///
/// 类型值
///
- public int Type;
+ public ActivityType Type;
- public TypeButtonData(string name, int type)
+ public TypeButtonData(string name, ActivityType type)
{
Name = name;
Type = type;
@@ -36,7 +36,7 @@
//物体网格组件
private UiGrid _objectGrid;
//允许出现在该面板中的物体类型
- private int[] _typeArray = new[] { 4, 5, 9 };
+ private ActivityType[] _typeArray = new[] { ActivityType.Enemy, ActivityType.Weapon, ActivityType.Prop };
public override void OnCreateUi()
{
@@ -67,14 +67,14 @@
_typeGrid.RemoveAll();
if (activityType == ActivityType.None)
{
- _typeGrid.Add(new TypeButtonData("所有", -1));
- _typeGrid.Add(new TypeButtonData(ActivityId.GetTypeName(ActivityType.Weapon), (int)ActivityType.Weapon));
- _typeGrid.Add(new TypeButtonData(ActivityId.GetTypeName(ActivityType.Prop), (int)ActivityType.Prop));
- _typeGrid.Add(new TypeButtonData(ActivityId.GetTypeName(ActivityType.Enemy), (int)ActivityType.Enemy));
+ _typeGrid.Add(new TypeButtonData("所有", ActivityType.None));
+ _typeGrid.Add(new TypeButtonData(ActivityId.GetTypeName(ActivityType.Weapon), ActivityType.Weapon));
+ _typeGrid.Add(new TypeButtonData(ActivityId.GetTypeName(ActivityType.Prop), ActivityType.Prop));
+ _typeGrid.Add(new TypeButtonData(ActivityId.GetTypeName(ActivityType.Enemy), ActivityType.Enemy));
}
else
{
- _typeGrid.Add(new TypeButtonData(ActivityId.GetTypeName(activityType), (int)activityType));
+ _typeGrid.Add(new TypeButtonData(ActivityId.GetTypeName(activityType), activityType));
}
_typeGrid.SelectIndex = 0;
}
@@ -85,7 +85,7 @@
public void OnSearch()
{
//类型
- int type;
+ ActivityType type;
//名称
var name = S_LineEdit.Instance.Text;
var buttonData = _typeGrid.GetData(_typeGrid.SelectIndex);
@@ -95,7 +95,7 @@
}
else
{
- type = -1;
+ type = ActivityType.None;
}
//搜索结果
@@ -103,29 +103,29 @@
switch (type)
{
//全部类型
- case -1:
- arr.Add(PreinstallMarkManager.Enemy);
- arr.Add(PreinstallMarkManager.Prop);
- arr.Add(PreinstallMarkManager.Weapon);
+ case ActivityType.None:
+ arr.Add(PreinstallMarkManager.RandomEnemy);
+ arr.Add(PreinstallMarkManager.RandomProp);
+ arr.Add(PreinstallMarkManager.RandomWeapon);
break;
//随机武器
- case (int)ActivityType.Weapon:
- arr.Add(PreinstallMarkManager.Weapon);
+ case ActivityType.Weapon:
+ arr.Add(PreinstallMarkManager.RandomWeapon);
break;
//随机道具
- case (int)ActivityType.Prop:
- arr.Add(PreinstallMarkManager.Prop);
+ case ActivityType.Prop:
+ arr.Add(PreinstallMarkManager.RandomProp);
break;
//随机敌人
- case (int)ActivityType.Enemy:
- arr.Add(PreinstallMarkManager.Enemy);
+ case ActivityType.Enemy:
+ arr.Add(PreinstallMarkManager.RandomEnemy);
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))
+ (type == ActivityType.None ? _typeArray.Contains(o.Type) : o.Type == type))
{
arr.Add(o);
}