本文整理汇总了C#中Room.GetWallTiles方法的典型用法代码示例。如果您正苦于以下问题:C# Room.GetWallTiles方法的具体用法?C# Room.GetWallTiles怎么用?C# Room.GetWallTiles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Room
的用法示例。
在下文中一共展示了Room.GetWallTiles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateRoom
private Room CreateRoom(int x1, int x2, int y1, int y2)
{
//Debug.Log(string.Format("Room x {0} -> {1} y {2} -> {3}", x1, x2, y1, y2));
var room = new Room(x1, x2, y1, y2);
foreach (var c in room.GetFloorTiles())
m_grid[c.X, c.Y] = TileType.Floor;
foreach (var c in room.GetWallTiles())
m_grid[c.X, c.Y] = TileType.Wall;
return room;
}
示例2: CreateCorridor
private void CreateCorridor(int x1, int x2, int y1, int y2)
{
//Debug.Log(string.Format("Corridor x {0} -> {1} y {2} -> {3}", x1, x2, y1, y2));
var room = new Room(x1, x2, y1, y2);
foreach (var c in room.GetFloorTiles())
m_grid[c.X, c.Y] = TileType.Floor;
foreach (var c in room.GetWallTiles())
{
if (m_grid[c.X, c.Y] != TileType.Empty)
continue;
m_grid[c.X, c.Y] = TileType.Wall;
}
}