Exemple #1
0
 void Map_OnInitialized()
 {
     LocationProviderFactory.Instance.mapManager.OnInitialized -= Map_OnInitialized;
     _mapInitialized = true;
     _map            = LocationProviderFactory.Instance.mapManager;
 }
Exemple #2
0
        void DrawLayerVisualizerProperties(VectorSourceType sourceType, SerializedProperty layerProperty, SerializedProperty property)
        {
            var subLayerCoreOptions = layerProperty.FindPropertyRelative("coreOptions");
            //var layerName = layerProperty.FindPropertyRelative("coreOptions.layerName");
            //var roadLayerName = layerProperty.FindPropertyRelative("roadLayer");
            //var landuseLayerName = layerProperty.FindPropertyRelative("landuseLayer");


            var subLayerName    = subLayerCoreOptions.FindPropertyRelative("sublayerName").stringValue;
            var visualizerLayer = subLayerCoreOptions.FindPropertyRelative("layerName").stringValue;
            var subLayerType    = PresetSubLayerPropertiesFetcher.GetPresetTypeFromLayerName(visualizerLayer);

            //var maskValue = layerProperty.FindPropertyRelative("_maskValue");
            //var selectedTypes = layerProperty.FindPropertyRelative("selectedTypes");

            GUILayout.Space(-_lineHeight);
            layerProperty.FindPropertyRelative("presetFeatureType").intValue = (int)subLayerType;
            //EditorGUILayout.LabelField("Sub-type : " + "Highway", visualizerNameAndType);
            GUILayout.Space(_lineHeight);
            //*********************** LAYER NAME BEGINS ***********************************//
            VectorPrimitiveType primitiveTypeProp = (VectorPrimitiveType)subLayerCoreOptions.FindPropertyRelative("geometryType").enumValueIndex;

            var         serializedMapObject = property.serializedObject;
            AbstractMap mapObject           = (AbstractMap)serializedMapObject.targetObject;

            tileJsonData = mapObject.VectorData.LayerProperty.tileJsonData;

            var layerDisplayNames = tileJsonData.LayerDisplayNames;

            DrawLayerName(subLayerCoreOptions, layerDisplayNames);
            //*********************** LAYER NAME ENDS ***********************************//

            //*********************** TYPE DROPDOWN BEGINS ***********************************//
            //if (_streetsV7TileStats == null || subTypeValues == null)
            //{
            //	subTypeValues = GetSubTypeValues(layerProperty, visualizerLayer, sourceType);
            //}

            //if ((layerName.stringValue == roadLayerName.stringValue || layerName.stringValue == landuseLayerName.stringValue) && subTypeValues!=null)
            //{
            //	maskValue.intValue = EditorGUILayout.MaskField("Type",maskValue.intValue, subTypeValues);
            //	string selectedOptions = string.Empty;
            //	for (int i = 0; i < subTypeValues.Length; i++)
            //	{
            //		if ((maskValue.intValue & (1 << i)) == (1 << i))
            //		{
            //			if (string.IsNullOrEmpty(selectedOptions))
            //			{
            //				selectedOptions = subTypeValues[i];
            //				continue;
            //			}
            //			selectedOptions += "," + subTypeValues[i];
            //		}
            //	}
            //	selectedTypes.stringValue = selectedOptions;
            //}
            //*********************** TYPE DROPDOWN ENDS ***********************************//

            EditorGUI.indentLevel++;

            //*********************** FILTERS SECTION BEGINS ***********************************//
            var filterOptions = layerProperty.FindPropertyRelative("filterOptions");

            filterOptions.FindPropertyRelative("_selectedLayerName").stringValue = subLayerCoreOptions.FindPropertyRelative("layerName").stringValue;
            GUILayout.Space(-_lineHeight);
            EditorGUILayout.PropertyField(filterOptions, new GUIContent("Filters"));
            //*********************** FILTERS SECTION ENDS ***********************************//



            //*********************** MODELING SECTION BEGINS ***********************************//
            _modelingSectionDrawer.DrawUI(subLayerCoreOptions, layerProperty, primitiveTypeProp);
            //*********************** MODELING SECTION ENDS ***********************************//


            //*********************** TEXTURING SECTION BEGINS ***********************************//
            if (primitiveTypeProp != VectorPrimitiveType.Point && primitiveTypeProp != VectorPrimitiveType.Custom)
            {
                GUILayout.Space(-_lineHeight);
                EditorGUILayout.PropertyField(layerProperty.FindPropertyRelative("materialOptions"));
            }
            //*********************** TEXTURING SECTION ENDS ***********************************//


            //*********************** GAMEPLAY SECTION BEGINS ***********************************//
            _behaviorModifierSectionDrawer.DrawUI(layerProperty, primitiveTypeProp, sourceType);
            //*********************** GAMEPLAY SECTION ENDS ***********************************//

            EditorGUI.indentLevel--;
        }
        private void DrawPropertyDropDown(SerializedProperty originalProperty, SerializedProperty filterProperty)
        {
            var          selectedLayerName = originalProperty.FindPropertyRelative("_selectedLayerName").stringValue;
            AbstractMap  mapObject         = (AbstractMap)originalProperty.serializedObject.targetObject;
            TileJsonData tileJsonData      = mapObject.VectorData.GetTileJsonData();

            if (string.IsNullOrEmpty(selectedLayerName) || !tileJsonData.PropertyDisplayNames.ContainsKey(selectedLayerName))
            {
                DrawWarningMessage();
                return;
            }

            var parsedString         = "no property selected";
            var descriptionString    = "no description available";
            var propertyDisplayNames = tileJsonData.PropertyDisplayNames[selectedLayerName];

            _propertyNamesList = new List <string>(propertyDisplayNames);

            var propertyString = filterProperty.FindPropertyRelative("Key").stringValue;

            //check if the selection is valid
            if (_propertyNamesList.Contains(propertyString))
            {
                //if the layer contains the current layerstring, set it's index to match
                _propertyIndex = propertyDisplayNames.FindIndex(s => s.Equals(propertyString));

                //create guicontent for a valid layer
                _propertyNameContent = new GUIContent[_propertyNamesList.Count];
                for (int extIdx = 0; extIdx < _propertyNamesList.Count; extIdx++)
                {
                    var parsedPropertyString = _propertyNamesList[extIdx].Split(new string[] { tileJsonData.optionalPropertiesString }, System.StringSplitOptions.None)[0].Trim();
                    _propertyNameContent[extIdx] = new GUIContent
                    {
                        text    = _propertyNamesList[extIdx],
                        tooltip = tileJsonData.LayerPropertyDescriptionDictionary[selectedLayerName][parsedPropertyString]
                    };
                }

                //display popup
                EditorGUI.BeginChangeCheck();
                _propertyIndex = EditorGUILayout.Popup(_propertyIndex, _propertyNameContent, GUILayout.MaxWidth(150));
                if (EditorGUI.EndChangeCheck())
                {
                    EditorHelper.CheckForModifiedProperty(filterProperty);
                }

                //set new string values based on selection
                parsedString      = _propertyNamesList[_propertyIndex].Split(new string[] { tileJsonData.optionalPropertiesString }, System.StringSplitOptions.None)[0].Trim();
                descriptionString = tileJsonData.LayerPropertyDescriptionDictionary[selectedLayerName][parsedString];
            }
            else
            {
                //if the selected layer isn't in the source, add a placeholder entry
                _propertyIndex = 0;
                _propertyNamesList.Insert(0, propertyString);

                //create guicontent for an invalid layer
                _propertyNameContent = new GUIContent[_propertyNamesList.Count];

                //first property gets a unique tooltip
                _propertyNameContent[0] = new GUIContent
                {
                    text    = _propertyNamesList[0],
                    tooltip = "Unavialable in Selected Layer"
                };

                for (int extIdx = 1; extIdx < _propertyNamesList.Count; extIdx++)
                {
                    var parsedPropertyString = _propertyNamesList[extIdx].Split(new string[] { tileJsonData.optionalPropertiesString }, System.StringSplitOptions.None)[0].Trim();
                    _propertyNameContent[extIdx] = new GUIContent
                    {
                        text    = _propertyNamesList[extIdx],
                        tooltip = tileJsonData.LayerPropertyDescriptionDictionary[selectedLayerName][parsedPropertyString]
                    };
                }

                //display popup
                EditorGUI.BeginChangeCheck();
                _propertyIndex = EditorGUILayout.Popup(_propertyIndex, _propertyNameContent, GUILayout.MaxWidth(150));
                if (EditorGUI.EndChangeCheck())
                {
                    EditorHelper.CheckForModifiedProperty(filterProperty);
                }

                //set new string values based on the offset
                parsedString      = _propertyNamesList[_propertyIndex].Split(new string[] { tileJsonData.optionalPropertiesString }, System.StringSplitOptions.None)[0].Trim();
                descriptionString = "Unavailable in Selected Layer.";
            }
            EditorGUI.BeginChangeCheck();
            filterProperty.FindPropertyRelative("Key").stringValue = parsedString;
            if (EditorGUI.EndChangeCheck())
            {
                EditorHelper.CheckForModifiedProperty(filterProperty);
            }
            filterProperty.FindPropertyRelative("KeyDescription").stringValue = descriptionString;
        }
