コード例 #1
0
 private void OnBuildingInformationReceived(BuildingHighlight highlight)
 {
     if (!highlight.IsDiscarded())
     {
         StartCoroutine(ClearHighlight(highlight));
     }
 }
コード例 #2
0
 void OnBuildingHighlighted(BuildingHighlight buildingHighlight)
 {
     if (!buildingHighlight.IsDiscarded())
     {
         StartCoroutine(ClearHighlight(buildingHighlight));
     }
 }
コード例 #3
0
    void OnBuildingInformationReceived(BuildingHighlight highlight)
    {
        if (highlight.IsDiscarded())
        {
            return;
        }

        Debug.Log(string.Format("Received information for building with id '{0}'", highlight.GetBuildingInformation().BuildingId));
    }
コード例 #4
0
    void OnBuildingInformationReceived(BuildingHighlight highlight)
    {
        if (highlight.IsDiscarded())
        {
            Debug.Log(string.Format("No building information was received"));
            return;
        }

        var buildingInformation = highlight.GetBuildingInformation();

        var boxAnchor = Instantiate(boxPrefab) as GameObject;

        boxAnchor.GetComponent <GeographicTransform>().SetPosition(buildingInformation.BuildingDimensions.Centroid);

        var box = boxAnchor.transform.GetChild(0);

        box.localPosition = Vector3.up * (float)buildingInformation.BuildingDimensions.TopAltitude;
        Destroy(boxAnchor, 2.0f);

        Debug.Log(string.Format("Building information received: {0}", buildingInformation.ToJson()));

        highlight.Discard();
    }
コード例 #5
0
        void OnBuildingInformationReceived(BuildingHighlight highlight)
        {
            if (highlight.IsDiscarded())
            {
                Debug.Log(string.Format("No building information was received"));
                return;
            }



            var buildingInformation = highlight.GetBuildingInformation();



            StoreBuildingData data = new StoreBuildingData();

            data.BuildingId       = buildingInformation.BuildingId;
            data.BuildingLocation = buildingInformation.BuildingDimensions.Centroid;

            BuildingStats.AddOrUpdate(data.BuildingLocation, 1, (key, oldValue) => oldValue + 1);

            // StartCoroutine(ClearHighlight(highlight));
        }