Exemple #1
0
        private static void GatherNodesForward(NodeUI currentNode, NodeCheck.CheckInfo checkInfo, NodeControl nodeController, HashSet <NodeUI> visitedNodes)
        {
            var isNewNode = visitedNodes.Add(currentNode);

            if (!isNewNode)
            {
                return;
            }

            foreach (var childUID in currentNode.nodeBase.childUID)
            {
                if (!string.IsNullOrEmpty(childUID))
                {
                    GatherNodesForward(nodeController.dictNode[childUID], checkInfo, nodeController, visitedNodes);
                }
            }
        }
Exemple #2
0
    public void AddAIDefenders()
    {
        GameObject nodes = GameObject.Find("Nodes");

        Node[] nl = nodes.GetComponentsInChildren <Node>();
        foreach (Node n in nl)
        {
            //if (!n.gameObject.activeSelf)
            //{
            //	Debug.Log("!n.gameObject.activeSelf");
            //}
            BGBuildManager.instance.SelectNodeToBuild(n);
            n.BuildTurret(blueprints[0]);
        }
        NodeUI ui = FindObjectOfType <NodeUI>();

        ui.Hide();
    }
Exemple #3
0
    void ConfigureNode(PathGraph graph)
    {
        NodeUI nodeUi = nodeImage.GetComponent <NodeUI>();

        if (graph.startNode == this)
        {
            nodeUi.SetStartNode();
            nodeUi.ClearFinishNode();
        }
        else if (graph.finishNode == this)
        {
            nodeUi.SetFinishNode();
            nodeUi.ClearStartNode();
        }
        else
        {
            nodeUi.ClearStartNode();
            nodeUi.ClearFinishNode();
        }
    }
Exemple #4
0
        public Task <NodeUI> GetNodeAsync(UsageType usageType, string collectionAlias)
        {
            var collection = _collectionProvider.GetCollection(collectionAlias);
            var node       = usageType.HasFlag(UsageType.View) ? collection.NodeView : collection.NodeEditor;

            if (node == null)
            {
                throw new InvalidOperationException($"Failed to get UI configuration from collection {collectionAlias} for action {usageType}");
            }

            var nodeUI = new NodeUI(ButtonCallAsync, ListCallAsync);

            return(Task.FromResult(nodeUI));

            async Task <List <ButtonUI>?> ButtonCallAsync(EditContext editContext)
            {
                if (node.Buttons == null)
                {
                    return(null);
                }

                return(await GetButtonsAsync(node.Buttons, editContext));
            }

            async Task <List <SectionUI>?> ListCallAsync(EditContext editContext)
            {
                if (node.Panes == null)
                {
                    return(null);
                }

                var type = editContext.Entity.GetType();

                return(await node.Panes
                       .Where(pane => pane.VariantType.IsSameTypeOrBaseTypeOf(type))
                       .ToListAsync(pane => GetSectionUIAsync(pane, editContext)));
            }
        }
Exemple #5
0
 void CalculateTransformPosition(GameObject g)
 {
     NodeUI          nodeUI          = g.GetComponent <NodeUI>();
     AbilityTreeNode abilityTreeNode = nodeUI.treeNode;
 }
 private NodeUI nodeUI;//user interface for neodes
 private void Start()
 {
     nodeUI       = FindObjectOfType <NodeUI>(); //find nodeui
     selectedNode = null;                        //nothing selected
 }
