﻿using UnityEngine;

namespace pdinklag.CPW.Common
{
    public class TurnbucklePrefab : MonoBehaviour
    {
        [Tooltip("The object to attach the end of the corresponding rope to.")]
        public Transform RopeAttachPoint;

        [Tooltip("The point wrestlers should grab when climbing the turnbuckle.")]
        public Transform ClimbGrabPoint;

        [Tooltip("The bounds of the entire turnbuckle, including the padding.")]
        public Vector3 Bounds = new Vector3(0.5f, 0.5f, 0.5f);

        [Tooltip("The center of the bounds.")]
        public Vector3 BoundsCenter = new Vector3(0, 0, 0.25f);

#if UNITY_EDITOR
        private void OnDrawGizmosSelected()
        {
            DebugExtension.DrawPoint(transform.TransformPoint(BoundsCenter), Color.magenta, 0.125f);
            DebugExtension.DrawLocalCube(transform, Bounds, Color.magenta, BoundsCenter);
        }
#endif
    }
}
