protected override void OnNavigatedTo(NavigationEventArgs e) { // Set the sharing mode of the graphics device to turn on XNA rendering SharedGraphicsDeviceManager.Current.GraphicsDevice.SetSharingMode(true); spriteBatch = new SpriteBatch(SharedGraphicsDeviceManager.Current.GraphicsDevice); input = new DemoInput(); gamePlay.Initialize(content, input); // Start the timer timer.Start(); base.OnNavigatedTo(e); }
protected override void OnNavigatedTo(NavigationEventArgs e) { // Set the sharing mode of the graphics device to turn on XNA rendering SharedGraphicsDeviceManager.Current.GraphicsDevice.SetSharingMode(true); // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(SharedGraphicsDeviceManager.Current.GraphicsDevice); // TODO: use this.content to load your game content here input = new DemoInput(); gamePlay.Initialize(contentManager, input); // Start the timer timer.Start(); base.OnNavigatedTo(e); }
protected override void OnNavigatedTo(NavigationEventArgs e) { // Set the sharing mode of the graphics device to turn on XNA rendering SharedGraphicsDeviceManager.Current.GraphicsDevice.SetSharingMode(true); // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(SharedGraphicsDeviceManager.Current.GraphicsDevice); // TODO: use this.content to load your game content here input = new DemoInput(); gamePlay.Initialize(contentManager, input); // Start the timer timer.Start(); base.OnNavigatedTo(e); }
protected override void OnNavigatedTo(NavigationEventArgs e) { // Set the sharing mode of the graphics device to turn on XNA rendering SharedGraphicsDeviceManager.Current.GraphicsDevice.SetSharingMode(true); // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(SharedGraphicsDeviceManager.Current.GraphicsDevice); string inputType = this.NavigationContext.QueryString["Input"]; switch (inputType) { case "1": input = new ThumbstickInput(spriteBatch); break; case "2": input = new ButtonInput(spriteBatch); break; case "3": input = new GestureInput(spriteBatch); break; case "4": input = new MotionInput(spriteBatch); break; default: input = new DemoInput(); break; } input.Initialize(contentManager); gamePlay.Initialize(contentManager, input); // Start the timer timer.Start(); input.Start(); base.OnNavigatedTo(e); }
public void Initialize(ContentManager content, IGamePlayInput inputService) { IsPlaying = true; input = inputService; ground = content.Load<Model>("ground"); player = content.Load<Model>("sphere"); models[0] = content.Load<Model>("cube"); models[1] = content.Load<Model>("cone"); models[2] = content.Load<Model>("dodecahedron"); models[3] = content.Load<Model>("torus"); models[4] = content.Load<Model>("octohedron"); Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, 480.0f / 800.0f, 1.0f, 100.0f, out cameraProjection); CalculateWorlds(); CalculateView(); }
public void Initialize(ContentManager content, IGamePlayInput inputService) { IsPlaying = true; input = inputService; ground = content.Load <Model>("ground"); player = content.Load <Model>("sphere"); models[0] = content.Load <Model>("cube"); models[1] = content.Load <Model>("cone"); models[2] = content.Load <Model>("dodecahedron"); models[3] = content.Load <Model>("torus"); models[4] = content.Load <Model>("octohedron"); Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, 480.0f / 800.0f, 1.0f, 100.0f, out cameraProjection); CalculateWorlds(); CalculateView(); }
protected override void OnNavigatedTo(NavigationEventArgs e) { // Set the sharing mode of the graphics device to turn on XNA rendering SharedGraphicsDeviceManager.Current.GraphicsDevice.SetSharingMode(true); // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(SharedGraphicsDeviceManager.Current.GraphicsDevice); string inputType = this.NavigationContext.QueryString["Input"]; switch (inputType) { case "1": input = new ThumbstickInput(spriteBatch); break; case "2": input = new ButtonInput(spriteBatch); break; case "3": input = new GestureInput(spriteBatch); break; case "4": input = new MotionInput(spriteBatch); break; default: input = new DemoInput(); break; } input.Initialize(contentManager); gamePlay.Initialize(contentManager, input); // Start the timer timer.Start(); input.Start(); base.OnNavigatedTo(e); }