IEnumerator Extinguish() { MissionManager.Mission myMission = mission; for (int i = 1; i < myMission.blocksFound.Count; i++) { if (myMission.blocksFound[i].states.ContainsKey(State.OnFire)) { OnFire state = myMission.blocksFound[i].states[State.OnFire] as OnFire; if (!state.isBeingExtinguished) { state.StartExtinguish(); break; } } } GameManager.instance.missionManager.EndMission(myMission); yield return(null); }