using UnityEngine;

public class DarkHazeSquirm : MonoBehaviour 
{
    public float Speed = 0.5f;
    private Vector3 target;
	
	void Update () 
	{
        Vector3 delta = (target - transform.localPosition);
        if (delta.magnitude < 0.1)
            ChooseNewTarget();
        else
            transform.localPosition += delta.normalized * Speed * Time.deltaTime;
	}

    private void ChooseNewTarget()
    {
        target = Random.insideUnitCircle;
    }
}
