コード例 #1
0
 public void SetCountryInList(CountryOnMap c)
 {
     countryName.text = c.name;
     area.text        = c.area.ToString();
     population.text  = c.population.ToString();
     vvp.text         = c.vvp.ToString();
 }
コード例 #2
0
 public void ActivateCountry(CountryOnMap clickedCountry)
 {
     SetLastCountry();
     HideMarker(clickedCountry);
     ShowCountryAttraction(clickedCountry);
     uIController.infoPanel.ActivatePanel();
     uIController.infoPanel.SetInfo(clickedCountry);
 }
コード例 #3
0
    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);
        }
    }
コード例 #4
0
 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);
 }
コード例 #5
0
 public void HideMarker(CountryOnMap co)
 {
     lastChosenMarker = co.marker;
     lastChosenMarker.SetActive(false);
 }
コード例 #6
0
 public void ShowCountryAttraction(CountryOnMap aCountry)   //использовать для селекта?
 {
     lastChosenAttaction = aCountry.attraction;
     lastChosenAttaction.SetActive(true);
 }
コード例 #7
0
 public void SetInfo(CountryOnMap country)
 {
     AreaText.text       = "Площадь: " + country.area.ToString() + " км^2";
     PopulationText.text = "Население: " + country.population.ToString() + " тыс. чел.";
     VvpText.text        = "ВВП: " + country.vvp.ToString() + " трлн. долл.";
 }