using UnityEngine;

public class TrajectoryScreen : MonoBehaviour
{
	[SerializeField] private float _size = 1f;
	[SerializeField] private TrajectoryViewer _viewer = null;
	[SerializeField] private float _curveOffset = 0.418f;

	[SerializeField] private Transform _frame;
	[SerializeField] private Transform _border;
	[SerializeField] private Transform _screen;

	public TrajectoryViewer Viewer => _viewer;

	public void OnValidate()
	{
		_frame.transform.localScale = Vector3.one * (_size + 0.2f);
		_border.transform.localScale = Vector3.one * (_size + 0.1f);
		_screen.transform.localScale = Vector3.one * _size;

		_viewer.transform.localPosition = Vector3.down * _size * _curveOffset;

		_viewer.SetScale(_size);
	}
}
