当前位置: 首页>>代码示例>>C#>>正文


C# Cue.SetVariable方法代码示例

本文整理汇总了C#中Microsoft.Xna.Framework.Audio.Cue.SetVariable方法的典型用法代码示例。如果您正苦于以下问题:C# Cue.SetVariable方法的具体用法?C# Cue.SetVariable怎么用?C# Cue.SetVariable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.Xna.Framework.Audio.Cue的用法示例。


在下文中一共展示了Cue.SetVariable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Player

        public Player(Game1 game, Vector3 p, float s)
            : base(game)
        {
            this.game = game;
            MAX_SPEED = 10;
            theModel = game.Content.Load<Model>("Models\\Player\\ship");
            player_position = p;
            scale = s;

            funnelSmokePlume = new SmokePlumeParticleSystem(game, game.Content);
            funnelSmokePlume.DrawOrder=4;
            game.Components.Add(funnelSmokePlume);

            explosion = new ExplosionParticleSystem(game, game.Content);
            explosion.DrawOrder = 4;

            explosionSmoke = new ExplosionSmokeParticleSystem(game, game.Content);
            explosionSmoke.DrawOrder = 4;

            playerSfx = game.getSoundPlayer();
            trainSoundCue =  playerSfx.getCue("trainsSound");
            playerSfx.playCue(trainSoundCue);
            trainSoundCue.SetVariable("TrainSpeed", 0);
        }
开发者ID:ewencluley,项目名称:Space1939,代码行数:24,代码来源:Player.cs

示例2: StartAllSound

        ///<summary>
        ///Start all tank engine sounds.
        ///</summary>
        public void StartAllSound()
        {
            if (_engineCue != null && !_engineCue.IsStopped)
            {
                _engineCue.Stop(AudioStopOptions.Immediate);
            }

            _engineCue = Program.SoundBank.GetCue("tankEngine");
            _engineCue.SetVariable("EngineSpeed", 0.0f);
            _engineCue.SetVariable("AngularSpeed", 0.0f);
            _engineCue.Play();
        }
开发者ID:funkjunky,项目名称:Raven,代码行数:15,代码来源:EngineAudioComponent.cs

示例3: LoadSounds

        public static void LoadSounds(ContentManager content)
        {
            _audioEngine = new AudioEngine(content.RootDirectory + "//BomberbroAudio.xgs");
            _waveBankTheme = new WaveBank(_audioEngine, content.RootDirectory + "//Theme.xwb");
            _soundBankTheme = new SoundBank(_audioEngine, content.RootDirectory + "//Theme.xsb");
            _waveBankSoundEffect = new WaveBank(_audioEngine, content.RootDirectory + "//SoundEffects.xwb");
            _soundBankSoundEffect = new SoundBank(_audioEngine, content.RootDirectory + "//SoundEffect.xsb");

            _currentSong = _soundBankTheme.GetCue("Theme");
            _explosion2 = _soundBankSoundEffect.GetCue("Explosion 2");
            _cancel1 = _soundBankSoundEffect.GetCue("Cancel 1");
            _cancel2 = _soundBankSoundEffect.GetCue("Cancel 2");
            _collision1 = _soundBankSoundEffect.GetCue("Collision 1");
            _collision2 = _soundBankSoundEffect.GetCue("Collision 2");
            _completeDead = _soundBankSoundEffect.GetCue("Complete-Dead");
            _explosion1 = _soundBankSoundEffect.GetCue("Explosion 1");
            _hit = _soundBankSoundEffect.GetCue("Hit");
            _marioCoin = _soundBankSoundEffect.GetCue("Mario Coin");
            _randomMelody1 = _soundBankSoundEffect.GetCue("Random Melody 1");
            _randomMelody2 = _soundBankSoundEffect.GetCue("Random Melody 2");
            _sfx1 = _soundBankSoundEffect.GetCue("SFX1");
            _thumbMove1 = _soundBankSoundEffect.GetCue("ThumbMove 1");

            MusicVolume = 0.5f;
            MusicPitch = 0.5f;
            _audioEngine.GetCategory("Music").SetVolume(_musicVolume);
            _currentSong.SetVariable("Pitch", _musicPitch);
        }
开发者ID:faysalsultan,项目名称:Bomberbro,代码行数:28,代码来源:BombermanSound.cs


注:本文中的Microsoft.Xna.Framework.Audio.Cue.SetVariable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。