예제 #1
0
        protected override void createRooms()
        {
            Rooms = new AbstractRoomFactory[MaxRoomCount.X, MaxRoomCount.Y];

            for (int y = 0; y < MaxRoomCount.Y; y++)
            {
                for (int x = 0; x < MaxRoomCount.X; x++)
                {
                    Rooms[x, y] = new PlainRoomFactory(x, y, this);
                }
            }
        }
예제 #2
0
        protected virtual void createRooms()
        {
            Rooms = new AbstractRoomFactory[MaxRoomCount.X, MaxRoomCount.Y];

            for (int y = 0; y < MaxRoomCount.Y; y++)
            {
                for (int x = 0; x < MaxRoomCount.X; x++)
                {
                    int randomNum = Random.Range(0, 10);
                    if (randomNum < 9)
                    {
                        Rooms[x, y] = new PlainRoomFactory(x, y, this);
                    }
                    else
                    {
                        Rooms[x, y] = new DonutRoomFactory(x, y, this);
                    }
                }
            }
        }