예제 #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);
        }
예제 #2
0
파일: Game1.cs 프로젝트: em-mo/sommarhack
        /// <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);
        }