using UnityEngine;

#if UNITY_EDITOR
using UnityEditor;
#endif

namespace pdinklag.CPW.Common
{
    public class JumpSpot : MonoBehaviour
    {
        [Header("The radius in which wrestlers are snapped.")]
        public float SnapRadius = 0.5f;

        [Header("The field of view in which it is possible to jump.")]
        public float JumpFOV = 180.0f;

#if UNITY_EDITOR
        private void OnDrawGizmos()
        {
            var fwd = transform.forward;
            var pos = transform.position;

            DebugExtension.DrawArrow(pos, fwd, Color.cyan);

            Handles.color = Color.cyan.WithAlpha(0.075f);
            Handles.DrawSolidDisc(pos, Vector3.up, SnapRadius);

            Handles.color = Color.cyan;
            Handles.DrawWireArc(pos, Vector3.up, fwd, JumpFOV / 2.0f, SnapRadius);
            Handles.DrawWireArc(pos, Vector3.down, fwd, JumpFOV / 2.0f, SnapRadius);
        }
#endif
    }
}
