using UnityEngine;
public class Enemy : MonoBehaviour {
public float speed = 10f;
private Transform target;
private int wavepointIndex = 0;
void start ()
{
target = WAyPoints.points[0];
}
void update ()
{
Vector3 dir = target.position - transform.position;
transform.Translate(dir.normalized * speed * Time.deltaTime, Space.World);
}
}