static void Main(string[] args) { using (RhythmGame game = new RhythmGame()) { game.Run(); } }
public static Player TestPlayer(Player player, RhythmGame game) { Player test = player; if (test == null) { test = RhythmGame.ActivePlugin.CreatePlayer(game); test.ResetTimer(); test.UpdateOrder = 3; test.DrawOrder = 2; game.Components.Add(test); } test.Input = game.ActiveInput; game.CurrentBand.BandMembers.Clear(); game.CurrentBand.BandMembers.Add(test); return(test); }
public virtual void StartSong(RhythmGame game, GameTime gameTime, SongDataPlus dataPlus, int instrument, float difficulty) { // Get the input skin for the given instrument InputSkin inputSkin = new GuitarASDFG(game.ActiveInput, game); game.ActiveInput.UpdateOrder = 0; DrawOrder = 3; game.Components.Add(inputSkin); inputSkin.ReplaceBackground(Path.Combine(dataPlus.dirPath, "Default.png")); // Get the notes for the given song. NoteManager notes = null; switch (dataPlus.type) { case SongDataPlus.NoteType.MID: notes = new GuitarHeroManager(game, this, instrument, difficulty < 0.25 ? 0 : difficulty < 0.5 ? 1 : difficulty < 0.75 ? 2 : difficulty < 0.95 ? 3 : 4, dataPlus); break; case SongDataPlus.NoteType.GBA: notes = new UnsignedManager(game, this, (byte)(difficulty < 0.25 ? 0 : difficulty < 0.5 ? 1 : difficulty < 0.75 ? 2 : 3), dataPlus.songData); break; case SongDataPlus.NoteType.GenMID: notes = new MidiManager(game, this, instrument, difficulty, dataPlus.fullPath); break; default: throw new NotSupportedException(); } notes.UpdateOrder = 1; game.Components.Add(notes); Notes = notes; notes.StartSong(gameTime); Input = game.ActiveInput; game.Components.Add(this); }
Microsoft.Xna.Framework.Media.VideoPlayer introVideo = null; // 4.0change public RhythmGame() { graphics = new GraphicsDeviceManager(this); graphics.PreferredBackBufferHeight = 600; graphics.PreferredBackBufferWidth = 800; // btftest Content.RootDirectory = "Content"; Services.AddService(typeof(ISpriteBatchService), this); InstrumentMaster.CreateSingleton(); GameInstance = this; //this.IsFixedTimeStep = false; State = GameStateType.None; ActivePlugin = new NoPlugin(); _backgroundTimer = TimeSpan.Zero; //_videoContentManager = new VideoContentManager(Services); #if DEMO_MODE this.graphics.IsFullScreen = true; #else this.graphics.IsFullScreen = false; #endif }