diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs
index 8ae4673..ce99349 100644
--- a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs
+++ b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MapEditorCreateMarkPanel.cs
@@ -159,7 +159,7 @@
}
///
- /// 创选择物体属性数据
+ /// 创建选择物体属性数据
///
/// 属性字符串名称
/// 属性显示名称
@@ -183,20 +183,10 @@
//选中物体回调, 创建标记数据
private void OnSelectObject(ExcelConfig.ActivityObject activityObject)
{
- //初始值
-
- //初始高度
- var altitude = 0;
- if (activityObject.Type == (int)ActivityType.Weapon || activityObject.Type == (int)ActivityType.Prop)
- {
- altitude = 8;
- }
-
_grid.Add(new MarkInfoItem()
{
Id = activityObject.Id,
Weight = 100,
- Altitude = altitude
});
}
}
diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs
index b9f7adb..dcdd20f 100644
--- a/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs
+++ b/DungeonShooting_Godot/src/game/ui/mapEditorCreateMark/MarkObjectCell.cs
@@ -188,6 +188,18 @@
_vSpeed.L_NumInput.Instance.Step = 0.1;
_expandPanel.L_ExpandGrid.AddChild(_altitude);
_expandPanel.L_ExpandGrid.AddChild(_vSpeed);
+
+ if (markInfoItem != null)
+ {
+ if (markInfoItem.Attr != null)
+ {
+ //初始高度
+ if (activityObject.Type == (int)ActivityType.Weapon || activityObject.Type == (int)ActivityType.Prop)
+ {
+ _altitude.L_NumInput.Instance.Value = 8;
+ }
+ }
+ }
if (activityObject.Type == (int)ActivityType.Weapon) //武器类型
{
@@ -231,14 +243,17 @@
}
else if (activityObject.Type == (int)ActivityType.Enemy) //敌人
{
+ var faceBar = CellNode.UiPanel.CreateNumberBar("Face", "脸朝向:");
var weaponBar = CellNode.UiPanel.CreateObjectBar("Weapon", "携带武器:", ActivityType.Weapon);
var numberBar2 = CellNode.UiPanel.CreateNumberBar("CurrAmmon", "弹夹弹药量:");
var numberBar3 = CellNode.UiPanel.CreateNumberBar("ResidueAmmo", "剩余弹药量:");
weaponBar.Instance.SetRelevancyAttr(numberBar2, numberBar3);
+ _expandPanel.L_ExpandGrid.AddChild(faceBar);
_expandPanel.L_ExpandGrid.AddChild(weaponBar);
_expandPanel.L_ExpandGrid.AddChild(numberBar2);
_expandPanel.L_ExpandGrid.AddChild(numberBar3);
_attributeBases = new List();
+ _attributeBases.Add(faceBar.Instance);
_attributeBases.Add(weaponBar.Instance);
_attributeBases.Add(numberBar2.Instance);
_attributeBases.Add(numberBar3.Instance);
@@ -250,6 +265,10 @@
if (markInfoItem.Attr != null)
{
+ if (markInfoItem.Attr.TryGetValue("Face", out var face)) //朝向
+ {
+ faceBar.L_NumInput.Instance.Value = int.Parse(face);
+ }
if (markInfoItem.Attr.TryGetValue("Weapon", out var weaponId)) //武器
{
weaponBar.Instance.SelectWeapon(ExcelConfig.Weapon_List.Find(w => w.WeaponId == weaponId));