private void CreateStandardNodes(IList <IStandardNode> nodes)
        {
            if (panelInterface == null)
            {
                return;
            }

            if (nodes == null)
            {
                return;
            }

            if (StandardPrefab == null || StandardTransform == null)
            {
                return;
            }

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

                if (node == null)
                {
                    continue;
                }

                CreateStandardNode(node);
            }
        }
Exemplo n.º 2
0
        public void AddBodyNode(IStandardNode node)
        {
            if (node == null)
            {
                return;
            }

            CreateBodyNode(node);
        }
Exemplo n.º 3
0
        public void setNode(IStandardNode node)
        {
            if (node == null)
            {
                return;
            }

            standardInterface = node;

            if (Title != null)
            {
                Title.OnTextUpdate.Invoke(node.NodeText);
            }

            if (Reward != null)
            {
                Reward.OnTextUpdate.Invoke(node.RewardText);
            }

            setNote();
        }
        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);
        }