示例#1
0
 public void Show(TCircle circle, Color color)
 {
     m_type   = EGraphType.Circle;
     m_circle = circle;
     m_color  = color;
     isShow   = true;
 }
示例#2
0
        public TCircle LimitInside(TCircle tagert)
        {
            Vector2 delta  = tagert.center - center;
            float   dr     = radius - tagert.radius;
            TCircle result = tagert;

            result.center = center + delta.normalized * Mathf.Min(delta.magnitude, dr);
            return(result);
        }
示例#3
0
文件: TRect.cs 项目: Airahc/hack_ssjj
        public TCircle LimitInside(TCircle circle)
        {
            float   newWidth  = Mathf.Max(0, width - circle.radius * 2);
            float   newHeight = Mathf.Max(0, height - circle.radius * 2);
            TRect   newRect   = new TRect(x, y, newWidth, newHeight);
            Vector2 circlePos = newRect.LimitInside(circle.center);

            return(new TCircle(circlePos, circle.radius));
        }
示例#4
0
        public static void DrawCircle(TCircle circle, Color color, string drawOncePerFrameKey = null)
        {
            if (ins == null || !CheckDrawCount(drawOncePerFrameKey))
            {
                return;
            }
            var item = ins.CreateGraph();

            if (item != null)
            {
                item.Show(circle, color);
            }
        }
示例#5
0
 public void DrawScreenCircle(TCircle circle, Color color, int smooth = 50)
 {
     DrawScreenEllipse(circle.center, circle.radius, circle.radius, color, smooth);
 }
示例#6
0
 public bool IsOverLapWith(TCircle circle)
 {
     return((radius + circle.radius) * (radius + circle.radius) > (center - circle.center).sqrMagnitude);
 }
示例#7
0
 public static TCircle Lerp(TCircle a, TCircle b, float t)
 {
     return(new TCircle(Vector2.Lerp(a.center, b.center, t), Mathf.Lerp(a.radius, b.radius, t)));
 }
示例#8
0
文件: Esp.cs 项目: Airahc/hack_ssjj
 private void D_C(TCircle c, Color color)
 {
     GizmosPro.DrawCircle(c, color);
 }
示例#9
0
 public bool IsOverLapWith(TCircle circle)
 {
     return(IsOverLapWith(new TEllipse(circle.boundingRect)));
 }
示例#10
0
 public TEllipse(TCircle circle) : this(circle.center.x, circle.center.y, circle.radius, circle.radius)
 {
 }