コード例 #1
0
        private void CreateConnection(ViewStateNode viewStateNode, ViewPageNode viewPageNode)
        {
            viewStateNode.currentLinkedViewPageNode.Add(viewPageNode);
            viewPageNode.currentLinkedViewStateNode = viewStateNode;

            viewStateNode.OnNodeConnect(viewPageNode);
            viewPageNode.OnNodeConnect(viewStateNode);
        }
コード例 #2
0
        public override void SetupNode()
        {
            OnNodeTypeConvert(currentLinkedViewStateNode, this);
            currentLinkedViewStateNode = null;
            var isOverlay = nodeType == NodeType.Overlay;

            this.viewPage.viewPageType = isOverlay ? ViewPage.ViewPageType.Overlay : ViewPage.ViewPageType.FullPage;
        }
コード例 #3
0
        public void OnViewStateDelete(ViewStateNode node)
        {
            var s = data.viewStates.SingleOrDefault(m => m.viewState == node.viewState);

            node.currentLinkedViewPageNode.All(
                (m) =>
            {
                m.currentLinkedViewStateNode = null;
                m.viewPage.viewState         = "";
                return(true);
            }
                );
            data.viewStates.Remove(s);
            isDirty = true;
        }
コード例 #4
0
        public void CreateConnection(ViewStateNode viewStateNode)
        {
            if (string.IsNullOrEmpty(viewStateNode.viewState.name))
            {
                return;
            }
            var vps = viewPageList.Where(m => m.viewPage.viewState == viewStateNode.viewState.name);

            if (vps.Count() == 0)
            {
                return;
            }
            foreach (var item in vps)
            {
                CreateConnection(viewStateNode, item);
            }
        }
コード例 #5
0
        public ViewStateNode AddViewStateNode(Vector2 position, ViewState viewState = null)
        {
            var node = new ViewStateNode(position, CheckCanMakeConnect, viewState);

            node.OnNodeSelect += (m) =>
            {
                lastSelectNode = m;
                inspector.SetCurrentSelectItem(m);
            };
            node.OnNodeDelete += () =>
            {
                dataReader.OnViewStateDelete(node);
                viewStateList.Remove(node);
            };

            if (viewState == null)
            {
                dataReader.OnViewStateAdd(node);
            }
            viewStateList.Add(node);
            return(node);
        }
コード例 #6
0
 public void OnViewStateAdd(ViewStateNode node)
 {
     data.viewStates.Add(new ViewSystemSaveData.ViewStateSaveData(new Vector2(node.rect.x, node.rect.y), node.viewState));
     isDirty = true;
 }