示例#1
0
        public void PlayAudio()
        {
            if (Match.MatchAudioSettings.NextPlayer)
            {
                Output.Audio.Play(Sound.Tone(1, Pitch.C(6)));
            }

            if (Match.MatchAudioSettings.AngleSet)
            {
                Output.Audio.Play(Sounds.Toc);
            }

            if (Match.MatchAudioSettings.LoadingPower)
            {
                Output.Audio.Play(Sound.Chirp(1.7, new Pitch(100), new Pitch(300)));
            }

            if (Match.MatchAudioSettings.PlayerShot)
            {
                Output.Audio.Play(Sound.Sequence(
                                      Sound.Noise(0.1, new Pitch(800), new Pitch(1000)),
                                      Sound.Noise(0.1, new Pitch(500), new Pitch(700)),
                                      Sound.Noise(0.1, new Pitch(200), new Pitch(500))));
            }

            if (Match.MatchAudioSettings.PlayerWalked)
            {
                Output.Audio.Play(Sound.Noise(0.1, new Pitch(400), new Pitch(500)));
            }

            if (Match.MatchAudioSettings.CannotShot)
            {
                Output.Audio.Play(Sounds.Toc);
            }

            if (Match.MatchAudioSettings.TimerFiveSecondsToGo)
            {
                Output.Audio.Play(Sound.Chirp(0.1, Pitch.C(5), Pitch.C(6)));
            }

            if (Match.MatchAudioSettings.TimerOneSecondToGo)
            {
                Output.Audio.Play(Sound.Tone(1, Pitch.C(6)));
            }

            if (Match.MatchAudioSettings.PlayerHitGround)
            {
                Output.Audio.Play(Sounds.Toc);
            }

            if (Match.MatchAudioSettings.BulletExploded)
            {
                Output.Audio.Play(Sounds.Explosion);
            }

            if (Match.MatchAudioSettings.GrenadeExploded)
            {
                Output.Audio.Play(Sounds.Explosion);
            }
        }