public void MyStart() { virusPopperPool = new List <GameObject>(); virus = new Virus("Hepy", 0.5f); perkGenerator = new PerkGenerator(); perkGenerator.GeneratePerks(out Symptom[] symptoms, out Transmission[] transmissions); Virus.CalculateSpreading(virus); virus.MySymptoms.AddRange(symptoms); virus.MyTransmissions.AddRange(transmissions); if (text != null) { text.text = virus.ToString(); } if (_VirusUI != null) { _VirusUI.SetVirus(virus, perkGenerator); } foreach (RegionBehaviour regionBehaviour in RegionBehaviour.Regions) { regionBehaviour.SubscribeOnInfected(() => { GetPopper().GetComponent <VirusPopper>().Pop(regionBehaviour); }); } }
public float GetSpreadingOnCulture(Culture c, float PopulationDensity) { float Spread = Virus.CalculateSpreading(this); Spread += c.Warmness; return(Spread); }