void Awake() { // deal with the singleton part if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); initMetaHeuristic(); BatchmodeConfig.HandleArgs(this, metaengine); Random.InitState(System.DateTime.Now.Millisecond); init(); }
void Awake() { // deal with the singleton part if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); initMetaHeuristic(); BatchmodeConfig.HandleArgs(this, metaengine); Random.InitState(seed); Time.timeScale = this.Thetimescale; init(); }
//Awake is always called before any Start functions void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); scoreText.text = ""; if (restartText) { restartText.text = "1/1"; } if (gameOverText) { gameOverText.text = ""; } evolEngine = this.GetComponentInParent <EvolutionState> (); BatchmodeConfig.HandleArgs(evolEngine, this); lvl = new Level(); lvl.load(levelNumber); evolEngine.populationSize = 50; evolEngine.individualSize = lvl.calcNumberOfMoves(); evolEngine.InitPopulation(); init(); }