public void SetCountryInList(CountryOnMap c) { countryName.text = c.name; area.text = c.area.ToString(); population.text = c.population.ToString(); vvp.text = c.vvp.ToString(); }
public void ActivateCountry(CountryOnMap clickedCountry) { SetLastCountry(); HideMarker(clickedCountry); ShowCountryAttraction(clickedCountry); uIController.infoPanel.ActivatePanel(); uIController.infoPanel.SetInfo(clickedCountry); }
public void OnHold() { var ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hitInfo; if (Physics.Raycast(ray, out hitInfo)) { CountryOnMap chosenCountry = hitInfo.transform.GetComponentInParent <CountriesController>().GetCountry(hitInfo.collider.gameObject); countriesController.SelectCountry(chosenCountry); } }
public void SelectCountry(CountryOnMap sCountry) { if (isSelecting == false) { SetLastCountry(); } ChangeSelectingStatus(true); sCountry.attraction.SetActive(true); HideMarker(sCountry); uIController.SetActiveButtons(true); sCountry.check.SetActive(true); if (!selectedCountries.Exists(x => x == sCountry)) { selectedCountries.Add(sCountry); } uIController.infoPanel.DisactivatePanel(); uIController.selectedPanel.ActivatePanel(); uIController.selectedPanel.SetSelectedCount(selectedCountries.Count); }
public void HideMarker(CountryOnMap co) { lastChosenMarker = co.marker; lastChosenMarker.SetActive(false); }
public void ShowCountryAttraction(CountryOnMap aCountry) //использовать для селекта? { lastChosenAttaction = aCountry.attraction; lastChosenAttaction.SetActive(true); }
public void SetInfo(CountryOnMap country) { AreaText.text = "Площадь: " + country.area.ToString() + " км^2"; PopulationText.text = "Население: " + country.population.ToString() + " тыс. чел."; VvpText.text = "ВВП: " + country.vvp.ToString() + " трлн. долл."; }