// Update is called once per frame void Update() { if (initialSeekAlgorithmDone) { timer += Time.deltaTime; if (timer > simulationStep) { timer = 0; currentStep++; if (currentStep == stepToFinish) { if (simulationDone == false) { simulationDone = true; //TODO: Write to file EMH.writeToFile(); EMHVictim.writeToFileVictim(); // StartCoroutine(WriteToFile()); //StartCoroutine(WriteToFileVictim()); } } } } }