public void DeleteTroopObject() { if (!stub.City.Troops.Remove(newTroopObject.Stub.TroopId)) { return; } stub.BeginUpdate(); stub.AddAllToFormation(FormationType.Defense, newTroopObject.Stub); stub.EndUpdate(); newTroopObject.BeginUpdate(); world.Regions.Remove(newTroopObject); stub.City.ScheduleRemove(newTroopObject, false); newTroopObject.EndUpdate(); }