public void SetExit(Directions direction, RoomComponent exitRoom) { switch (direction) { case Directions.North: this.NorthExit = exitRoom; exitRoom.SouthExit = this; break; case Directions.South: this.SouthExit = exitRoom; exitRoom.NorthExit = this; break; case Directions.East: this.EastExit = exitRoom; exitRoom.WestExit = this; break; case Directions.West: this.WestExit = exitRoom; exitRoom.EastExit = this; break; } }
protected Wall[] CreateWall(RoomComponent exitRoom, float wallWidth, Vector3 wallAdjust, float rotation) { if (exitRoom != null) { return(CreateConnectingWall(exitRoom as HallwayComponent, wallAdjust)); } else { var wall = new Wall(this, wallWidth, Height, rotation); wall.Instance.transform.parent = this.transform; wall.Instance.transform.localPosition = wallAdjust; return(new Wall[] { wall }); } }
public void CreateConnector(float width, float height, RoomComponent targetRoom) { // do absolutely nothing }
public Wall(RoomComponent owner, float width, float height, float rotation) { GenerateObject(width, height, rotation); }
// Constructors public Wall(RoomComponent owner, float width, float height) : this(owner, width, height, 0) { _owner = owner; }