本文整理汇总了C#中Microsoft.Xna.Framework.Audio.SoundBank.GetCue方法的典型用法代码示例。如果您正苦于以下问题:C# SoundBank.GetCue方法的具体用法?C# SoundBank.GetCue怎么用?C# SoundBank.GetCue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Xna.Framework.Audio.SoundBank
的用法示例。
在下文中一共展示了SoundBank.GetCue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
public static void Initialize()
{
audioEngine = new AudioEngine(@"Content\audio\AudioProject.xgs");
soundBank = new SoundBank(audioEngine, @"Content\audio\SoundBank.xsb");
waveBank = new WaveBank(audioEngine, @"Content\audio\WaveBank.xwb");
soundCategory = audioEngine.GetCategory("Sound");
moveLoop1 = soundBank.GetCue("move_loop_1");
moveLoop2 = soundBank.GetCue("move_loop_2");
moveLoop3 = soundBank.GetCue("move_loop_3");
}
示例2: Initialize
public void Initialize()
{
audioEngine = new AudioEngine(@"Content\Audio\FoodFightNow.xgs");
waveBank = new WaveBank(audioEngine, @"Content\Audio\Wave Bank.xwb");
soundBank = new SoundBank(audioEngine, @"Content\Audio\GameMusic.xsb");
_GameOver = soundBank.GetCue("GameOver");
_Background = soundBank.GetCue("Background");
_Background.Play();
_EndPlay = false;
_NextLevel = soundBank.GetCue("NextLevel");
_NextLevelSound = false;
_Victory = soundBank.GetCue("Victory");
_VictorySound = false;
}
示例3: FieldPong
public FieldPong()
{
graphics = new GraphicsDeviceManager(this);
content = new ContentManager(Services);
graphics.PreferredBackBufferWidth = 1024;
graphics.PreferredBackBufferHeight = 768;
graphics.MinimumPixelShaderProfile = ShaderProfile.PS_2_0;
graphics.SynchronizeWithVerticalRetrace = true;
physicsSimulator = new PhysicsSimulator(new Vector2(0));
physicsSimulator.AllowedPenetration = 0.3f;
physicsSimulator.BiasFactor = 1.0f;
Services.AddService(typeof(PhysicsSimulator), physicsSimulator);
screenManager = new ScreenManager(this);
Components.Add(screenManager);
bloomProcessor = new BloomPostProcessor(this);
Components.Add(bloomProcessor);
// Uncomment this to monitor the FPS:
//fpsCounter = new FrameRateCounter(this);
//Components.Add(fpsCounter);
audioEngine = new AudioEngine("Content\\Audio\\FieldPongAudio.xgs");
waveBank = new WaveBank(audioEngine, "Content\\Audio\\Wave Bank.xwb");
soundBank = new SoundBank(audioEngine, "Content\\Audio\\Sound Bank.xsb");
backgroundMusic = soundBank.GetCue("GameSong0010 16 Bit");
backgroundMusic.Play();
}
示例4: AudioManager
public AudioManager(MyGame game)
: base(game)
{
myGame = game;
events = new List<Event>();
game.mediator.register(this, MyEvent.C_ATTACK_BULLET_END, MyEvent.M_BITE,
MyEvent.G_NextLevel, MyEvent.G_GameOver,MyEvent.M_HIT);
audioEngine = new AudioEngine(@"Content\Audio\GameAudio.xgs");
waveBank = new WaveBank(audioEngine, @"Content\Audio\Wave Bank.xwb");
soundBank = new SoundBank(audioEngine, @"Content\Audio\Sound Bank.xsb");
trackCue = soundBank.GetCue("Cowboy");
levelCompleteCue = soundBank.GetCue("LevelComplete");
trackCue.Play();
trackCue.Pause();
}
示例5: DefenderMusic
public DefenderMusic( SoundBank sounds, AudioEngine engine ) {
mSounds = sounds;
mEngine = engine;
mMusic = sounds.GetCue( "stage_music" );
mMusicName = mMusic.Name;
mVolume = 1.0f;
mMusic.Play();
}
示例6: EffectPlayer
public EffectPlayer(AudioEngine audioEngine, TowerAudioEngine tae)
{
this.towerAudioEngine = tae;
this.audioEngine = audioEngine;
soundBank = new SoundBank(audioEngine, "Content/Effect Sound.xsb");
App.Instance.Model.AddPlayer += new EventHandler<SurfaceTower.Model.EventArguments.PlayerArgs>(OnAddPlayer);
App.Instance.Model.RemovePlayer += new EventHandler<SurfaceTower.Model.EventArguments.PlayerArgs>(OnRemovePlayer);
App.Instance.Model.NewEnemy += new EventHandler<SurfaceTower.Model.EventArguments.EnemyArgs>(OnNewEnemy);
App.Instance.Model.Tower.ZeroHealth += new EventHandler(Tower_ZeroHealth);
heartbeatCue = soundBank.GetCue("Hearbeat");
introCue = soundBank.GetCue("Intro");
introCue.Play();
firstPlayerHasJoined = false;
}
示例7: XactBgm
public XactBgm(SoundBank soundBank, WaveBank waveBank, string cueName)
{
sb = soundBank;
wb = waveBank ;
this.cueName = cueName;
cue = sb.GetCue(cueName);
}
示例8: Music
public Music(SoundBank sounds, AudioEngine engine)
{
this.sounds = sounds;
this.engine = engine;
music = sounds.GetCue("stage_music");
musicName = music.Name;
volume = 1.0f;
music.Play();
}
示例9: LoadContent
internal void LoadContent()
{
//Loads the audioengine, wavebank and soundbank
engine = new AudioEngine(@"Content/Audio/GameAudio.xgs");
sound = new SoundBank(engine, @"Content/Audio/Sound Bank.xsb");
wave = new WaveBank(engine, @"Content/Audio/Wave Bank.xwb");
trackCue = sound.GetCue(songTitle);
trackCue.Play();
}
示例10: LoadContent
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
audioEngine = new AudioEngine("Content/test.xgs");
soundBank = new SoundBank(audioEngine,"Content/Sound Bank.xsb");
waveBank = new WaveBank(audioEngine,"Content/Wave Bank.xwb");
soundBank.GetCue("ak47").Play();
}
示例11: SoundManager
private SoundManager()
{
_audioEngine = new AudioEngine("Content/Sounds/TetrisGame.xgs");
_waveBank = new WaveBank(_audioEngine, "Content/Sounds/WaveBank.xwb");
_soundBank = new SoundBank(_audioEngine, "Content/Sounds/SoundBank.xsb");
_audioEngine.Update();
_currentMusic = _soundBank.GetCue("m_Silence");
_currentMusic.Stop(AudioStopOptions.Immediate);
_currentSounds = new Cue[20];
SetMusicVolume(100);
SetSoundVolume(100);
}
示例12: LoadContent
public void LoadContent()
{
engine = new AudioEngine("Content\\Audio\\ButterflyAudio.xgs");
waveBank = new WaveBank(engine, "Content\\Audio\\Waves.xwb");
soundBank = new SoundBank(engine, "Content\\Audio\\Sounds.xsb");
BackgroundMusic = soundBank.GetCue("478503_PlayfulStrollJoyfulOboeMorganCut");
Birdsong = soundBank.GetCue("157536__juskiddink__woodland-birdsong-june");
BackgroundMusic.Play();
Birdsong.Play();
Butterfly.ButterflyTextures = new Texture2D[Enum.GetNames(typeof(Butterfly.ButterflyColors)).Length];
for (int i = 0; i < Butterfly.ButterflyTextures.Length; i++)
{
Butterfly.ButterflyTextures[i] = SingleColorTextureCreator.Create(myGame.GraphicsDevice, 256, 256, (Butterfly.ButterflyColors)(i));
}
player.LoadContent(content);
currentLevel.LoadContent(content, myGame.GraphicsDevice.Viewport);
//debug code
sb = myGame.Services.GetService(typeof(SpriteBatch)) as SpriteBatch;
}
示例13: Initialize
public override void Initialize()
{
audioEngine = new AudioEngine("Content\\InvadersAudio.xgs");
waveBank = new WaveBank(audioEngine, "Content\\Wave Bank.xwb");
soundBank = new SoundBank(audioEngine, "Content\\Sound Bank.xsb");
if (gameSong == null)
{
gameSong = soundBank.GetCue("in game");
}
if (menuSong == null)
{
menuSong = soundBank.GetCue("Menu");
}
if (deathSong == null)
{
deathSong = soundBank.GetCue("Death");
}
}
示例14: Initialize
public override void Initialize()
{
base.Initialize();
m_AudioEngine = new AudioEngine(@"Content\Audio\GameSounds.xgs");
m_WaveBank = new WaveBank(m_AudioEngine, @"Content\Audio\Wave Bank.xwb");
m_SoundBank = new SoundBank(m_AudioEngine, @"Content\Audio\Sound Bank.xsb");
m_MusicCategory = m_AudioEngine.GetCategory("Music");
m_EffectsCategory = m_AudioEngine.GetCategory("Default");
// r_Factory.SetSoundBank(m_SoundBank);
m_Music = m_SoundBank.GetCue("BGMusic");
m_Music.Play();
}
示例15: LoadContent
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
// Load the XACT data
audioEngine = new AudioEngine(@"Content\Audio\GameAudio.xgs");
waveBank = new WaveBank(audioEngine, @"Content\Audio\Wave Bank.xwb");
soundBank = new SoundBank(audioEngine, @"Content\Audio\Sound Bank.xsb");
// Start the soundtrack audio
trackCue = soundBank.GetCue("track");
trackCue.Play();
// Play the start sound
soundBank.PlayCue("start");
}