Example #1
0
        /// <summary>
        /// Creates a new instance of ScreenManager.
        /// </summary>
        public ScreenManager(Microsoft.Xna.Framework.Game game, Kinect kinect)
            : base(game)
        {
            this.Kinect = kinect;

            base.Initialize();
        }
Example #2
0
 public void Initialize(string Path, Kinect kinect, Vector2 Position)
 {
     texturePath = Path;
     this.kinect = kinect;
     position = Position;
     textureBoundsSet = false;
     hoverColor = new Color(255, 255, 255, 220);
 }
Example #3
0
 public void Initialize(string Path, Kinect kinect, Vector2 Position, int buttonWidth, int buttonHeight)
 {
     texturePath = Path;
     this.kinect = kinect;
     position = Position;
     textureWidth = buttonWidth;
     textureHeight = buttonHeight;
     textureBoundsSet = true;
     hoverColor = new Color(255, 255, 255, 220);
 }
Example #4
0
 /// <summary>
 /// Class constructor for 1 player mode.
 /// </summary>
 /// <remarks>
 /// </remarks>
 public UserAvatar(Kinect kinect, ContentManager content, GraphicsDevice graphicsDevice, SpriteBatch spriteBatch)
 {
     this.kinect =  kinect;
     this.graphics = graphicsDevice;
     screenWidth = graphics.Viewport.Width;
     screenHeight = graphics.Viewport.Height;
     this.spriteBatch = spriteBatch;
     this.content = content;
     allAvatars = new Texture2D[4];
 }
Example #5
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     graphics.PreferredBackBufferWidth = 1280;
     graphics.PreferredBackBufferHeight = 720;
     graphics.IsFullScreen = true;
     Content.RootDirectory = "Content";
     Kinect = new Kinect(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight);
     screenManager = new ScreenManager(this, Kinect);
     Components.Add(screenManager);
 }
Example #6
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     graphics.PreferredBackBufferWidth = Constants.screenWidth;
     graphics.PreferredBackBufferHeight = Constants.screenHeight;
     graphics.PreferMultiSampling = true;
     graphics.IsFullScreen = false;
     Content.RootDirectory = "Content";
     Kinect = new Kinect();
     screenManager = new ScreenManager(this, Kinect);
     Components.Add(screenManager);
     Components.Add(new DebugComponent(this));
 }
Example #7
0
 public override void LoadContent()
 {
     kinect = ScreenManager.Kinect;
     gesture = kinect.Gesture;
     content = ScreenManager.Game.Content;
     graphics = ScreenManager.GraphicsDevice;
     spriteBatch = ScreenManager.SpriteBatch;
     screenHeight = graphics.Viewport.Height;
     screenWidth = graphics.Viewport.Width;
     gradientTexture = content.Load<Texture2D>("Textures/gradientTexture");
     font = content.Load<SpriteFont>("SpriteFont1");
     font2 = content.Load<SpriteFont>("Fontopo");
     //font2.LineSpacing = 21;
     hand.LoadContent(content);
     button.LoadContent(content);
     textToDraw = WrapText(font2, text, 9000);
     base.LoadContent();
 }
Example #8
0
 public void Initialize(Kinect kinect)
 {
     this.kinect = kinect;
 }
Example #9
0
 public override void LoadContent()
 {
     kinect = ScreenManager.Kinect;
     gesture = kinect.Gesture;
     base.LoadContent();
 }
Example #10
0
        public override void LoadContent()
        {
            kinect = ScreenManager.Kinect;
            gesture = kinect.Gesture;
            content = ScreenManager.Game.Content;
            graphics = ScreenManager.GraphicsDevice;
            spriteBatch = ScreenManager.SpriteBatch;
            screenHeight = graphics.Viewport.Height;
            screenWidth = graphics.Viewport.Width;
            gradientTexture = content.Load<Texture2D>("Textures/gradientTexture");
            font = content.Load<SpriteFont>("SpriteFont1");
            font2 = content.Load<SpriteFont>("Fontopo");
            videos[0] = content.Load<Video>("Videos/1");
            videos[1] = content.Load<Video>("Videos/2");
            videos[2] = content.Load<Video>("Videos/3");
            videos[3] = content.Load<Video>("Videos/4");
            //    videos[4] = content.Load<Video>("Videos/5");
            //video = content.Load<Video>("Videos\\Wildlife");
            players = new VideoPlayer[4];
            for (int i = 0; i < players.Length; i++)
            {
                players[i] = new VideoPlayer();
                players[i].IsLooped = true;
                players[i].Play(videos[i]);
                players[i].Pause();
                players[i].IsMuted = true;
            }
            currentPlayer = players[0];
            currentPlayer.Resume();
            //font2.LineSpacing = 21;
            //hand.LoadContent(content);
            //button.LoadContent(content);
            //textToDraw = WrapText(font2, text, 9000);

            leftArcTex = content.Load<Texture2D>("Textures/Left Arc");
            rightArcTex = content.Load<Texture2D>("Textures/Right Arc");
            arrowTex = content.Load<Texture2D>("Textures/Arrow");

            whitePixel = new Texture2D(graphics, 1, 1);
            whitePixel.SetData(new[] { Color.White });
            if(kinect.gestureController!=null)
            joinZoom = kinect.gestureController.gestures.Find(g => g.type == GestureType.JoinedZoom);

            base.LoadContent();
        }