// Update is called once per frame new void Update() { Duration += Time.deltaTime; //Debug.Log(this.NAmbulances); if (this.NAmbulances == 0) { if (NPeopleInvolved < 1) { //notify area + central //Debug.Log(successRate); //Destroy(this.gameObject); } else { IncreaseSeverity(); this.NAmbulances = -1; MyArea.ReOpenEmergency(this); } } else { if (this.NPeopleInvolved >= 1) { CheckIfDead(); } IncreaseSeverity(); } }
// Update is called once per frame new void Update() { Duration += Time.deltaTime; if (this.DevastationLife <= 0 && NFiretrucks == 0) { //Destroy(this.gameObject); } else { Regain = Math.Min(regainEnergyPercentage * DevastationLife, MaxRegain); DevastationLife += Regain; IncreaseSeverity(); var p = UnityEngine.Random.Range(0f, 1f); if (p < 0.5) { AffectedArea += regainEnergyPercentage * AffectedArea; } if (this.NFiretrucks == 0) { this.NFiretrucks = -1; MyArea.ReOpenEmergency(this); } } }