private void CreateBodySections(IList <string> bodies) { if (windowInterface == null) { return; } if (bodies == null) { return; } for (int i = bodies.Count - 1; i >= 0; i--) { string b = bodies[i]; if (string.IsNullOrEmpty(b)) { continue; } IList <IVesselSection> vessels = windowInterface.GetBodyVessels(b); if (vessels.Count <= 0) { continue; } CreateBodySection(b, vessels.Count); } }
public void setWindow(ISEP_Window window) { if (window == null) { return; } windowInterface = window; if (windowInterface.ShowAllVessels) { CreateVesselSections(windowInterface.GetVessels); if (VesselExpansion != null) { VesselExpansion.gameObject.SetActive(false); } } else { currentBody = windowInterface.CurrentBody; CreateVesselSections(windowInterface.GetBodyVessels(windowInterface.CurrentBody)); CreateBodySections(windowInterface.GetBodies); } transform.localScale *= window.Scale; }