本文整理汇总了C#中HaCreator.MapEditor.Board.RegenerateMinimap方法的典型用法代码示例。如果您正苦于以下问题:C# Board.RegenerateMinimap方法的具体用法?C# Board.RegenerateMinimap怎么用?C# Board.RegenerateMinimap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HaCreator.MapEditor.Board
的用法示例。
在下文中一共展示了Board.RegenerateMinimap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateMapSimulator
public static MapSimulator CreateMapSimulator(Board mapBoard)
{
if (mapBoard.MiniMap == null) mapBoard.RegenerateMinimap();
MapSimulator result = new MapSimulator(mapBoard);
List<WzObject> usedProps = new List<WzObject>();
WzDirectory MapFile = Program.WzManager["map"];
WzDirectory tileDir = (WzDirectory)MapFile["Tile"];
GraphicsDevice device = result.DxDevice;
foreach (LayeredItem tileObj in mapBoard.BoardItems.TileObjs)
result.mapObjects[tileObj.LayerNumber].Add(CreateMapItemFromProperty((WzImageProperty)tileObj.BaseInfo.ParentObject, tileObj.X, tileObj.Y, mapBoard.CenterPoint.X, mapBoard.CenterPoint.Y, result.DxDevice, ref usedProps, tileObj is IFlippable ? ((IFlippable)tileObj).Flip : false));
foreach (BackgroundInstance background in mapBoard.BoardItems.BackBackgrounds)
result.backgrounds.Add(CreateBackgroundFromProperty((WzImageProperty)background.BaseInfo.ParentObject, background.BaseX, background.BaseY, background.rx, background.ry, background.cx, background.cy, background.a, background.type, background.front, mapBoard.CenterPoint.X, mapBoard.CenterPoint.Y, result.DxDevice, ref usedProps, background.Flip));
foreach (BackgroundInstance background in mapBoard.BoardItems.FrontBackgrounds)
result.backgrounds.Add(CreateBackgroundFromProperty((WzImageProperty)background.BaseInfo.ParentObject, background.BaseX, background.BaseY, background.rx, background.ry, background.cx, background.cy, background.a, background.type, background.front, mapBoard.CenterPoint.X, mapBoard.CenterPoint.Y, result.DxDevice, ref usedProps, background.Flip));
foreach (WzObject obj in usedProps) obj.MSTag = null;
usedProps.Clear();
GC.Collect();
GC.WaitForPendingFinalizers();
return result;
}