/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base. Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { LoadConfigFile(); graphics.PreferredBackBufferWidth = GameConstants.HorizontalGameResolution; graphics.PreferredBackBufferHeight = GameConstants.VerticalGameResolution; graphics.IsFullScreen = GameConstants.IsGameInFullScreen; IsMouseVisible = GameConstants.IsMouseVisible; graphics.ApplyChanges(); kinectData = new KinectData(); camera = new Camera(graphics); if (kinectData.IsKinectConnected) { try { kinectData.KinectSensor.AllFramesReady += KinectAllFramesReady; kinectData.KinectSensor.SkeletonStream.Enable(); kinectData.KinectSensor.Start(); } catch { } } mainMenu = new MainMenu(this) {IsGameInMenuMode = true}; kinectPlayer = new KinectPlayer(new Vector3(GameConstants.FirstPlatformPosition + (GameConstants.RowLength/2)*GameConstants.SpaceBetweenPlatforms,GameConstants.PlatformGroundLevel,GameConstants.BeginningOfBoardPositionZ)); platformList = new List<Platform>(); platformGenerator=new PlatformCollection(); TargetElapsedTime = TimeSpan.FromSeconds(1.0f / GameConstants.GameUpdatesPerSecond); PreparePlatformsForNewGame(); base.Initialize(); }
public void Update(KinectPlayer player) { }