Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
 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 });
     }
 }
Esempio n. 3
0
 public void CreateConnector(float width, float height, RoomComponent targetRoom)
 {
     // do absolutely nothing
 }
Esempio n. 4
0
 public Wall(RoomComponent owner, float width, float height, float rotation)
 {
     GenerateObject(width, height, rotation);
 }
Esempio n. 5
0
 // Constructors
 public Wall(RoomComponent owner, float width, float height) : this(owner, width, height, 0)
 {
     _owner = owner;
 }