void removeHat(Duck duck) { var hat = duck.GetEquipment(typeof(TeamHat)) as TeamHat; if (hat == null) { return; } duck.Unequip(hat); Level.Remove(hat); }