using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Enemy : MonoBehaviour
{
	[SerializeField] private Transform target;
	[SerializeField] private float moveSpeed =1f;
	
	Rigidbody myRigidBody;
	
	private void Start()
	{
		myRigidBody = GetComponent<Rigidbody>();
	}
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        transform.position = Vector3.MoveTowards(transform.position, target.position, Time.deltaTime * moveSpeed);
    }
}
