Apr 21, 2025
public float: Speed of enemy.public Transform: Target to follow.public float: Minimum distance to stop.Vector2.MoveTowards to move towards target.Time.deltaTime for frame-rate independence.Vector2.Distance to check distance to stop moving.Update function and instantiate projectile.Vector2.MoveTowards.Vector2.MoveTowards to move to patrol points.Debug.DrawLine.LineRenderer component.