Ejemplo n.º 1
0
    void RefreshLinePoints()
    {
        CachedLineRenderer.SetVertexCount(linePoints.Count);

        for (int i = 0; i < linePoints.Count; i++)
        {
            CachedLineRenderer.SetPosition(i, linePoints [i]);
        }
    }
Ejemplo n.º 2
0
    IEnumerator DrawSwishEffect()
    {
        AddPoint(CachedTransform.position);
        AddPoint(CachedTransform.position);

        while (true)
        {
            yield return(new WaitForEndOfFrame());

            if (GetCurrentSegmentLength() >= minimumPointDistance)
            {
                AddPoint(CachedTransform.position);
            }
            else
            {
                CachedLineRenderer.SetPosition(linePoints.Count - 1, CachedTransform.position);
            }
        }
    }