//When a bot die public override void NeuralBotDestroyed(Brain neuralBot) { var b = neuralBot.GetComponent <NeuralRacket>().currentPongManager; var fitness = b.score2 - b.score1; neuralBot.AddFitness(fitness); base.NeuralBotDestroyed(neuralBot); Destroy(neuralBot.gameObject); index--; if (index <= 0) { Save(); population = Mendelization(); generation++; StartCoroutine(InstantiateBotCoroutine()); } }