//--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- //------------------------------------ Array Part operations ---------------------------------------- //--------------------------------------------------------------------------------------------------- // Make all the parts in an array invisible public static void HideAll(Part[] parts) { foreach (Part part in parts) // For each part { PartAdapter.Hide(part); // Hide it } }
// Toggle the part visibility public static void Toggle(Part part) { if (PartAdapter.IsHidden(part)) { PartAdapter.Show(part); } else if (PartAdapter.IsShown(part)) { PartAdapter.Hide(part); } }