how can I move a player along the waypoints without using coroutiner?
void Update ()
{
if (startTime < timeMove)
{
startTime += Time.deltaTime;
//il nemico si muove
target.position = Vector3.MoveTowards(current.position, path[index+1].position, 1F);
}
else
{
//se il nemico è nella posizione del nodo incremento l'index
index += 1;
current = path[index];
timeMove = 0F;
}
}