/// <summary> /// Shows the cornors of the platform /// </summary> public void OnDrawGizmos() { Gizmos.color = Color.blue; Gizmos2D.DrawCircle(new Vector2(Physics2DExtra.Left(gCollider), Physics2DExtra.Top(gCollider)), 0.1f); Gizmos.color = Color.red; Gizmos2D.DrawCircle(new Vector2(Physics2DExtra.Right(gCollider), Physics2DExtra.Top(gCollider)), 0.1f); Gizmos.color = Color.green; Gizmos2D.DrawCircle(new Vector2(Physics2DExtra.Left(gCollider), Physics2DExtra.Bottom(gCollider)), 0.1f); Gizmos.color = Color.yellow; Gizmos2D.DrawCircle(new Vector2(Physics2DExtra.Right(gCollider), Physics2DExtra.Bottom(gCollider)), 0.1f); }
/// <summary> /// Vizualizes the circle in editor. /// </summary> private void OnDrawGizmos() { if (Application.isPlaying) { Gizmos2D.DrawCircle(initPos, Radius, Percision); } else { Gizmos2D.DrawCircle(transform.position, Radius, Percision); float inc = (Mathf.PI * 2.0f) / Percision; float cur = inc * listIndex; Vector2 newPos = new Vector2(Mathf.Cos(cur), Mathf.Sin(cur)) * Radius; Gizmos.color = Color.red; Gizmos2D.DrawCircle((Vector2)transform.position + newPos, 0.25f, Percision); } }