/// <summary> /// Checking if people are being evacuated. If all of visitors are evacuated, they are released into the hotel again /// </summary> /// <param name="drawUpdateTime"></param> public void EvacuatePeopleCheck(double drawUpdateTime) { // When all visitors have gathered if (EvacuatedPeople.Count == Visitors.Count + Cleaners.Count) { // Substract untill integer becomes zero OneHTE -= (int)drawUpdateTime / HTE.Evacuation; if (OneHTE < 1) { // Tell visitor that we are done helping him so he can walk away for (int i = 0; i < EvacuatedPeople.Count; i++) { if (EvacuatedPeople[i] is Visitor) { (EvacuatedPeople[i] as Visitor).Communicate(InteractStatus.DONE_BEING_HELPED); } } for (int i = 0; i < EvacuatedPeople.Count; i++) { EvacuatedPeople.Remove(EvacuatedPeople[i]); } OneHTE = 1000; } } }
/// <summary> /// Add people too the evacuation list /// </summary> /// <param name="human"></param> public void EvacuatePeople(Human human) { EvacuatedPeople.Add(human); }