public static AlgoRandom Instance(int numberofSpawners) { if (instance == null) { instance = new AlgoRandom(numberofSpawners); } return(instance); }
void Start() { galaxy = Galaxy.Instance; algoRandom = AlgoRandom.Instance(spawners.Length); textLevel.text = galaxy.getLevel().ToString(); textStarsDestroyed.text = galaxy.getStarsDestroyed().ToString(); textLives.text = galaxy.getLives().ToString(); setTimerDurations(galaxy.getLevel()); levelTimer = Timer.Register(levelTimerDuration, () => galaxyLevelUp(), isLooped: true); spawnTimer = Timer.Register(spawnTimerDuration, () => customUpdate(), isLooped: true); tenSecTimer = Timer.Register(10f, () => tenSecCheck(), isLooped: true); }