Exemple #4
0
 public ResponseHandler(Action <List <Vector3> > callback, AbstractMap map)
 {
     this.map      = map;
     this.callback = callback;
 }
    // Update is called once per frame
    void Update()
    {
        if (map == null)
        {
            try
            {
                map = GameObject.FindGameObjectWithTag("Map").GetComponent <AbstractMap>();
            }
            catch (System.Exception)
            {
            }
        }
        if (dataSource != null)
        {
            dataFrame = dataSource.DataFrame;
        }

        if (dataFrame != null)
        {
            tick = dataFrame.tick;
            if (tick != lastTick)
            {
                if (dataFrame.targets.Length > 0)
                {
                    foreach (gpsData target in dataFrame.targets)
                    {
                        if (target.Type != "Train")
                        {
                            GameObject radarTarget = GameObject.Find("DataManager/" + target.id);
                            if (radarTarget != null)
                            {
                                Vector3 pos = map.GeoToWorldPosition(new Mapbox.Utils.Vector2d(target.Latitude, target.Longitude));
                                //Debug.Log(map.QueryElevationInMetersAt(new Mapbox.Utils.Vector2d(target.Latitude, target.Longitude)));
                                if (target.Type == "Sat")
                                {
                                    pos.y += Mathf.Min((target.Elevation * map.WorldRelativeScale * 1000), 10000f * map.WorldRelativeScale);
                                }
                                else
                                {
                                    pos.y += radarTarget.transform.GetChild(0).GetComponent <Renderer>().bounds.size.y + (target.Elevation * map.WorldRelativeScale);
                                }
                                radarTarget.transform.position = pos;
                                radarTarget.transform.rotation = Quaternion.Euler(0, target.TrueTrack, 0);
                                radarTarget.GetComponent <targetHandler>().metadata.copy(target);
                                if (radarTarget.GetComponent <targetHandler>().lostContact)
                                {
                                    radarTarget.transform.GetChild(0).GetComponent <MeshRenderer>().material.color = radarTarget.GetComponent <targetHandler>().orgColor;

                                    radarTarget.GetComponent <targetHandler>().lostContact = false;
                                }
                                radarTarget.GetComponent <targetHandler>().timeSinceUpdate = tick;
                                if (target.Type == "Aircraft")
                                {
                                    //pos = radarTarget.transform.GetChild(0).Find("node_id33 12").GetComponent<Renderer>().bounds.center;
                                    pos = radarTarget.transform.GetChild(0).Find("node_id33 12").GetComponent <Renderer>().bounds.center;
                                }

                                radarTarget.GetComponent <LineRenderer>().SetPosition(0, new Vector3(pos.x, pos.y - radarTarget.transform.GetChild(0).GetComponent <Renderer>().bounds.size.y * 2, pos.z));
                                radarTarget.GetComponent <LineRenderer>().SetPosition(1, new Vector3(pos.x, Mathf.Max(-10, pos.y - (radarTarget.transform.GetChild(0).GetComponent <Renderer>().bounds.size.y + (target.Elevation * map.WorldRelativeScale))), pos.z));
                            }
                            else
                            {
                                if (insideMap(target.Latitude, target.Longitude) && target.Elevation > -10 && target.Type != "Train")
                                {
                                    Vector3 pos = map.GeoToWorldPosition(new Mapbox.Utils.Vector2d(target.Latitude, target.Longitude));
                                    if (target.Type == "Sat")
                                    {
                                        pos.y += Mathf.Min((target.Elevation * map.WorldRelativeScale * 1000), 10000f * map.WorldRelativeScale);
                                    }
                                    else
                                    {
                                        pos.y += (target.Elevation * map.WorldRelativeScale);
                                    }
                                    try
                                    {
                                        radarTarget = Instantiate(Resources.Load("HART/Prefabs/" + target.Type, typeof(GameObject)), pos, Quaternion.Euler(0, target.TrueTrack, 0), transform) as GameObject;
                                    }
                                    catch (System.Exception)
                                    {
                                        radarTarget = Instantiate(targetPrefab, pos, Quaternion.Euler(0, target.TrueTrack, 0), transform);
                                    }


                                    radarTarget.GetComponent <targetHandler>().metadata.copy(target);
                                    radarTarget.name  = target.id;
                                    radarTarget.tag   = "target";
                                    radarTarget.layer = 9;
                                    radarTarget.GetComponent <targetHandler>().timeSinceUpdate = tick;
                                    if (target.Type == "Aircraft")
                                    {
                                        //pos = radarTarget.transform.GetChild(0).Find("node_id33 12").GetComponent<Renderer>().bounds.center;
                                        pos = radarTarget.transform.GetChild(0).Find("node_id33 12").GetComponent <Renderer>().bounds.center;
                                    }
                                    if (radarTarget.GetComponent <LineRenderer>())
                                    {
                                        radarTarget.GetComponent <LineRenderer>().positionCount = 2;
                                        radarTarget.GetComponent <LineRenderer>().SetPosition(0, new Vector3(pos.x, pos.y - radarTarget.transform.GetChild(0).GetComponent <Renderer>().bounds.size.y * 2, pos.z));
                                        radarTarget.GetComponent <LineRenderer>().SetPosition(1, new Vector3(pos.x, Mathf.Max(-10, pos.y - (radarTarget.transform.GetChild(0).GetComponent <Renderer>().bounds.size.y + (target.Elevation * map.WorldRelativeScale))), pos.z));

                                        radarTarget.GetComponent <LineRenderer>().startWidth = .04f;
                                        radarTarget.GetComponent <LineRenderer>().endWidth   = 0;
                                    }
                                    try
                                    {
                                        Transform dataDisp = radarTarget.transform.Find("DataDisplay");
                                        if (dataDisp.GetComponent <TextMesh>() != null)
                                        {
                                            gpsData tmp = radarTarget.GetComponent <targetHandler>().metadata;
                                            dataDisp.GetComponent <TextMesh>().text = tmp.getTextData();
                                            dataDisp.transform.position            += new Vector3(0, dataDisp.GetComponent <TextMesh>().GetComponent <Renderer>().bounds.size.y);
                                            dataDisp.LookAt(Camera.main.transform);
                                            dataDisp.Rotate(new Vector3(0, 180, 0));
                                        }
                                    }
                                    catch (Exception)
                                    {
                                    }
                                }
                            }
                        }
                        else if (target.Type == "Train")
                        {
                            foreach (station sta in target.stops)
                            {
                                GameObject radarTarget = GameObject.Find("DataManager/" + sta.stationId);
                                if (radarTarget != null)
                                {
                                    radarTarget.GetComponent <targetHandler>().metadata.stops[0]  = sta;
                                    radarTarget.GetComponent <targetHandler>().metadata.Latitude  = sta.Latitude;
                                    radarTarget.GetComponent <targetHandler>().metadata.Longitude = sta.Longitude;
                                    radarTarget.GetComponent <targetHandler>().timeSinceUpdate    = tick;
                                }
                                else
                                {
                                    if (insideMap(sta.Latitude, sta.Longitude))
                                    {
                                        Vector3 pos = map.GeoToWorldPosition(new Mapbox.Utils.Vector2d(sta.Latitude, sta.Longitude));
                                        try
                                        {
                                            radarTarget = Instantiate(Resources.Load("HART/Prefabs/" + target.Type, typeof(GameObject)), pos, Quaternion.Euler(0, target.TrueTrack, 0), transform) as GameObject;
                                        }
                                        catch (System.Exception)
                                        {
                                            Debug.LogError("Failed to create train station, something is really broken");
                                        }

                                        radarTarget.name  = sta.stationId;
                                        radarTarget.tag   = "target";
                                        radarTarget.layer = 9;
                                        radarTarget.GetComponent <targetHandler>().showText = false;
                                        radarTarget.GetComponent <targetHandler>().metadata.copy(target);
                                        radarTarget.GetComponent <targetHandler>().metadata.stops = new station[1] {
                                            sta
                                        };
                                        radarTarget.GetComponent <targetHandler>().metadata.id        = sta.stationId + ":" + sta.stationName;
                                        radarTarget.GetComponent <targetHandler>().metadata.Latitude  = sta.Latitude;
                                        radarTarget.GetComponent <targetHandler>().metadata.Longitude = sta.Longitude;
                                        radarTarget.GetComponent <targetHandler>().timeSinceUpdate    = tick;
                                    }
                                }
                            }
                        }
                    }
                }

                foreach (Transform target in transform)
                {
                    if (target.GetComponent <targetHandler>().timeSinceUpdate != tick && tick - target.GetComponent <targetHandler>().timeSinceUpdate >= dropTime)
                    {
                        colorKey[0].color = target.GetComponent <targetHandler>().orgColor;
                        g.SetKeys(colorKey, alphaKey);
                        //Debug.Log("Lost contact with: " + target.name + " for " + (tick - target.GetComponent<targetHandler>().timeSinceUpdate) + " ticks");
                        target.GetComponent <targetHandler>().lostContact = true;
                        target.transform.GetChild(0).GetComponent <MeshRenderer>().material.color = g.Evaluate((tick - target.GetComponent <targetHandler>().timeSinceUpdate) / dropTime);
                        target.transform.GetComponent <targetHandler>().diff = ((float)(tick - target.GetComponent <targetHandler>().timeSinceUpdate)) / dropTime;
                    }
                    if (tick - target.GetComponent <targetHandler>().timeSinceUpdate > dropTime)
                    {
                        //Debug.Log(target.name + " is gone");
                        target.GetComponent <targetHandler>().removeDelegate();
                        Destroy(target.gameObject);
                    }
                }
                lastTick = tick;
            }
        }
    }
