/// <summary>
 /// Adds the gesture.
 /// </summary>
 /// <param name="type">The gesture type.</param>
 /// <param name="gestureDefinition">The gesture definition.</param>
 public void AddGesture(GestureType type, IRelativeGestureSegment[] gestureDefinition)
 {
     Gesture gesture = new Gesture(type, gestureDefinition);
     gesture.GestureRecognized += OnGestureRecognized;
     this.gestures.Add(gesture);
 }
示例#2
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();
        }