public SoundGenerator() { this.config = new WavConfig(); this.config.sampleRate = WavConfig.SR_44100; this.config.channels = WavConfig.STEREO; this.config.bitsPerSample = WavConfig.BPS_16BIT; soundGenerator = new Uart2Sound(config, 2400); }
private IEnumerator SpawnAllEnemiesInWave(WavConfig waveToSpawn) { for (int Obstcount = 1; Obstcount <= waveToSpawn.GetNumberOfObstacles(); Obstcount++) { var newObstacle = Instantiate( waveToSpawn.GetObstaclePrefeb(), waveToSpawn.GetWayPoints()[0].transform.position, Quaternion.identity) as GameObject; newObstacle.GetComponent <ObstaclePathing>().settingWaveConfig(waveToSpawn); yield return(new WaitForSeconds(waveToSpawn.GetTimeBetweenSpawns())); } }
public void settingWaveConfig(WavConfig waveConfigToset) { waveConfig = waveConfigToset; }