Exemple #6
0
 private void Awake()
 {
     abstractMap = GetComponent <AbstractMap>();
     abstractMap.OnTileFinished += turnOffMeshRenderer; //Mapbox API 지도불러오기가 끝나면 turnOffMeshRenderer가 호출됨
 }
 private void Start()
 {
     Instance = this;
     Map      = GetComponent <AbstractMap> ();
 }
Exemple #8
0
        public void SetUpPlacement(AbstractMap map)
        {
            var referenceTileRect = Conversions.TileBounds(TileCover.CoordinateToTileId(map.CenterLatitudeLongitude, map.AbsoluteZoom));

            map.SetCenterMercator(referenceTileRect.Center);
        }
Exemple #9
0
        private void ReplaceMap(AbstractMap map)
        {
            if (this.Map != null)
            {
                window.RemoveRegion(this.Map);
                this.Map.Dispose();
            }

            this.Map = map;
            this.UndoRedo = new UndoStack.UndoStack();

            if (this.Map != null)
            {
                this.Map.Location = new Point(0, 0);
                this.Map.Size = window.Size;
                window.AddRegion(this.Map);
                this.Map.ViewFrom(this.Map.View, true);
            }
            window.InvalidateTiles();
        }
Exemple #10
0
 public Door()
 {
     InMap = new AbstractMap();
 }
