private Action <Wave> GetEmitWaveBehavior(bool directional) { if (directional) { return(wave => waveController.EmitDirectionalWave(wave, direction, angle)); } else { return(wave => waveController.EmitWave(wave)); } }
/// <summary> /// Spawns a wave starting from the player's position. /// </summary> private void SpawnWaveOnPlayerPos() { waveController.EmitWave(new Wave(this.transform.position, shoutRadius, shoutSpeed, Color.white)); // play "scream" sound RuntimeManager.PlayOneShot("event:/Scream", transform.position); }