Exemple #7
0
        private void _structTreeView_AfterSelect(object sender, TreeViewEventArgs e)
        {
            _activeInstance = (InstanceTreeNode)e.Node.Tag;
            if (_nodeControl != null)
            {
                _nodeControl.Parent.Controls.Remove(_nodeControl);
                _nodeControl.Dispose();
                _nodeControl = null;
            }
            _structTreeView.BeginUpdate();
            try
            {
                if (_activeInstance == null)
                {
                    _structGridView.DataSource = new List <StructCell>();
                }
                else
                {
                    NodeUI ui = FindNodeUI(_activeInstance);
                    if (ui != null)
                    {
                        _nodeControl      = ui.CreateControl();
                        _nodeControl.Dock = DockStyle.Fill;
                        splitContainer1.Panel2.Controls.Add(_nodeControl);
                        _structGridView.Visible = false;
                    }
                    else
                    {
                        _structGridView.Visible = true;
                        // _structGridView.DataSource = _activeInstance.Cells;
                        if (_structGridView.DataSource == null)
                        {
                            _structGridView.DataSource = LoadDS(currentInstanceTree);
                        }
                    }
                    // while we're in BeginUpdate, pre-evaluate all cell values
                    _activeInstance.Cells.ToList().ForEach(cell => cell.Value.ToString());
                }
                if (!string.IsNullOrEmpty(this.parent.getFilterField()))
                {
                    (_structGridView.DataSource as DataTable).DefaultView.RowFilter = string.Format("{0} like '%{1}%'", this.parent.getFilterField(), this.parent.getFilterValue());
                }
            }
            finally
            {
                _structTreeView.EndUpdate();
            }
            var instance = _activeInstance as StructInstance;

            if (instance == null)
            {
                InstanceTree tree = ActiveInstanceTree;
                if (tree != null)
                {
                    _hexDump.Stream = FindDataFile(tree).Stream;
                }
                _currentStructureHighlighter.SetRange(-1, -1);
            }
            else
            {
                _hexDump.Stream = instance.Stream;
                _currentStructureHighlighter.SetRange(instance.Offset, instance.EndOffset);
            }
            // Re-select grid
            if (_structGridView.Rows.Count >= e.Node.Index && _structGridView.CurrentCell != null)
            {
                _structGridView.CurrentCell = _structGridView.Rows[e.Node.Index].Cells[_structGridView.CurrentCell.ColumnIndex];
            }
        }
Exemple #8
0
 void Awake()
 {
     instance = this;
     this.gameObject.SetActive(false);
 }
 public static void NodeUIStartPostfix(NodeUI __instance)
 {
     Traverse.Create(__instance).Field("limitOver").GetValue <BoolReactiveProperty>().Dispose();
 }
Exemple #10
0
        public DynamoRobotEngine()
        {
            OutPortData.Add(new PortData("eng", "The Robot Structural Analysis engine.", typeof(object)));

            NodeUI.RegisterAllPorts();
        }
 private void Start()
 {
     uiManagerScript = UIManager.GetComponent<NodeUI>();
 }
 void Start()
 {
     nodeUI = NodeUI.instance;
 }
 // Use this for initialization
 void Awake()
 {
     NodeUI = GetComponent <NodeUI>();
 }
        /// <summary>
        /// Exports all currently loaded characters. Probably wont export characters that have not been loaded yet, like characters in a different classroom.
        /// </summary>
        private void ExportParts()
        {
            Logger.LogDebug("Start export");

            var node = GameObject.FindObjectOfType <HEdit.NodeSettingCanvas>();

            if (node == null)
            {
                return;
            }

            if (!Directory.Exists(ExportPath))
            {
                Directory.CreateDirectory(ExportPath);
            }

            // ADVPartのデータをセーブ
            int partCount = 0;

            foreach (KeyValuePair <string, BasePart> keyValuePair in HEditData.Instance.nodes)
            {
                if ((keyValuePair.Value.kind != PART_KIND_H) && (keyValuePair.Value.kind != PART_KIND_ADV))
                {
                    continue;
                }

                // パートの名前を取得
                NodeUI _nodeUI  = HEdit.HEditGlobal.Instance.nodeControl.dictNode[keyValuePair.Value.uuId];
                string partName = _nodeUI.nodeBase.name;

                // Kindを文字列にする
                string strKind = (keyValuePair.Value.kind == PART_KIND_ADV)? "ADV" : "H";

                string fileName = HEditData.Instance.info.title + "_" + partCount + "_" + strKind + "_" + partName + "." + FileExtension;
                string fullPath = Path.Combine(ExportPath, fileName);

                Logger.LogDebug(fileName);

                partCount++;

                using (FileStream fileStream = new FileStream(fullPath, FileMode.Create, FileAccess.Write))
                {
                    using (BinaryWriter binaryWriter = new BinaryWriter(fileStream))
                    {
                        //マジックコード
                        binaryWriter.Write(MAGIC);
                        // 名前
                        binaryWriter.Write(partName);

                        // ここから【EroMakeHScene】の一部と同じ
                        // ADV == 1 or H == 0
                        binaryWriter.Write(keyValuePair.Value.kind);
                        // キーを書き込み
                        binaryWriter.Write(keyValuePair.Key);

                        keyValuePair.Value.Save(binaryWriter);
                        Logger.Log(BepInEx.Logging.LogLevel.Message, "Exported " + fullPath);
                    }
                }
            }
            Illusion.Game.Utils.Sound.Play(Illusion.Game.SystemSE.ok_s);
        }
Exemple #15
0
    void Awake()
    {
        ins = this;

        selectedType = tipo.ICE;
    }
Exemple #16
0
 void Start()
 {
     buildManager = BuildManager.instance;
     nodeUi       = buildManager.nodeUI;
 }