Exemple #11
0
 /// <summary>
 /// Creates a new change batch targeting the specified map.
 /// </summary>
 /// <param name="map">The map that we're changing squares on.</param>
 public SquareChange(AbstractMap map)
 {
     this.map = map;
     this.OnUndo += new EventHandler<EventArgs>(PenChange_OnUndo);
     this.OnRedo += new EventHandler<EventArgs>(PenChange_OnRedo);
 }
Exemple #12
0
 public static void BuildCity(AbstractMap map)
 {
     map.Initialize(new Mapbox.Utils.Vector2d(Constants.OriginCoordinates[0], Constants.OriginCoordinates[1]), Constants.mapboxZoom);
 }
Exemple #13
0
 public PlayerEntity(AbstractMap parent) : base(parent)
 {
 }
        // Start is called before the first frame update
        void Start()
        {
            controlDetail.SetActive(false);
            _controlStatusImage       = controlStatus.GetComponent <Image>();
            _controlStatusDetailTexts = controlDetail.GetComponentsInChildren <Text>();
            controlStatus.GetComponent <LongPressEventTrigger>().onLongPress.AddListener(
                () =>
            {
                print("长按");
                controlDetail.SetActive(!controlDetail.activeSelf);
            }

                );
            _taskList    = TaskLab.Get().GetTaskList();
            _abstractMap = map.GetComponent <AbstractMap>();
            bag.GetComponent <BagController>().SetOnMyItemClick((GameObject currentAddGameObject, List <ArModelInfo> putArObjects) =>
            {
                _putArObjects = putArObjects;
                print(_putArObjects);
                // _selectedArObject = currentAddGameObject;
                bag.SetActive(false);
                _hasShowItems = false;
            });

            setModelButton.onClick.AddListener(() =>
            {
                if (_selectedArObject == null)
                {
                    return;
                }
                var position = _selectedArObject.transform.position;
                var task     = new Task
                {
                    TaskDesc          = _selectedArObject.name + " 2 3 4",
                    TaskLocation      = _abstractMap.WorldToGeoPosition(position),
                    TaskModelRotation = _selectedArObject.transform.rotation,
                    TaskModelName     = _selectedArObject.transform.name.Split('(')[0]
                };
                _taskList.Add(task);
                GameObject.Find("Text").GetComponent <Text>().text += "\nTaskList.Count:" + _taskList.Count + "\nPutedGameObject position:" + position + "\n" + "PutedGameObject Latlng:" + _abstractMap.WorldToGeoPosition(position);                print("PutedGameObject position:" + position);
                print("PutedGameObject Latlng:" + _abstractMap.WorldToGeoPosition(position));
            });

            showItemsButton.onClick.AddListener(() =>
            {
                if (_hasShowItems)
                {
                    bag.SetActive(false);
                }
                else
                {
                    bag.SetActive(true);
                }
                _hasShowItems = !_hasShowItems;
            });

            // 找到当前选择的模型,删除它的所有信息
            deleteModelButton.onClick.AddListener(() =>
            {
                ArModelInfo modelInfo = _putArObjects.Find((info) => info.ArGameObject.name == _selectedArObject.name);

                if (modelInfo == null)
                {
                    return;
                }
                print(modelInfo.ArGameObject.name);
                Destroy(modelInfo.ArGameObject);
                Destroy(modelInfo.Anchor);
                _putArObjects.Remove(modelInfo);
            });
        }
    private void Start()
    {
        _camera = Camera.main;
        if (AbstractMap == null)
        {
            AbstractMap = FindObjectOfType <AbstractMap>();
        }

        DirectionsFactory.ArrangingWaypoints += (positions) =>
        {
            var midLength = 0f;
            for (int i = 1; i < positions.Length; i++)
            {
                _pos1LatLng = AbstractMap.WorldToGeoPosition(positions[i]);
                _pos2LatLng = AbstractMap.WorldToGeoPosition(positions[i - 1]);
                midLength  += (float)Conversions.GeoDistance(_pos1LatLng.y, _pos1LatLng.x, _pos2LatLng.y, _pos2LatLng.x) * 1000;
            }

            midLength /= 2;

            var midPoint = positions[0];
            for (int i = 1; i < positions.Length; i++)
            {
                _pos1LatLng   = AbstractMap.WorldToGeoPosition(positions[i]);
                _pos2LatLng   = AbstractMap.WorldToGeoPosition(positions[i - 1]);
                _lineDistance = (float)Conversions.GeoDistance(_pos1LatLng.y, _pos1LatLng.x, _pos2LatLng.y, _pos2LatLng.x) * 1000;
                if (midLength > _lineDistance)
                {
                    midLength -= _lineDistance;
                }
                else
                {
                    midPoint = Vector3.Lerp(positions[i - 1], positions[i], (float)midLength / _lineDistance);
                    break;
                }
            }

            if (DistanceLabelWrapper != null)
            {
                DistanceLabelWrapper.transform.position = _camera.WorldToScreenPoint(midPoint);
                DistanceText.text = (midLength * 2).ToString("F1") + "m";
            }
        };

        DirectionsFactory.ArrangingWaypointsStarted += () =>
        {
            if (DistanceLabelWrapper != null)
            {
                DistanceLabelWrapper.SetActive(true);
            }
        };

        DirectionsFactory.ArrangingWaypointsFinished += () =>
        {
            if (DistanceLabelWrapper != null)
            {
                DistanceLabelWrapper.SetActive(false);
            }
        };

        DirectionsFactory.RouteDrawn += (midPoint, totalLength) =>
        {
            if (DistanceLabelWrapper != null)
            {
                DistanceLabelWrapper.SetActive(true);
                DistanceLabelWrapper.transform.position = _camera.WorldToScreenPoint(midPoint);
                DistanceText.text = totalLength.ToString("F1") + "m";
            }
        };

        DirectionsFactory.QuerySent += () =>
        {
            if (DistanceLabelWrapper != null)
            {
                DistanceLabelWrapper.SetActive(true);
                DistanceText.text = "Loading";
            }
        };
    }
 // Start is called before the first frame update
 void Start()
 {
     mapOptions = citySimMap.GetComponent <AbstractMap>();
     citySimMap.transform.position = new Vector3(0, 0, 0);
 }
