using UnityEngine;

namespace Assets.Scripts
{
    public class Player : MonoBehaviour
    {
        private Transform _pos;

        void Start()
        {
            _pos = GetComponent<Transform>();
        }

        void Update()
        {
            var newPos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
            newPos.z = 0;

            _pos.position = Vector3.Lerp(_pos.position, newPos, 10 * Time.deltaTime);
        }
    }
}