/// <summary> /// Allows the game component to perform any initialization it needs to before starting /// to run. This is where it can query for any required services and load content. /// </summary> public override void Initialize() { player = (Midi.Player)Game.Services.GetService(typeof(Midi.Player)); inputManager = (IManageInput)Game.Services.GetService(typeof(IManageInput)); splasher = (Graphics.SplashText)Game.Services.GetService(typeof(Graphics.SplashText)); Enabled = false; ((BandMaster)Game).ModeChanged += delegate (Object o, EventArgs a) { if (((BandMaster)Game).Mode == this) Helpers.Wait(2.0, ((BandMaster)Game).StartTheDance); if (applause != null) { applause.Volume = 1f; } }; ((BandMaster)Game).SongChanged += onSongChanged; ((BandMaster)Game).SongLoaded += onSongLoaded; player.Completed += onSongDone; ((BandMaster)Game).Updated += delegate() { if (applause != null) applause.Volume = applauseVolume.Value; }; base.Initialize(); }
/// <summary> /// Allows the game component to perform any initialization it needs to before starting /// to run. This is where it can query for any required services and load content. /// </summary> public override void Initialize() { input = (Input.IManageInput)Game.Services.GetService(typeof(Input.IManageInput)); splasher = (Graphics.SplashText)Game.Services.GetService(typeof(Graphics.SplashText)); audiofx = (Audio.AudioFx)Game.Services.GetService(typeof(Audio.AudioFx)); base.Initialize(); }