Ejemplo n.º 1
0
 public async void OnMouseDown()
 {
     if (Title != null && Description != null)
     {
         MemoryDataService.Language = "en";
         Title.text = await WikipediaService.GetOpenSearch(Title.text, MemoryDataService.Language);
         Description.text = await WikipediaService.FullSearch(Title.text, MemoryDataService.Language);
     }
 }
        public async void OnMouseDown()
        {
            MarkerStorage.ActiveMarkers.TryGetValue(gameObject, out PlaceAtLocation marker);

            if (PlaceOfInterestDescription != null && marker != null)
            {
                if (lastClickedMarker == gameObject && PlaceOfInterestDescription.activeSelf)
                {
                    PlaceOfInterestDescription.SetActive(false);
                }
                else
                {
                    PlaceOfInterestDescription.SetActive(true);

                    lastClickedMarker = gameObject;

                    Title.text = await WikipediaService.GetOpenSearch(gameObject.name, MemoryDataService.Language);

                    Description.text = await WikipediaService.FullSearch(gameObject.name, MemoryDataService.Language);
                }
            }
        }