Exemplo n.º 1
0
        private void RefreshChild()
        {
            NodePort childPort = GetPort(nameof(child));

            if (childPort != null && childPort.ConnectionCount > 0)
            {
                var connection = childPort.GetConnection(0);
                if (connection != null)
                {
                    child = (BtNode)connection.node;
                    return;
                }
            }

            child = null;
        }
Exemplo n.º 2
0
        private void RefreshParent()
        {
            NodePort parentPort = GetPort(nameof(Parent));

            if (parentPort != null && parentPort.ConnectionCount > 0)
            {
                var parentConnection = parentPort.GetConnection(0);
                if (parentConnection != null)
                {
                    Parent = (BtNode)parentConnection.node;
                    return;
                }
            }

            Parent = null;
        }