diff --git a/DungeonShooting_Godot/prefab/ui/MapEditorMapMark.tscn b/DungeonShooting_Godot/prefab/ui/MapEditorMapMark.tscn index 5980ffa..8bd0e6d 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditorMapMark.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditorMapMark.tscn @@ -19,7 +19,7 @@ shader_parameter/show_outline = true shader_parameter/outline_color = Color(1, 1, 1, 1) shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true +shader_parameter/outline_use_blend = false shader_parameter/grey = 0.0 [node name="MapEditorMapMark" type="Control"] diff --git a/DungeonShooting_Godot/prefab/ui/MapEditorTools.tscn b/DungeonShooting_Godot/prefab/ui/MapEditorTools.tscn index a5bcf61..c8d6055 100644 --- a/DungeonShooting_Godot/prefab/ui/MapEditorTools.tscn +++ b/DungeonShooting_Godot/prefab/ui/MapEditorTools.tscn @@ -20,7 +20,7 @@ shader_parameter/show_outline = true shader_parameter/outline_color = Color(0, 0, 0, 1) shader_parameter/outline_rainbow = false -shader_parameter/outline_use_blend = true +shader_parameter/outline_use_blend = false shader_parameter/grey = 0.0 [node name="MapEditorTools" type="Control"] diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json index d17e052..f5139d6 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/inlet/Start1/Preinstall.json @@ -1 +1 @@ -[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":15,"Y":12},"Size":{"X":14,"Y":16},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":23,"Y":-7},"Size":{"X":30,"Y":12},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":8,"Y":32},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0002","Weight":100,"Attr":{"CurrAmmon":"7","ResidueAmmo":"70"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-40,"Y":7},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0004","Weight":100,"Attr":{"CurrAmmon":"180","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-63,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0005","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"40"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-31,"Y":-16},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0003","Weight":100,"Attr":{"CurrAmmon":"12","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-54,"Y":33},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0006","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":-25},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0007","Weight":100,"Attr":{"CurrAmmon":"60","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-76,"Y":21},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0008","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-82,"Y":53},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0009","Weight":100,"Attr":{"CurrAmmon":"1","ResidueAmmo":"25"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":58,"Y":4},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0011","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":45,"Y":55},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0012","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-90,"Y":-26},"Size":{"X":13,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0013","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-91,"Y":-6},"Size":{"X":14,"Y":13},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0014","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]}],[{"Position":{"X":72,"Y":62},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":67,"Y":28},"Size":{"X":16,"Y":17},"SpecialMarkType":0,"DelayTime":0.5,"MarkList":[{"Id":"prop5000","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":60,"Y":-19},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":37,"Y":24},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1.5,"MarkList":[{"Id":"prop0002","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-11,"Y":6},"Size":{"X":18,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-21,"Y":32},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]}]]},{"Name":"test2","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":0,"Y":0},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]}]]}] \ No newline at end of file +[{"Name":"test1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":0,"Y":0},"Size":{"X":14,"Y":16},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":35,"Y":-27},"Size":{"X":30,"Y":12},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":8,"Y":32},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0002","Weight":100,"Attr":{"CurrAmmon":"7","ResidueAmmo":"70"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-50,"Y":7},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0004","Weight":100,"Attr":{"CurrAmmon":"180","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-63,"Y":-18},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0005","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"40"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-31,"Y":-16},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0003","Weight":100,"Attr":{"CurrAmmon":"12","ResidueAmmo":"90"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-54,"Y":33},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0006","Weight":100,"Attr":{"CurrAmmon":"20","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":2,"Y":-25},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0007","Weight":100,"Attr":{"CurrAmmon":"60","ResidueAmmo":"300"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-76,"Y":21},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0008","Weight":100,"Attr":{"CurrAmmon":"10","ResidueAmmo":"120"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-87,"Y":46},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0009","Weight":100,"Attr":{"CurrAmmon":"1","ResidueAmmo":"25"},"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":34,"Y":-1},"Size":{"X":24,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0011","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":45,"Y":55},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0012","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-90,"Y":-26},"Size":{"X":13,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0013","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-91,"Y":-6},"Size":{"X":14,"Y":13},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0014","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-73,"Y":66},"Size":{"X":14,"Y":14},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]}],[{"Position":{"X":72,"Y":62},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0003","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":67,"Y":28},"Size":{"X":16,"Y":17},"SpecialMarkType":0,"DelayTime":0.5,"MarkList":[{"Id":"prop5000","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":67,"Y":-12},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1,"MarkList":[{"Id":"prop5001","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":36,"Y":25},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":1.5,"MarkList":[{"Id":"prop0002","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-24,"Y":8},"Size":{"X":18,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]},{"Position":{"X":-20,"Y":34},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"prop0010","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0},{"Id":"prop0006","Weight":100,"Attr":null,"Altitude":8,"VerticalSpeed":0}]}]]},{"Name":"test2","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":0,"Y":0},"Size":{"X":0,"Y":0},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/sprite/ui/commonIcon/BirthMark.png b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/BirthMark.png new file mode 100644 index 0000000..d4715c7 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/BirthMark.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/commonIcon/BirthMark.png.import b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/BirthMark.png.import new file mode 100644 index 0000000..35dcc99 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/BirthMark.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ujle7co6uhf" +path="res://.godot/imported/BirthMark.png-b9b598059dc4f87cecf4c17c3c47fe2a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/commonIcon/BirthMark.png" +dest_files=["res://.godot/imported/BirthMark.png-b9b598059dc4f87cecf4c17c3c47fe2a.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 new file mode 100644 index 0000000..67234a6 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/PackageMark.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/ui/commonIcon/PackageMark.png.import b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/PackageMark.png.import new file mode 100644 index 0000000..8b5f809 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/PackageMark.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ca7rf3r1gatls" +path="res://.godot/imported/PackageMark.png-a4c55b5ac7072d3265d27030ac2531c0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/ui/commonIcon/PackageMark.png" +dest_files=["res://.godot/imported/PackageMark.png-a4c55b5ac7072d3265d27030ac2531c0.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/UnknownActivity.png b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/UnknownActivity.png index 6a1506e..f616876 100644 --- a/DungeonShooting_Godot/resource/sprite/ui/commonIcon/UnknownActivity.png +++ b/DungeonShooting_Godot/resource/sprite/ui/commonIcon/UnknownActivity.png Binary files differ diff --git a/DungeonShooting_Godot/src/game/manager/ResourceManager.cs b/DungeonShooting_Godot/src/game/manager/ResourceManager.cs index 4220c89..97facb8 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourceManager.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourceManager.cs @@ -172,15 +172,33 @@ } /// - /// 根据 ActivityBase 表 Id 获取物体图标 + /// 根据标记数据获取标记图标 /// - public static Texture2D GetActivityIcon(string id) + public static Texture2D GetMarkIcon(MarkInfo markInfo) { - if (id != null && ExcelConfig.ActivityBase_Map.TryGetValue(id, out var activityBase)) + if (markInfo != null) { - return LoadTexture2D(activityBase.Icon); + if (markInfo.SpecialMarkType == SpecialMarkType.BirthPoint) //出生标记 + { + return LoadTexture2D(ResourcePath.resource_sprite_ui_commonIcon_BirthMark_png); + } + else if (markInfo.MarkList != null) //普通标记 + { + if (markInfo.MarkList.Count > 1) //多个物体 + { + return LoadTexture2D(ResourcePath.resource_sprite_ui_commonIcon_PackageMark_png); + } + else if (markInfo.MarkList.Count == 1) //单个物体 + { + var id = markInfo.MarkList[0].Id; + if (id != null && ExcelConfig.ActivityBase_Map.TryGetValue(id, out var activityBase)) + { + return LoadTexture2D(activityBase.Icon); + } + } + } } - + //未知物体 return LoadTexture2D(ResourcePath.resource_sprite_ui_commonIcon_UnknownActivity_png); } diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index 19463ca..bc5226c 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -285,6 +285,7 @@ public const string resource_sprite_ui_commonIcon_Add_png = "res://resource/sprite/ui/commonIcon/Add.png"; public const string resource_sprite_ui_commonIcon_AreaTool_png = "res://resource/sprite/ui/commonIcon/AreaTool.png"; public const string resource_sprite_ui_commonIcon_Back_png = "res://resource/sprite/ui/commonIcon/Back.png"; + public const string resource_sprite_ui_commonIcon_BirthMark_png = "res://resource/sprite/ui/commonIcon/BirthMark.png"; public const string resource_sprite_ui_commonIcon_Block_png = "res://resource/sprite/ui/commonIcon/Block.png"; 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"; @@ -298,6 +299,7 @@ public const string resource_sprite_ui_commonIcon_Mark_png = "res://resource/sprite/ui/commonIcon/Mark.png"; public const string resource_sprite_ui_commonIcon_MarkCell_png = "res://resource/sprite/ui/commonIcon/MarkCell.png"; public const string resource_sprite_ui_commonIcon_MarkCell_placeholder_png = "res://resource/sprite/ui/commonIcon/MarkCell_placeholder.png"; + public const string resource_sprite_ui_commonIcon_PackageMark_png = "res://resource/sprite/ui/commonIcon/PackageMark.png"; public const string resource_sprite_ui_commonIcon_PenTool_png = "res://resource/sprite/ui/commonIcon/PenTool.png"; public const string resource_sprite_ui_commonIcon_Play_png = "res://resource/sprite/ui/commonIcon/Play.png"; public const string resource_sprite_ui_commonIcon_Right_png = "res://resource/sprite/ui/commonIcon/Right.png"; diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorMarkCell.cs b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorMarkCell.cs index f22d72c..73d6084 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorMarkCell.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorMarkCell.cs @@ -35,21 +35,16 @@ str += ExcelConfig.ActivityBase_Map[markInfoItem.Id].Name; } text += str; - //显示图标 - var markInfo = data.MarkInfo.MarkList[0]; - textureRect.Texture = ResourceManager.GetActivityIcon(markInfo.Id); } else { if (data.MarkInfo.SpecialMarkType == SpecialMarkType.BirthPoint) { text = "出生标记"; - textureRect.Texture = ResourceManager.GetActivityIcon(null); } else { text += "空"; - textureRect.Texture = null; } } @@ -65,6 +60,8 @@ //显示文本 CellNode.L_MarkButton.Instance.Text = text; + //显示图标 + textureRect.Texture = ResourceManager.GetMarkIcon(data.MarkInfo); } public void OnClickHandler() diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorWaveCell.cs b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorWaveCell.cs index 2e5786c..f7f1866 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorWaveCell.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorMapMark/EditorWaveCell.cs @@ -84,6 +84,11 @@ MarkGrid.Click(MarkGrid.Count - 1); //执行排序操作 MarkGrid.Sort(); + //如果当前波数隐藏, 则隐藏标记 + if (!MarkVisible) + { + EventManager.EmitEvent(EventEnum.OnSetMarkVisible, new MarkInfoVisibleData(markInfo, false)); + } //派发数据修改事件 EventManager.EmitEvent(EventEnum.OnEditorDirty); } @@ -134,11 +139,13 @@ { CellNode.L_WaveContainer.L_WaveVisibleButton.Instance.Icon = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_ui_commonIcon_Visible_png); + CellNode.L_MarkContainer.Instance.Modulate = new Color(1, 1, 1); } else { CellNode.L_WaveContainer.L_WaveVisibleButton.Instance.Icon = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_ui_commonIcon_Hide_png); + CellNode.L_MarkContainer.Instance.Modulate = new Color(1, 1, 1, 0.3f); } } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorToolsPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorToolsPanel.cs index d0eee19..eb30575 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorToolsPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorToolsPanel.cs @@ -255,8 +255,8 @@ { if (_currMarkToolsMap.TryGetValue(markInfo, out var markTemplate)) { - //更新坐标 - markTemplate.Instance.Position = markInfo.Position.AsVector2(); + //刷新数据 + markTemplate.Instance.RefreshData(); } } } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorTools/MarkTool.cs b/DungeonShooting_Godot/src/game/ui/mapEditorTools/MarkTool.cs index 47b3843..bb6f72c 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorTools/MarkTool.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorTools/MarkTool.cs @@ -118,14 +118,18 @@ _startPos = GlobalPosition; MarkAreaTool.InitData(_toolNode.UiPanel.S_ToolRoot, this); //显示图标 - if (markInfo.MarkList.Count > 0) - { - Texture = ResourceManager.GetActivityIcon(markInfo.MarkList[0].Id); - } - else - { - Texture = ResourceManager.GetActivityIcon(null); - } + Texture = ResourceManager.GetMarkIcon(markInfo); + } + + /// + /// 刷新标记数据 + /// + public void RefreshData() + { + //更新坐标 + Position = MarkInfo.Position.AsVector2(); + //更新icon + Texture = ResourceManager.GetMarkIcon(MarkInfo); } private void OnMouseEntered()