Example #1
0
    void EndDraw()
    {
        canDraw = false;

        TrailRenderer trail = theTrail.GetComponent <TrailRenderer>();

        for (int i = 0; i < trail.positionCount; i++)
        {
            //Debug.Log(trail.GetPosition(i));

            positionsList.AddToTheList(trail.GetPosition(i));
        }
        if (positionsList.ListOfPositions.Count > 1)
        {
            positionsList.PrepareShoot();
        }
        else
        {
            AllowDraw();
        }
    }