Exemple #1
0
        /// <summary>
        /// Constructs a new NetRumbleGame object.
        /// </summary>
        public NetRumbleGame()
        {
            // initialize the graphics device manager
            graphics = new GraphicsDeviceManager(this);

#if LINUX || MONOMAC || LINUX || WINDOWS
            graphics.PreferredBackBufferWidth  = 1280;
            graphics.PreferredBackBufferHeight = 720;
#else
            graphics.IsFullScreen = true;
#endif

            // initialize the content manager
            Content.RootDirectory = "Content";

            // initialize the gamer-services component
            //   this component enables Live sign-in functionality
            //   and updates the Gamer.SignedInGamers collection.
            Components.Add(new GamerServicesComponent(this));

            // initialize the screen manager
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            // initialize the audio system
            //AudioManager.Initialize(this, new DirectoryInfo(Content.RootDirectory + @"\audio\wav"));
            AudioManager.Initialize(this, new DirectoryInfo(Path.Combine(Content.RootDirectory, @"Audio/wav")));
        }
        /// <summary>
        /// Constructs a new NetRumbleGame object.
        /// </summary>
        public NetRumbleGame()
        {
            // initialize the graphics device manager
            graphics = new GraphicsDeviceManager(this);

            graphics.PreferredBackBufferWidth  = 1280;
            graphics.PreferredBackBufferHeight = 720;

            // initialize the content manager
            Content.RootDirectory = "Content";

            // initialize the gamer-services component
            //   this component enables Live sign-in functionality
            //   and updates the Gamer.SignedInGamers collection.
            Components.Add(new GamerServicesComponent(this));

            // initialize the screen manager
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            // initialize the audio system
            AudioManager.Initialize(this, new DirectoryInfo(Content.RootDirectory + @"\audio\wav"));
        }