Пример #1
0
        public Direction[] NewRoom(GameObject room)
        {
            GameObject newRoom = Instantiate(room, transform.position, Quaternion.identity) as GameObject;

            PickRoomType();
            PickDirections();

            while (!CheckDirections())
            {
                PickRoomType();
                PickDirections();
            }

            Room newRoomInfo = newRoom.GetComponent<Room>();
            newRoomInfo.SetData(directions); //this calls Room script

            roomData = new RoomData(true, roomType, directions);
            return directions; //returns to RoomGenerator
        }
Пример #2
0
 void Awake()
 {
     roomData = new RoomData(false);
     roomTargetsList = new List<GameObject>();
 }