void GetTarget() { Cleaner beFreeCleaner = null; foreach (var cleaner in cleanerList) { if (cleaner.citizen == null) { beFreeCleaner = cleaner; break; } } Debug.LogWarning(beFreeCleaner); if (beFreeCleaner != null) { foreach (var citizen in tileCont.citizenList) { if (citizen.cleanerOn == false && citizen.citizen_color == CitizenColor.Red) { beFreeCleaner.CitizenOn(citizen); GoAmbulance(beFreeCleaner); break; } } } }