AssemblyCSharp.DebugHelper.DebugDrawRectXZ C# (CSharp) Méthode

DebugDrawRectXZ() public static méthode

public static DebugDrawRectXZ ( UnityEngine color, UnityEngine center, float side, float duration ) : void
color UnityEngine
center UnityEngine
side float
duration float
Résultat void
        public static void DebugDrawRectXZ(UnityEngine.Color color, UnityEngine.Vector3 center, float side, float duration)
        {
            const float y = 0f;

            var halfSide = side * 0.5f;

            var v1 = new Vector3(center.x - halfSide, y, center.z - halfSide);
            var v2 = new Vector3(center.x + halfSide, y, center.z - halfSide);
            var v3 = new Vector3(center.x + halfSide, y, center.z + halfSide);
            var v4 = new Vector3(center.x - halfSide, y, center.z + halfSide);

            Debug.DrawLine(v1, v2, color, duration);
            Debug.DrawLine(v2, v3, color, duration);
            Debug.DrawLine(v3, v4, color, duration);
            Debug.DrawLine(v4, v1, color, duration);
        }