public void ToggleStandards(bool isOn)
        {
            if (StandardTransform == null || panelInterface == null)
            {
                return;
            }

            panelInterface.StandardVisible = isOn;

            StandardTransform.gameObject.SetActive(isOn);

            if (!isOn)
            {
                return;
            }

            for (int i = standardNodes.Count - 1; i >= 0; i--)
            {
                CW_StandardNode node = standardNodes[i];

                if (node == null)
                {
                    continue;
                }

                if (node.StandardInterface == null)
                {
                    continue;
                }

                node.UpdateText();

                node.gameObject.SetActive(node.StandardInterface.IsComplete);
            }
        }
예제 #2
0
        public void NodesOn(bool isOn)
        {
            if (CW_ProgressPanel.Instance == null)
            {
                return;
            }

            if (CW_ProgressPanel.Instance.PanelInterface == null)
            {
                return;
            }

            if (!CW_ProgressPanel.Instance.PanelInterface.AnyBodyNode(bodyName))
            {
                return;
            }

            if (StandardTransform == null)
            {
                return;
            }

            StandardTransform.gameObject.SetActive(isOn);

            if (!isOn)
            {
                return;
            }

            for (int i = nodes.Count - 1; i >= 0; i--)
            {
                CW_StandardNode node = nodes[i];

                if (node == null)
                {
                    continue;
                }

                if (node.StandardInterface == null)
                {
                    continue;
                }

                node.UpdateText();

                node.gameObject.SetActive(isOn && node.StandardInterface.IsComplete);
            }
        }
        private void CreateStandardNode(IStandardNode node)
        {
            GameObject obj = Instantiate(StandardPrefab);

            if (obj == null)
            {
                return;
            }

            obj.transform.SetParent(StandardTransform, false);

            CW_StandardNode nodeObject = obj.GetComponent <CW_StandardNode>();

            if (nodeObject == null)
            {
                return;
            }

            nodeObject.setNode(node);

            standardNodes.Add(nodeObject);
        }