本文整理汇总了C#中Door.setRoom方法的典型用法代码示例。如果您正苦于以下问题:C# Door.setRoom方法的具体用法?C# Door.setRoom怎么用?C# Door.setRoom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Door
的用法示例。
在下文中一共展示了Door.setRoom方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: makeRandomDoorInRoom
public void makeRandomDoorInRoom(Room r, int xc, int yc, int direction)
{
Debug.Log("Making door");
/*int dir = Random.Range(0, 3);
Debug.Log("dir = " + dir);
int height = r.yLength;
int width = r.xLength;
int x = r.startX;
int y = r.startY;
Debug.Log("Chords = " + x + "," + y + ". Item = " + getCell(x, y));
int posX = Random.Range((x - 1), (x - width + 1));
int posY = Random.Range((y - 1), (y - height + 1));*/
Door d = new Door(new Vector2(xc, yc));
d.setRoom(r);
doors.Add(d);
setCell(new Vector2(xc, yc), MAP_REF.DOOR);
/* switch (dir)
{
case 0://NORTH
d = new Door(new Vector2(x+1, y));
d.setRoom(r);
doors.Add(d);
setCell(x+1, y, MAP_REF.DOOR);
break;
case 1://EAST
d = new Door(new Vector2(x+width, y+1));
d.setRoom(r);
doors.Add(d);
setCell(x+width, y+1, MAP_REF.DOOR);
break;
case 2://SOUTH
Debug.Log(getCell(x, y + height));
d = new Door(new Vector2(x+1, y+height));
d.setRoom(r);
doors.Add(d);
setCell(x+1, y+height, MAP_REF.DOOR);
break;
case 3://WEST
d = new Door(new Vector2(x, y+1));
d.setRoom(r);
doors.Add(d);
setCell(x, y+1, MAP_REF.DOOR);
break;
}*/
}