本文整理汇总了C#中Sector.FinishRead方法的典型用法代码示例。如果您正苦于以下问题:C# Sector.FinishRead方法的具体用法?C# Sector.FinishRead怎么用?C# Sector.FinishRead使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sector
的用法示例。
在下文中一共展示了Sector.FinishRead方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateSector
/// <summary>
/// Initializes a new sector with some default values.
/// </summary>
/// <param name="Name">Name of new sector.</param>
/// <returns>The created <see cref="Sector"/> object.</returns>
public static Sector CreateSector(string Name)
{
Sector sector = new Sector();
sector.Name = Name;
Tilemap tilemap = new Tilemap();
tilemap.Resize(100, 35, 0);
tilemap.Layer = -100;
tilemap.Name = "Background";
sector.Add(tilemap, true);
tilemap = new Tilemap();
tilemap.Resize(100, 35, 0);
tilemap.Layer = 0;
tilemap.Solid = true;
tilemap.Name = "Interactive";
sector.Add(tilemap, true);
tilemap = new Tilemap();
tilemap.Resize(100, 35, 0);
tilemap.Layer = 100;
tilemap.Name = "Foreground";
sector.Add(tilemap, true);
SpawnPoint spawnpoint = new SpawnPoint();
spawnpoint.X = 96;
spawnpoint.Y = 96;
spawnpoint.Name = "main";
sector.Add(spawnpoint, true);
Camera camera = new Camera();
sector.Add(camera, true);
sector.FinishRead(); //let sector detect it's dimensions
return sector;
}