private void CreateProgressSection(IProgressPanel progress) { if (progress == null) { return; } if (ProgressPanelPrefab == null || MissionSectionTransform == null) { return; } GameObject obj = Instantiate(ProgressPanelPrefab); if (obj == null) { return; } obj.transform.SetParent(MissionSectionTransform, false); progressPanel = obj.GetComponent <CW_ProgressPanel>(); if (progressPanel == null) { return; } progressPanel.setPanel(progress); }
public void setPanel(IProgressPanel panel) { if (panel == null) { return; } panelInterface = panel; CreateIntervalTypes(panel.GetIntervalNodes); CreateStandardNodes(panel.GetStandardNodes); CreatePOINodes(panel.GetPOINodes); CreateBodies(panel.GetBodies); if (IntervalToggle != null) { IntervalToggle.gameObject.SetActive(panel.AnyInterval); if (panel.IntervalVisible) { IntervalToggle.isOn = true; } else { ToggleIntervals(false); } } if (StandardToggle != null) { StandardToggle.gameObject.SetActive(panel.AnyStandard); if (panel.StandardVisible) { StandardToggle.isOn = true; } else { ToggleStandards(false); } } if (POIToggle != null) { POIToggle.gameObject.SetActive(panel.AnyPOI); if (panel.POIVisible) { POIToggle.isOn = true; } else { TogglePOIs(false); } } if (BodyToggle != null) { BodyToggle.gameObject.SetActive(panel.AnyBody); if (panel.BodyVisible) { BodyToggle.isOn = true; } else { ToggleBodies(false); } } }