private void OnDeath() { Console.WriteLine("Player Dead!"); SetStateText("Dead"); SetHealth(health); if (running) { Console.WriteLine("Set audio volume to {0}", deadVol); player.SetVolumeAsync(deadVol); } }
private async Task <double> SetVolumeWrapper(double volume) { return(device is null ? await session.SetVolumeAsync(volume) : await device.SetVolumeAsync(volume)); }