Beispiel #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            ConvertUnits.SetDisplayUnitToSimUnitRatio(100f);

            _spriteBatch = new SpriteBatch(GraphicsDevice);
            PlayWindow.LoadContent(GraphicsDevice);
            PlayWindow playWindow = new PlayWindow(_windowHandler);

            playWindow.Initialize();



            KinectHandler              = new KinectHandler(playWindow);
            KinectHandler.IdleRestart += KinectRestart;
            _kinectThread              = new Thread(() => KinectHandler.run());
            _kinectThread.IsBackground = true;
            _kinectThread.Start();

            WaitingWindow waitingWindow = new WaitingWindow(_windowHandler);

            waitingWindow.Initialize();
            LevelSelectWindow levelSelectWindow = new LevelSelectWindow(_windowHandler);

            levelSelectWindow.Initialize();
            ScoreWindow scoreWindow = new ScoreWindow(_windowHandler);

            _windowHandler.PlayWindow        = playWindow;
            _windowHandler.LevelSelectWindow = levelSelectWindow;
            _windowHandler.WaitingWindow     = waitingWindow;
            _windowHandler.ScoreWindow       = scoreWindow;

            _windowHandler.ChangeWindow(waitingWindow, null);
        }
Beispiel #2
0
        public KinectHandler(PlayWindow owner)
        {
            game = owner;
            game.StartingNewGame += OnNewGame;
            //kinectStrategy = (KinectStrategy)game.Player.Strategy;
            leftHandChecker  = new HandChecker(Arm.Left, JointType.HandLeft);
            rightHandChecker = new HandChecker(Arm.Right, JointType.HandRight);

            FindSensor();
        }
Beispiel #3
0
        public KinectHandler(PlayWindow owner)
        {
            game = owner;
            game.StartingNewGame += OnNewGame;
            //kinectStrategy = (KinectStrategy)game.Player.Strategy;
            leftHandChecker = new HandChecker(Arm.Left, JointType.HandLeft);
            rightHandChecker = new HandChecker(Arm.Right, JointType.HandRight);

            FindSensor();
        }
Beispiel #4
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            ConvertUnits.SetDisplayUnitToSimUnitRatio(100f);

            _spriteBatch = new SpriteBatch(GraphicsDevice);
            PlayWindow.LoadContent(GraphicsDevice);
            PlayWindow playWindow = new PlayWindow(_windowHandler);
            playWindow.Initialize();

            KinectHandler = new KinectHandler(playWindow);
            KinectHandler.IdleRestart += KinectRestart;
            _kinectThread = new Thread(() => KinectHandler.run());
            _kinectThread.IsBackground = true;
            _kinectThread.Start();

            WaitingWindow waitingWindow = new WaitingWindow(_windowHandler);
            waitingWindow.Initialize();
            LevelSelectWindow levelSelectWindow = new LevelSelectWindow(_windowHandler);
            levelSelectWindow.Initialize();
            ScoreWindow scoreWindow = new ScoreWindow(_windowHandler);

            _windowHandler.PlayWindow = playWindow;
            _windowHandler.LevelSelectWindow = levelSelectWindow;
            _windowHandler.WaitingWindow = waitingWindow;
            _windowHandler.ScoreWindow = scoreWindow;

            _windowHandler.ChangeWindow(waitingWindow, null);
        }