private void EffectFromInfect() { //Calculate death int deathCount = Mathf.RoundToInt(_infectPopulation * defaultDiseases.GetRndDeathRate()); _infectPopulation -= deathCount; _deadPopulation += deathCount; //Calculate new Infect float rdnInfectRate = defaultDiseases.GetRndInfectRate(); if (actionHandler.GetValue(StatFlag.ActionStat.Quarantine, ID) > 0) { rdnInfectRate = 0.001f; } AffectPopulationWithInfectNum(InfectionMethod.CalculateInfectPeople(infectRate, _infectPopulation, rdnInfectRate)); //Calculate cured }
private void CaculateInfectPerTurn() { if (possibleDisease == null) { return; } //Calculate death int deathCount = Mathf.RoundToInt(infect_population * possibleDisease.GetRndDeathRate()); this.infect_population -= deathCount; int newInfectPatient = InfectionMethod.CalculateInfectPeople(infectRatio, infect_population, possibleDisease.GetRndInfectRate()); this.health_population -= newInfectPatient; this.infect_population += newInfectPatient; this.originate.ActDeathByTraveler(deathCount); }