private void Idle() { actionTimer -= Time.deltaTime; if (actionTimer < 0) { float distance = path.GetDistance(previousIndex, pathIndex); actionTimer = actionDuration = distance / speed; state = MOVING; } }