示例#1
0
    void LateUpdate()
    {
        //Outer circle
        Color outerColor = new Color(1f, 0, 0, .25f * timer / maxTime);

        PlayerDebug.DrawCircle(circlePosition, circleRadius, outerColor);
        //Inner Circle
        PlayerDebug.DrawLine(transform.position, target.position, Color.red);
        PlayerDebug.DrawCircle(target.position, maxDistance / 2f, Color.red);
    }
示例#2
0
 void LateUpdate()
 {
     if (points.Count >= 2)
     {
         for (int i = 1; i < points.Count; i++)
         {
             PlayerDebug.DrawLine(points[i - 1].transform.position, points[i].transform.position, Color.blue);
         }
         PlayerDebug.DrawLine(points[0].transform.position, points[points.Count - 1].transform.position, Color.cyan);
     }
 }
示例#3
0
    void LateUpdate()
    {
        Vector3 halfConeRight = (Quaternion.Euler(0, 0, maxAngle * .5f) * transform.up).normalized;
        Vector3 halfConeLeft  = (Quaternion.Euler(0, 0, maxAngle * -.5f) * transform.up).normalized;

        Vector3 p1 = transform.position + halfConeLeft * maxDistance;
        Vector3 p2 = transform.position + halfConeRight * maxDistance;

        PlayerDebug.DrawLine(transform.position, p1, new Color(0, 0, 1f, .25f));
        PlayerDebug.DrawLine(transform.position, p2, new Color(0, 0, 1f, .25f));
        //Makes a triangle, not technically the cone that is being used, but helps to visualize it
        //PlayerDebug.DrawLine(p1, p2,new Color(0,0,1f,.25f));
    }
示例#4
0
    void LateUpdate()
    {
        if (points.Count >= 2)
        {
            for (int i = 1; i < points.Count; i++)
            {
                PlayerDebug.DrawLine(points[i - 1].transform.position, points[i].transform.position, path_color);
            }

            if (looping)
            {
                PlayerDebug.DrawLine(points[0].transform.position, points[points.Count - 1].transform.position, path_color * 2f);
            }
        }
    }
示例#5
0
    // Update is called once per frame
    void Update()
    {
        float xPart = width / (xSegments);
        float yPart = height / (ySegments);

        for (int i = 0; i < xSegments + 1; i++)
        {
            Vector3 v1 = positionOffset + new Vector3(xPart * (i), 0);
            Vector2 v2 = positionOffset + new Vector3(xPart * (i + 1), height);
            PlayerDebug.DrawLine(v1, v2, color);
        }
        for (int j = 0; j < ySegments + 1; j++)
        {
            Vector3 v1 = positionOffset + new Vector3(xPart * j / ySegments, yPart * j);
            Vector3 v2 = positionOffset + new Vector3(width + xPart * j / ySegments, yPart * (j));
            PlayerDebug.DrawLine(v1, v2, color);
        }
    }
示例#6
0
 void LateUpdate()
 {
     PlayerDebug.DrawLine(target.position, targetPosition, Color.red);
     PlayerDebug.DrawCircle(targetPosition, .125f, Color.red);
 }
 void LateUpdate()
 {
     PlayerDebug.DrawLine(transform.position, my_path.points[path_index].position, Color.red);
 }