diff --git a/DungeonShooting_Godot/src/framework/map/serialize/DungeonRoomInfo.cs b/DungeonShooting_Godot/src/framework/map/serialize/DungeonRoomInfo.cs index c8923b4..ca45581 100644 --- a/DungeonShooting_Godot/src/framework/map/serialize/DungeonRoomInfo.cs +++ b/DungeonShooting_Godot/src/framework/map/serialize/DungeonRoomInfo.cs @@ -77,4 +77,13 @@ return _completionDoorArea; } + + /// + /// 清除门区域配置数据, 再次调用 GetCompletionDoorArea() 会重新计算 DoorAreaInfo 数据 + /// + public void ClearCompletionDoorArea() + { + _completionDoorArea.Clear(); + _completionDoorArea = null; + } } \ 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 6c8fb6a..b41c89d 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs @@ -957,6 +957,7 @@ roomInfo.DoorAreaInfos.Clear(); roomInfo.DoorAreaInfos.AddRange(_doorConfigs); + roomInfo.ClearCompletionDoorArea(); path += "/" + MapProjectManager.GetRoomInfoConfigName(roomInfo.RoomName); var jsonStr = JsonSerializer.Serialize(roomInfo);