Exemple #17
0
 public void CreateMap()
 {
     mapInstance = Instantiate(Prefabs) as AbstractMap;
 }
 void Awake()
 {
     _map = FindObjectOfType <AbstractMap>();
     _map.OnInitialized += _map_OnInitialized;
 }
Exemple #19
0
 void Awake()
 {
     m_AbstractMap = GetComponent <AbstractMap>();
 }
 // Use this for initialization
 void Start()
 {
     enemies = new List <GameObject>();
     LocationProviderFactory.Instance.mapManager.OnInitialized += () => _isLocationProviderInitialized = true;
     map = LocationProviderFactory.Instance.mapManager;
 }
Exemple #21
0
        private void Query(Action <List <Vector3> > vecs, Transform start, Transform end, AbstractMap map, ResponseHandler handler)
        {
            Vector2d[] wp = new Vector2d[2];
            wp[0] = start.GetGeoPosition(map.CenterMercator, map.WorldRelativeScale);
            wp[1] = end.GetGeoPosition(map.CenterMercator, map.WorldRelativeScale);
            DirectionResource _directionResource = new DirectionResource(wp, RoutingProfile.Walking);

            _directionResource.Steps = true;

            _directions.Query(_directionResource, handler.HandleDirectionsResponse);
        }
Exemple #22
0
 public Map()
 {
     Data = new AbstractMap();
 }
Exemple #23
0
        public void Query(Action <List <Vector3> > vecs, Transform start, Transform end, AbstractMap map)
        {
            if (callback == null)
            {
                callback = vecs;
            }

            _map = map;

            var wp = new Vector2d[2];

            wp[0] = start.GetGeoPosition(_map.CenterMercator, _map.WorldRelativeScale);
            wp[1] = end.GetGeoPosition(_map.CenterMercator, _map.WorldRelativeScale);
            var _directionResource = new DirectionResource(wp, RoutingProfile.Walking);

            _directionResource.Steps = true;
            _directions.Query(_directionResource, HandleDirectionsResponse);
        }
        public void SetUpScaling(AbstractMap map)
        {
            var referenceTileRect = Conversions.TileBounds(TileCover.CoordinateToTileId(map.CenterLatitudeLongitude, map.AbsoluteZoom));

            map.SetWorldRelativeScale((float)(map.Options.scalingOptions.unityTileSize / referenceTileRect.Size.x));
        }
Exemple #25
0
 /// <summary>
 /// Creates a new change batch targeting the specified map.
 /// </summary>
 /// <param name="map">The map that we're changing squares on.</param>
 public SquareChange(AbstractMap map)
 {
     this.map     = map;
     this.OnUndo += new EventHandler <EventArgs>(PenChange_OnUndo);
     this.OnRedo += new EventHandler <EventArgs>(PenChange_OnRedo);
 }
