private void OnBuildingInformationReceived(BuildingHighlight highlight) { if (!highlight.IsDiscarded()) { StartCoroutine(ClearHighlight(highlight)); } }
void OnBuildingHighlighted(BuildingHighlight buildingHighlight) { if (!buildingHighlight.IsDiscarded()) { StartCoroutine(ClearHighlight(buildingHighlight)); } }
void OnBuildingInformationReceived(BuildingHighlight highlight) { if (highlight.IsDiscarded()) { return; } Debug.Log(string.Format("Received information for building with id '{0}'", highlight.GetBuildingInformation().BuildingId)); }
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(); }
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)); }