Ejemplo n.º 1
0
    private void OnDrawGizmos()
    {
        GizmosUtil.Push();

        circle.Center = transform.position.XZ();
        var col = color;

        if (rectObj != null && rectObj.rect.IntersectWith(circle))
        {
            col = Color.red;
        }
        else if (pointObj != null && circle.ContainPoint(pointObj.point))
        {
            col = Color.red;
        }
        else if (fanObj != null && circle.IntersectWith(fanObj.fan))
        {
            col = Color.red;
        }


        GizmosUtil.DrawCircleSolid(circle, col, mesh);
        GizmosUtil.Pop();
    }