Esempio n. 1
0
        public void ConnectToAnchor(Anchor anchor)
        {
            GameObject       cObj    = new GameObject("AnchorConnection");
            AnchorConnection cScript = cObj.AddComponent <AnchorConnection>();

            cScript.target        = anchor;
            cObj.transform.parent = transform;
        }
Esempio n. 2
0
        public void RemoveConnection(AnchorConnection connection)
        {
            if (m_anchorConnections == null)
            {
                return;
            }

            m_anchorConnections.Remove(connection);
        }
Esempio n. 3
0
        /// <summary>
        /// Returns a list of all connections this anchor is connected to
        /// </summary>
        /// <returns></returns>
        public List <AnchorConnection> LookupAnchorConnections()
        {
            List <AnchorConnection> results = new List <AnchorConnection>();

            foreach (Transform child in transform)
            {
                AnchorConnection connection = child.GetComponent <AnchorConnection>();

                if (connection != null && connection.target != null)
                {
                    results.Add(connection);
                }
            }

            return(results);
        }
Esempio n. 4
0
 public void DrawAnchorConnection(AnchorConnection connection)
 {
     object renderer = Nodify.Editor.NodifyEditorUtilities.FindAnchorRenderer(connection.owner.GetType());
     renderer.GetType().GetMethod("OnRenderAnchorConnection").Invoke(renderer, new object[] { connection.owner, connection });
 }
Esempio n. 5
0
        public void RemoveConnection(AnchorConnection connection)
        {
            if(m_anchorConnections == null) { return; }

            m_anchorConnections.Remove(connection);
        }