public static bool Localisation(Main_Controller.Country country) { if (country != null && powerD - 3 >= 0) { research.Add("Localisation"); powerD -= 3; if (country.infected != 0) { powerD += 10; found = true; //NOTIFICATION if (!AI.isSP) { Main_Controller_def.Instance.notif.GetComponent <Canvas>().enabled = true; Main_Controller_def.Instance.notif.GetComponent <Text>().text = "infected found in " + country.Name; } return(true); } else { if (!AI.isSP) { Main_Controller_def.Instance.notif.GetComponent <Canvas>().enabled = true; Main_Controller_def.Instance.notif.GetComponent <Text>().text = "no infected found in " + country.Name; } return(false); } } return(false); }
public void Init(string Title, string Message, float TransmitionHuman, int Virulence, float Lethality, int Deceased, Main_Controller.Country Country) { title = Title; message = Message; transmitionHuman = TransmitionHuman; virulence = Virulence; lethality = Lethality; deceased = Deceased; country = Country; }
public static bool SanitaryCampaign(Main_Controller.Country region) { if (powerD - 15 >= 0 && vaccineFound) { research.Add("Sanitary campaign"); powerD -= 15; Main_Controller.sanitaryBonus = region.Name; return(true); } return(false); }
public static bool CloseBorder(Main_Controller.Country country) { if (!closeBorderUsed && powerD - 10 >= 0) { closeBorderUsed = true; gestion.Add("Fermeture temporaire"); powerD -= 5; country.isClosed = true; return(true); } return(false); }
public static void ActivateInformationWindow() { if (Main_Controller.isStarted) { string[] namelist = continent.Split(new char[] { ',' }); string regionName = ""; if (namelist.Length == 2) { regionName = namelist[1].Substring(1); } Main_Controller.Region region = Main_Controller.GetRegionFromName(regionName); Main_Controller.Country country = Main_Controller.GetCountryFromName(continent); if (region == null || country == null) { CountryInforamtion.SetActive(false); } else { string humidty = ""; string temp = ""; switch (country.average_humidity) { case -2: humidty = "très faible"; break; case -1: humidty = "faible"; break; case 1: humidty = "élevé"; break; case 2: humidty = "très élevé"; break; default: humidty = "normal"; break; } switch (country.average_temp) { case -2: temp = "très faible"; break; case -1: temp = "faible"; break; case 1: temp = "élevé"; break; case 2: temp = "très élevé"; break; default: temp = "normal"; break; } CountryInforamtion.SetActive(true); TitleInformation.text = continent; BasicInformation.text = country.Population + "\n" + country.Density + "\n" + country.Life_expectancy + "\n" + country.GDP + "\n" + humidty + "\n" + temp; PopulationInformation.text = country.infected + "\n" + country.Population + "\n" + (country.infected + country.Population) + "\n" + country.dead; } } }