private void ProcessRooms(RoomsType rooms)
    {
        if (rooms == null)
        {
            return;
        }
        foreach (RoomsTypeRoom room in rooms.Room)
        {
            GERoom newRoom = new GERoom(room.id, null, room.imgSrc, null, room.activeAtStart, room.isCheckpoint)
            {
                Properties = ProcessProperties(room.Properties),
                MenuItems  = ProcessMenuItems(room.MenuItems, room.id),
                Items      = ProcessItems(room.Items),
                Npcs       = ProcessNpcs(room.NPCs),
                Texts      = ProcessTexts(room.Texts),
                Neighbours = ProcessNeighbours(room.Neighbours)
            };

            OnReferenceProcessing += delegate(object o, EventArgs e)
            {
                newRoom.NameText = elementManager.GetTextElement(room.nameTextId);
                if (room.descTextId != null)
                {
                    newRoom.DescText = elementManager.GetTextElement(room.descTextId);
                }
                else
                {
                    logger.LogInfo("There was no descTextId given for the Room with id: " + room.id);
                }
            };

            elementManager.AddRoom(newRoom);
        }
    }
Exemplo n.º 2
0
 public PathObj(Vector2 offset, RoomsType roomsType)
 {
     RoomsType = roomsType;
     Offset    = offset;
 }