Exemplo n.º 1
0
    private void Render( CableRoute route, float radius )
    {
      if ( m_segmentSpawner == null )
        return;

      m_segmentSpawner.Begin();
      try {
        CableRouteNode[] nodes = route.ToArray();
        for ( int i = 1; i < nodes.Length; ++i )
          m_segmentSpawner.CreateSegment( nodes[ i - 1 ].Position, nodes[ i ].Position, radius );
      }
      catch ( System.Exception e ) {
        Debug.LogException( e, this );
      }
      m_segmentSpawner.End();
    }
Exemplo n.º 2
0
        private void RenderRoute(WireRoute route, float radius)
        {
            if (route == null)
            {
                return;
            }

            m_segmentSpawner.Begin();

            try {
                WireRouteNode[] nodes = route.ToArray();
                for (int i = 1; i < nodes.Length; ++i)
                {
                    m_segmentSpawner.CreateSegment(nodes[i - 1].Position, nodes[i].Position, radius);
                }
            }
            catch (System.Exception e) {
                Debug.LogException(e);
            }

            m_segmentSpawner.End();
        }
Exemplo n.º 3
0
        private void Render(CableRoute route, float radius)
        {
            if (m_segmentSpawner == null)
            {
                return;
            }

            m_segmentSpawner.Begin();
            try {
                var points = Cable.GetRoutePoints();
                for (int i = 1; i < points.Length; ++i)
                {
                    m_segmentSpawner.CreateSegment(points[i - 1], points[i], radius);
                }
                //CableRouteNode[] nodes = route.ToArray();
                //for ( int i = 1; i < nodes.Length; ++i )
                //  m_segmentSpawner.CreateSegment( nodes[ i - 1 ].Position, nodes[ i ].Position, radius );
            }
            catch (System.Exception e) {
                Debug.LogException(e, this);
            }
            m_segmentSpawner.End();
        }