Exemplo n.º 1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            this.Services.AddService(typeof(SpriteBatch), spriteBatch);

            // Add the screen manager component used to control the
            // flow of screens throughout the game.
            _screenManager = new ScreenManager.ScreenManager(this);
            _kinect = new Controllers.SoarKinect(this);
            this.Components.Add(_screenManager);
            this.Components.Add(_kinect);

            base.Initialize();
        }
Exemplo n.º 2
0
Arquivo: Soar.cs Projeto: boddie/Soar
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            this.Services.AddService(typeof(SpriteBatch), spriteBatch);

            // Add the screen manager component used to control the
            // flow of screens throughout the game.
            _screenManager = new ScreenManager.ScreenManager(this);
            _kinect        = new Controllers.SoarKinect(this);
            this.Components.Add(_screenManager);
            //this.Components.Add(_kinect);

            base.Initialize();
        }