Exemple #26
0
        public void DrawUI(SerializedProperty property)
        {
            objectId = property.serializedObject.targetObject.GetInstanceID().ToString();
            var         serializedMapObject = property.serializedObject;
            AbstractMap mapObject           = (AbstractMap)serializedMapObject.targetObject;

            tileJSONData = mapObject.VectorData.LayerProperty.tileJsonData;

            var sourceTypeProperty = property.FindPropertyRelative("_sourceType");
            var sourceTypeValue    = (VectorSourceType)sourceTypeProperty.enumValueIndex;

            var displayNames = sourceTypeProperty.enumDisplayNames;
            int count        = sourceTypeProperty.enumDisplayNames.Length;

            if (!_isGUIContentSet)
            {
                _sourceTypeContent = new GUIContent[count];
                for (int extIdx = 0; extIdx < count; extIdx++)
                {
                    _sourceTypeContent[extIdx] = new GUIContent
                    {
                        text    = displayNames[extIdx],
                        tooltip = ((VectorSourceType)extIdx).Description(),
                    };
                }
                _isGUIContentSet = true;
            }

            sourceTypeValue = (VectorSourceType)sourceTypeProperty.enumValueIndex;

            var sourceOptionsProperty = property.FindPropertyRelative("sourceOptions");
            var layerSourceProperty   = sourceOptionsProperty.FindPropertyRelative("layerSource");
            var layerSourceId         = layerSourceProperty.FindPropertyRelative("Id");
            var isActiveProperty      = sourceOptionsProperty.FindPropertyRelative("isActive");

            switch (sourceTypeValue)
            {
            case VectorSourceType.MapboxStreets:
            case VectorSourceType.MapboxStreetsWithBuildingIds:
                var sourcePropertyValue = MapboxDefaultVector.GetParameters(sourceTypeValue);
                layerSourceId.stringValue = sourcePropertyValue.Id;
                GUI.enabled = false;
                if (_isInitialized)
                {
                    LoadEditorTileJSON(property, sourceTypeValue, layerSourceId.stringValue);
                }
                else
                {
                    _isInitialized = true;
                }
                if (tileJSONData.PropertyDisplayNames.Count == 0 && tileJSONData.tileJSONLoaded)
                {
                    EditorGUILayout.HelpBox("Invalid Map Id / There might be a problem with the internet connection.", MessageType.Error);
                }
                GUI.enabled = true;
                isActiveProperty.boolValue = true;
                break;

            case VectorSourceType.Custom:
                if (_isInitialized)
                {
                    string test = layerSourceId.stringValue;
                    LoadEditorTileJSON(property, sourceTypeValue, layerSourceId.stringValue);
                }
                else
                {
                    _isInitialized = true;
                }
                if (tileJSONData.PropertyDisplayNames.Count == 0 && tileJSONData.tileJSONLoaded)
                {
                    EditorGUILayout.HelpBox("Invalid Map Id / There might be a problem with the internet connection.", MessageType.Error);
                }
                isActiveProperty.boolValue = true;
                break;

            case VectorSourceType.None:
                isActiveProperty.boolValue = false;
                break;

            default:
                isActiveProperty.boolValue = false;
                break;
            }

            if (sourceTypeValue != VectorSourceType.None)
            {
                EditorGUILayout.LabelField(new GUIContent
                {
                    text    = "Vector Layer Visualizers",
                    tooltip = "Visualizers for vector features contained in a layer. "
                });

                var subLayerArray = property.FindPropertyRelative("vectorSubLayers");

                var layersRect = EditorGUILayout.GetControlRect(GUILayout.MinHeight(Mathf.Max(subLayerArray.arraySize + 1, 1) * _lineHeight),
                                                                GUILayout.MaxHeight((subLayerArray.arraySize + 1) * _lineHeight));
                layerTreeView.Layers = subLayerArray;
                layerTreeView.Reload();
                layerTreeView.OnGUI(layersRect);

                selectedLayers = layerTreeView.GetSelection();

                //if there are selected elements, set the selection index at the first element.
                //if not, use the Selection index to persist the selection at the right index.
                if (selectedLayers.Count > 0)
                {
                    //ensure that selectedLayers[0] isn't out of bounds
                    if (selectedLayers[0] - layerTreeView.uniqueId > subLayerArray.arraySize - 1)
                    {
                        selectedLayers[0] = subLayerArray.arraySize - 1 + layerTreeView.uniqueId;
                    }

                    SelectionIndex = selectedLayers[0];
                }
                else
                {
                    if (SelectionIndex > 0 && (SelectionIndex - layerTreeView.uniqueId <= subLayerArray.arraySize - 1))
                    {
                        selectedLayers = new int[1] {
                            SelectionIndex
                        };
                        layerTreeView.SetSelection(selectedLayers);
                    }
                }

                GUILayout.Space(EditorGUIUtility.singleLineHeight);

                EditorGUILayout.BeginHorizontal();

                if (GUILayout.Button(new GUIContent("Add Visualizer"), (GUIStyle)"minibuttonleft"))
                {
                    subLayerArray.arraySize++;

                    var subLayer     = subLayerArray.GetArrayElementAtIndex(subLayerArray.arraySize - 1);
                    var subLayerName = subLayer.FindPropertyRelative("coreOptions.sublayerName");

                    subLayerName.stringValue = "Untitled";

                    // Set defaults here because SerializedProperty copies the previous element.
                    var subLayerCoreOptions = subLayer.FindPropertyRelative("coreOptions");
                    subLayerCoreOptions.FindPropertyRelative("isActive").boolValue          = true;
                    subLayerCoreOptions.FindPropertyRelative("layerName").stringValue       = "building";
                    subLayerCoreOptions.FindPropertyRelative("geometryType").enumValueIndex = (int)VectorPrimitiveType.Polygon;
                    subLayerCoreOptions.FindPropertyRelative("snapToTerrain").boolValue     = true;
                    subLayerCoreOptions.FindPropertyRelative("groupFeatures").boolValue     = false;
                    subLayerCoreOptions.FindPropertyRelative("lineWidth").floatValue        = 1.0f;

                    var subLayerExtrusionOptions = subLayer.FindPropertyRelative("extrusionOptions");
                    subLayerExtrusionOptions.FindPropertyRelative("extrusionType").enumValueIndex         = (int)ExtrusionType.None;
                    subLayerExtrusionOptions.FindPropertyRelative("extrusionGeometryType").enumValueIndex =
                        (int)ExtrusionGeometryType.RoofAndSide;
                    subLayerExtrusionOptions.FindPropertyRelative("propertyName").stringValue        = "height";
                    subLayerExtrusionOptions.FindPropertyRelative("extrusionScaleFactor").floatValue = 1f;

                    var subLayerFilterOptions = subLayer.FindPropertyRelative("filterOptions");
                    subLayerFilterOptions.FindPropertyRelative("filters").ClearArray();
                    subLayerFilterOptions.FindPropertyRelative("combinerType").enumValueIndex =
                        (int)LayerFilterCombinerOperationType.Any;

                    var subLayerGeometryMaterialOptions = subLayer.FindPropertyRelative("materialOptions");
                    subLayerGeometryMaterialOptions.FindPropertyRelative("style").enumValueIndex = (int)StyleTypes.Realistic;

                    GeometryMaterialOptions geometryMaterialOptionsReference = MapboxDefaultStyles.GetDefaultAssets();

                    var mats = subLayerGeometryMaterialOptions.FindPropertyRelative("materials");
                    mats.arraySize = 2;

                    var topMatArray  = mats.GetArrayElementAtIndex(0).FindPropertyRelative("Materials");
                    var sideMatArray = mats.GetArrayElementAtIndex(1).FindPropertyRelative("Materials");

                    if (topMatArray.arraySize == 0)
                    {
                        topMatArray.arraySize = 1;
                    }
                    if (sideMatArray.arraySize == 0)
                    {
                        sideMatArray.arraySize = 1;
                    }

                    var topMat  = topMatArray.GetArrayElementAtIndex(0);
                    var sideMat = sideMatArray.GetArrayElementAtIndex(0);

                    var atlas   = subLayerGeometryMaterialOptions.FindPropertyRelative("atlasInfo");
                    var palette = subLayerGeometryMaterialOptions.FindPropertyRelative("colorPalette");

                    topMat.objectReferenceValue  = geometryMaterialOptionsReference.materials[0].Materials[0];
                    sideMat.objectReferenceValue = geometryMaterialOptionsReference.materials[1].Materials[0];
                    atlas.objectReferenceValue   = geometryMaterialOptionsReference.atlasInfo;
                    palette.objectReferenceValue = geometryMaterialOptionsReference.colorPalette;

                    subLayer.FindPropertyRelative("buildingsWithUniqueIds").boolValue     = false;
                    subLayer.FindPropertyRelative("moveFeaturePositionTo").enumValueIndex = (int)PositionTargetType.TileCenter;
                    subLayer.FindPropertyRelative("MeshModifiers").ClearArray();
                    subLayer.FindPropertyRelative("GoModifiers").ClearArray();

                    var subLayerColliderOptions = subLayer.FindPropertyRelative("colliderOptions");
                    subLayerColliderOptions.FindPropertyRelative("colliderType").enumValueIndex = (int)ColliderType.None;

                    selectedLayers = new int[1] {
                        subLayerArray.arraySize - 1 + layerTreeView.uniqueId
                    };
                    layerTreeView.SetSelection(selectedLayers);
                }

                if (GUILayout.Button(new GUIContent("Remove Selected"), (GUIStyle)"minibuttonright"))
                {
                    foreach (var index in selectedLayers.OrderByDescending(i => i))
                    {
                        subLayerArray.DeleteArrayElementAtIndex(index - layerTreeView.uniqueId);
                    }

                    selectedLayers = new int[0];
                    layerTreeView.SetSelection(selectedLayers);
                }

                EditorGUILayout.EndHorizontal();

                GUILayout.Space(EditorGUIUtility.singleLineHeight);

                if (selectedLayers.Count == 1 && subLayerArray.arraySize != 0)
                {
                    //ensure that selectedLayers[0] isn't out of bounds
                    if (selectedLayers[0] - layerTreeView.uniqueId > subLayerArray.arraySize - 1)
                    {
                        selectedLayers[0] = subLayerArray.arraySize - 1 + layerTreeView.uniqueId;
                    }

                    SelectionIndex = selectedLayers[0];

                    var layerProperty = subLayerArray.GetArrayElementAtIndex(SelectionIndex - layerTreeView.uniqueId);

                    layerProperty.isExpanded = true;
                    var  subLayerCoreOptions = layerProperty.FindPropertyRelative("coreOptions");
                    bool isLayerActive       = subLayerCoreOptions.FindPropertyRelative("isActive").boolValue;
                    if (!isLayerActive)
                    {
                        GUI.enabled = false;
                    }

                    DrawLayerVisualizerProperties(sourceTypeValue, layerProperty, property);
                    if (!isLayerActive)
                    {
                        GUI.enabled = true;
                    }
                }
                else
                {
                    GUILayout.Label("Select a visualizer to see properties");
                }
            }
        }
