/// <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); }