void Update() { if (robotReady) { Debug.Log("New Update:"); Debug.Log("Ghosts available: " + ghosts.Count); // move both GenerateRandomCommand(); // töte schlechte ghosts var particleFilter = ParticleFilter(); // töte alle ghosts out of map KillOutOfMapGhosts(); // refill ghosts weighted // refillGhosts(particleFilter); refillGhosts2(particleFilter); // abbruchbedingung // if (CheckLocations()) { Debug.Log("final!"); robot.CompareLocations(particleFilter[0].Item1.GetPosition(), particleFilter[0].Item1.GetRotation()); return; } // Debug.Log(robot.Scan()); robotReady = false; } }