Пример #1
0
        public void ConnectTo(Waypoint next)
        {
            if (m_next)
            {
                DestroyImmediate(m_next.gameObject);
            }
            if (next != null)
            {
                if (next.m_last != null)
                {
                    DestroyImmediate(next.m_last.gameObject);
                }

                m_next      = RoadUtility.CreatePath(this, next);
                next.m_last = m_next;
            }

            UpdateWaypointDirection(true);
        }
Пример #2
0
        public void ConnectFrom(Waypoint last)
        {
            if (m_last)
            {
                DestroyImmediate(m_last.gameObject);
            }
            if (last != null)
            {
                if (last.m_next != null)
                {
                    DestroyImmediate(last.m_next.gameObject);
                }

                m_last      = RoadUtility.CreatePath(last, this);
                last.m_next = m_last;
            }

            UpdateWaypointDirection(true);
        }