コード例 #1
0
 /// <summary>
 /// LoadContent will be called only once before drawing and it's the place to load
 /// all of your content.
 /// </summary>
 public virtual void LoadContent()
 {
     frameNumber = Kinect.FramesCount;
     content     = ScreenManager.Game.Content;
     spriteBatch = ScreenManager.SpriteBatch;
     depthTex    = new Texture2D(screenManager.GraphicsDevice, 320, 240);
     font        = content.Load <SpriteFont>("SpriteFont1");
     MediaPlayer.Stop(); // stop current audio playback
     // generate a random valid index into Albums
     voiceCommands = ScreenManager.Kinect.voiceCommands;
     if (showAvatar)
     {
         userAvatar = new UserAvatar(ScreenManager.Kinect, content, ScreenManager.GraphicsDevice, spriteBatch);
         userAvatar.LoadContent();
     }
 }
コード例 #2
0
ファイル: GameScreen.cs プロジェクト: khaledosman/TVControl
        /// <summary>
        /// LoadContent will be called only once before drawing and it's the place to load
        /// all of your content.
        /// </summary>
        public virtual void LoadContent()
        {
            frameNumber    = Kinect.FramesCount;
            content        = ScreenManager.Game.Content;
            spriteBatch    = ScreenManager.SpriteBatch;
            PrimitiveBatch = new PrimitiveBatch(ScreenManager.GraphicsDevice);
            font           = content.Load <SpriteFont>("SpriteFont1");
            //   songs = MyExtension.LoadListContent<Song>(content, "Audio\\");
            //songsarray = songs.ToArray();
            // sampleMediaLibrary = new MediaLibrary();
            random = new Random();
            //MediaPlayer.Stop(); // stop current audio playback
            // generate a random valid index into Albums
            voiceCommands = ScreenManager.Kinect.voiceCommands;
            if (showAvatar)
            {
                userAvatar = new UserAvatar(ScreenManager.Kinect, content, ScreenManager.GraphicsDevice, spriteBatch);
                userAvatar.LoadContent();
            }

            depthTex = new Texture2D(screenManager.GraphicsDevice, 320, 240);
        }
コード例 #3
0
ファイル: GameScreen.cs プロジェクト: khaledosman/TVControl
        /// <summary>
        /// LoadContent will be called only once before drawing and it's the place to load
        /// all of your content.
        /// </summary>
        public virtual void LoadContent()
        {
            frameNumber = Kinect.FramesCount;
            content = ScreenManager.Game.Content;
            spriteBatch = ScreenManager.SpriteBatch;
            PrimitiveBatch = new PrimitiveBatch(ScreenManager.GraphicsDevice);
            font = content.Load<SpriteFont>("SpriteFont1");
            //   songs = MyExtension.LoadListContent<Song>(content, "Audio\\");
            //songsarray = songs.ToArray();
            // sampleMediaLibrary = new MediaLibrary();
            random = new Random();
            //MediaPlayer.Stop(); // stop current audio playback
            // generate a random valid index into Albums
            voiceCommands = ScreenManager.Kinect.voiceCommands;
            if (showAvatar)
            {
                userAvatar = new UserAvatar(ScreenManager.Kinect, content, ScreenManager.GraphicsDevice, spriteBatch);
                userAvatar.LoadContent();
            }

            depthTex = new Texture2D(screenManager.GraphicsDevice, 320, 240);
        }