using UnityEngine;
using System;
using System.Collections.Generic;

namespace mgaia.Editor
{
    /// <summary>
    /// Extensões para os gizmos do editor
    /// </summary>
    /// <owner>Victor</owner>
    public static class GizmoExtensions
    {
        /// <summary>
        /// Desenha um retangulo 2D
        /// </summary>
        public static void Draw2DRectangle(Rect rect, float z = 0)
        {
            Gizmos.DrawLine(new Vector3(rect.x, rect.y, z), new Vector3(rect.x + rect.width, rect.y, z));
            Gizmos.DrawLine(new Vector3(rect.x, rect.y, z), new Vector3(rect.x, rect.y + rect.height, z));
            Gizmos.DrawLine(new Vector3(rect.x + rect.width, rect.y, z), new Vector3(rect.x + rect.width, rect.y + rect.height, z));
            Gizmos.DrawLine(new Vector3(rect.x, rect.y + rect.height, z), new Vector3(rect.x + rect.width, rect.y + rect.height, z));
        }
    }
}