Exemplo n.º 1
0
        private void CreateMarkers()
        {
            for (int i = 0; i < LocationDatabase.pointsOfInterestCount; i++)
            {
                PointOfInterestGroup pointOfInterestGroup = LocationDatabase.GetPointOfInterestGroup(i);

                for (int j = 0; j < pointOfInterestGroup.placeCollectionCount; j++)
                {
                    PlaceCollection placeCollection = pointOfInterestGroup.GetPlaceCollection(j);
                    if (placeCollection == null)
                    {
                        continue;
                    }

                    bool hasRooms = placeCollection.hasRooms;

                    Place place = placeCollection.GetPlace();
                    CreateMarker(place.thumbnail, place.displayedName, place.mapName, place.displayPosition, (hasRooms ? placeViewingBounds : ViewingBounds.Default), true, 1, 0);
                    // CreateMarker(place.thumbnail, place.displayedName, place.mapName, place.displayPosition, ViewingBounds.Default, 0);

                    if (!hasRooms)
                    {
                        continue;
                    }

                    int highestFloor = placeCollection.highestFloorLevel;

                    for (int k = 0; k < placeCollection.roomCount; k++)
                    {
                        Room room = placeCollection.GetRoom(k);
                        CreateMarker(null, room.displayedName, room.mapName, room.displayPosition, roomViewingBounds, true, highestFloor, room.floor);
                    }
                }
            }
        }