Exemple #27
0
        public void DrawUI(SerializedProperty property)
        {
            VectorLayerProperties vectorLayerProperties = (VectorLayerProperties)EditorHelper.GetTargetObjectOfProperty(property);

            objectId = property.serializedObject.targetObject.GetInstanceID().ToString();
            var         serializedMapObject = property.serializedObject;
            AbstractMap mapObject           = (AbstractMap)serializedMapObject.targetObject;

            tileJSONData = mapObject.VectorData.LayerProperty.tileJsonData;

            var sourceTypeProperty = property.FindPropertyRelative("_sourceType");
            var sourceTypeValue    = (VectorSourceType)sourceTypeProperty.enumValueIndex;

            var displayNames = sourceTypeProperty.enumDisplayNames;
            int count        = sourceTypeProperty.enumDisplayNames.Length;

            if (!_isGUIContentSet)
            {
                _sourceTypeContent = new GUIContent[count];
                for (int extIdx = 0; extIdx < count; extIdx++)
                {
                    _sourceTypeContent[extIdx] = new GUIContent
                    {
                        text    = displayNames[extIdx],
                        tooltip = ((VectorSourceType)extIdx).Description(),
                    };
                }
                _isGUIContentSet = true;
            }

            sourceTypeValue = (VectorSourceType)sourceTypeProperty.enumValueIndex;

            var sourceOptionsProperty = property.FindPropertyRelative("sourceOptions");
            var layerSourceProperty   = sourceOptionsProperty.FindPropertyRelative("layerSource");
            var layerSourceId         = layerSourceProperty.FindPropertyRelative("Id");
            var isActiveProperty      = sourceOptionsProperty.FindPropertyRelative("isActive");

            switch (sourceTypeValue)
            {
            case VectorSourceType.MapboxStreets:
            case VectorSourceType.MapboxStreetsWithBuildingIds:
                var sourcePropertyValue = MapboxDefaultVector.GetParameters(sourceTypeValue);
                layerSourceId.stringValue = sourcePropertyValue.Id;
                GUI.enabled = false;
                if (_isInitialized)
                {
                    LoadEditorTileJSON(property, sourceTypeValue, layerSourceId.stringValue);
                }
                else
                {
                    _isInitialized = true;
                }
                if (tileJSONData.PropertyDisplayNames.Count == 0 && tileJSONData.tileJSONLoaded)
                {
                    EditorGUILayout.HelpBox("Invalid Map Id / There might be a problem with the internet connection.", MessageType.Error);
                }
                GUI.enabled = true;
                isActiveProperty.boolValue = true;
                break;

            case VectorSourceType.Custom:
                if (_isInitialized)
                {
                    string test = layerSourceId.stringValue;
                    LoadEditorTileJSON(property, sourceTypeValue, layerSourceId.stringValue);
                }
                else
                {
                    _isInitialized = true;
                }
                if (tileJSONData.PropertyDisplayNames.Count == 0 && tileJSONData.tileJSONLoaded)
                {
                    EditorGUILayout.HelpBox("Invalid Map Id / There might be a problem with the internet connection.", MessageType.Error);
                }
                isActiveProperty.boolValue = true;
                break;

            case VectorSourceType.None:
                isActiveProperty.boolValue = false;
                break;

            default:
                isActiveProperty.boolValue = false;
                break;
            }

            if (sourceTypeValue != VectorSourceType.None)
            {
                EditorGUILayout.LabelField(new GUIContent
                {
                    text    = "Map Features",
                    tooltip = "Visualizers for vector features contained in a layer. "
                });

                var subLayerArray = property.FindPropertyRelative("vectorSubLayers");

                var layersRect = EditorGUILayout.GetControlRect(GUILayout.MinHeight(Mathf.Max(subLayerArray.arraySize + 1, 1) * _lineHeight + MultiColumnHeader.DefaultGUI.defaultHeight),
                                                                GUILayout.MaxHeight((subLayerArray.arraySize + 1) * _lineHeight + MultiColumnHeader.DefaultGUI.defaultHeight));

                if (!m_Initialized)
                {
                    bool firstInit   = m_MultiColumnHeaderState == null;
                    var  headerState = FeatureSubLayerTreeView.CreateDefaultMultiColumnHeaderState();
                    if (MultiColumnHeaderState.CanOverwriteSerializedFields(m_MultiColumnHeaderState, headerState))
                    {
                        MultiColumnHeaderState.OverwriteSerializedFields(m_MultiColumnHeaderState, headerState);
                    }
                    m_MultiColumnHeaderState = headerState;

                    var multiColumnHeader = new FeatureSectionMultiColumnHeader(headerState);

                    if (firstInit)
                    {
                        multiColumnHeader.ResizeToFit();
                    }

                    treeModel = new TreeModel <FeatureTreeElement>(GetData(subLayerArray));
                    if (m_TreeViewState == null)
                    {
                        m_TreeViewState = new TreeViewState();
                    }

                    if (layerTreeView == null)
                    {
                        layerTreeView = new FeatureSubLayerTreeView(m_TreeViewState, multiColumnHeader, treeModel);
                    }
                    layerTreeView.multiColumnHeader = multiColumnHeader;
                    m_Initialized = true;
                }
                layerTreeView.Layers = subLayerArray;
                layerTreeView.Reload();
                layerTreeView.OnGUI(layersRect);

                selectedLayers = layerTreeView.GetSelection();

                //if there are selected elements, set the selection index at the first element.
                //if not, use the Selection index to persist the selection at the right index.
                if (selectedLayers.Count > 0)
                {
                    //ensure that selectedLayers[0] isn't out of bounds
                    if (selectedLayers[0] - FeatureSubLayerTreeView.uniqueId > subLayerArray.arraySize - 1)
                    {
                        selectedLayers[0] = subLayerArray.arraySize - 1 + FeatureSubLayerTreeView.uniqueId;
                    }

                    SelectionIndex = selectedLayers[0];
                }
                else
                {
                    if (SelectionIndex > 0 && (SelectionIndex - FeatureSubLayerTreeView.uniqueId <= subLayerArray.arraySize - 1))
                    {
                        selectedLayers = new int[1] {
                            SelectionIndex
                        };
                        layerTreeView.SetSelection(selectedLayers);
                    }
                }

                GUILayout.Space(EditorGUIUtility.singleLineHeight);

                EditorGUILayout.BeginHorizontal();
                //var presetTypes = property.FindPropertyRelative("presetFeatureTypes");
                GenericMenu menu = new GenericMenu();
                foreach (var name in Enum.GetNames(typeof(PresetFeatureType)))
                {
                    menu.AddItem(new GUIContent()
                    {
                        text = name
                    }, false, FetchPresetProperties, name);
                }
                GUILayout.Space(0);                 // do not remove this line; it is needed for the next line to work
                Rect rect = GUILayoutUtility.GetLastRect();
                rect.y += 2 * _lineHeight / 3;

                if (EditorGUILayout.DropdownButton(new GUIContent {
                    text = "Add Feature"
                }, FocusType.Passive, (GUIStyle)"minibuttonleft"))
                {
                    menu.DropDown(rect);
                }

                //Assign subLayerProperties after fetching it from the presets class. This happens everytime an element is added
                if (subLayerProperties != null)
                {
                    subLayerArray.arraySize++;
                    var subLayer = subLayerArray.GetArrayElementAtIndex(subLayerArray.arraySize - 1);
                    SetSubLayerProps(subLayer);

                    //Refreshing the tree
                    layerTreeView.Layers = subLayerArray;
                    layerTreeView.AddElementToTree(subLayer);
                    layerTreeView.Reload();

                    selectedLayers = new int[1] {
                        subLayerArray.arraySize - 1 + FeatureSubLayerTreeView.uniqueId
                    };
                    layerTreeView.SetSelection(selectedLayers);
                    subLayerProperties = null;                     // setting this to null so that the if block is not called again

                    if (vectorLayerProperties != null)
                    {
                        vectorLayerProperties.HasChanged = true;
                    }
                }

                if (GUILayout.Button(new GUIContent("Remove Selected"), (GUIStyle)"minibuttonright"))
                {
                    bool layerWasRemoved = false;
                    foreach (var index in selectedLayers.OrderByDescending(i => i))
                    {
                        if (layerTreeView != null)
                        {
                            layerTreeView.RemoveItemFromTree(index);
                            subLayerArray.DeleteArrayElementAtIndex(index - FeatureSubLayerTreeView.uniqueId);
                            layerTreeView.treeModel.SetData(GetData(subLayerArray));
                            layerWasRemoved = true;
                        }
                    }

                    selectedLayers = new int[0];
                    layerTreeView.SetSelection(selectedLayers);

                    if (layerWasRemoved && vectorLayerProperties != null)
                    {
                        vectorLayerProperties.HasChanged = true;
                    }
                }

                EditorGUILayout.EndHorizontal();

                GUILayout.Space(EditorGUIUtility.singleLineHeight);

                if (selectedLayers.Count == 1 && subLayerArray.arraySize != 0 && selectedLayers[0] - FeatureSubLayerTreeView.uniqueId >= 0)
                {
                    //ensure that selectedLayers[0] isn't out of bounds
                    if (selectedLayers[0] - FeatureSubLayerTreeView.uniqueId > subLayerArray.arraySize - 1)
                    {
                        selectedLayers[0] = subLayerArray.arraySize - 1 + FeatureSubLayerTreeView.uniqueId;
                    }

                    SelectionIndex = selectedLayers[0];

                    var layerProperty = subLayerArray.GetArrayElementAtIndex(SelectionIndex - FeatureSubLayerTreeView.uniqueId);

                    layerProperty.isExpanded = true;
                    var  subLayerCoreOptions = layerProperty.FindPropertyRelative("coreOptions");
                    bool isLayerActive       = subLayerCoreOptions.FindPropertyRelative("isActive").boolValue;
                    if (!isLayerActive)
                    {
                        GUI.enabled = false;
                    }

                    DrawLayerVisualizerProperties(sourceTypeValue, layerProperty, property);

                    if (!isLayerActive)
                    {
                        GUI.enabled = true;
                    }
                }
                else
                {
                    GUILayout.Label("Select a visualizer to see properties");
                }
            }
        }
Exemple #28
0
    void Start()
    {
        _map = GameObject.Find("Map").GetComponent <AbstractMap>();

        CallGetData();
    }
Exemple #29
0
 void Start()
 {
     AbstractMap[] tmp = FindObjectsOfType <AbstractMap>();
     _map        = tmp[0];
     api_img_mid = Icao;
 }
Exemple #30
0
 public Registry(AbstractMap map)
 {
     Map = map;
 }
 void Start()
 {
     _map = FindObjectOfType <AbstractMap>();
 }
Exemple #32
0
 private void Start()
 {
     InvokeRepeating("CallGetData", 1.0f, 3.0f);
     abstractMap = GameObject.Find("Map").GetComponent <AbstractMap>();
 }
 public AbstractCachingAlgorithm(AbstractMap map)
 {
     m_map = map;
 }
 public ZColdCachingAlgorithm(AbstractMap map)
     : base(map)
 {
     ActiveLevel = 0;
 }