本文整理汇总了C#中Block.SetBlockType方法的典型用法代码示例。如果您正苦于以下问题:C# Block.SetBlockType方法的具体用法?C# Block.SetBlockType怎么用?C# Block.SetBlockType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Block
的用法示例。
在下文中一共展示了Block.SetBlockType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create
public IBlock Create(Transform parent, ISetting setting, BlockType blockType, Coord location)
{
if ((int)blockType >= 0 && (int)blockType < 7)
{
IBlock block = new Block(location);
block.SetBlockType(blockType);
if (parent == null)
{
DoAttachView(setting.Parent, block, setting, blockType, location);
}
else
{
DoAttachView(parent, block, setting, blockType, location);
}
return block;
}
else
{
Debug.Log("Not invalid blocktype is given!");
}
return null;
}
示例2: SetBlockOnTheRoad
public void SetBlockOnTheRoad(Block area)
{
Debug.Log(area.ToString() + "通路に設定");
NextToAreaList.Add(area);
area.NextToAreaList.Add(this);
area.SetBlockType(BlockType.Road);
area.ConnectRoomList.AddRange(ConnectRoomList);
area.PreRoom = this;
}