Ejemplo n.º 1
0
 /// <summary>
 /// Allows the game to run logic such as updating the world,
 /// checking for collisions, gathering input, and playing audio.
 /// </summary>
 /// <param name="gameTime">Provides a snapshot of timing values.</param>
 protected override void Update(GameTime gameTime)
 {
     if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
     {
         this.Exit();
     }
     SCREEN_MANAGER.Update(gameTime);
 }
Ejemplo n.º 2
0
 public override void Update(GameTime gameTime)
 {
     angle         += 0.001f;
     cameraPosition = distance * new Vector3((float)Math.Sin(angle), 0, (float)Math.Cos(angle));
     WVP[1]         = Matrix.CreateLookAt(cameraPosition, Vector3.Zero, Vector3.UnitY);
     if (GamePad.GetState(PlayerIndex.One).Buttons.Start == ButtonState.Pressed)
     {
         SCREEN_MANAGER.goto_screen("Game");
     }
     base.Update(gameTime);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            marble   = Content.Load <Model>("sphere");
            sprBatch = new SpriteBatch(GraphicsDevice);
            SCREEN_MANAGER.add_screen(new MenuScreen(GraphicsDevice, sprBatch, ref op, ref a, ref b, ref marble));
            //SCREEN_MANAGER.add_screen(new GameScreen(GraphicsDevice, sprBatch, ref op, ref a, ref b, ref marble));
            //SCREEN_MANAGER.add_screen(new OptionScreen(GraphicsDevice));
            //SCREEN_MANAGER.add_screen(new GameScreen(GraphicsDevice));
            SCREEN_MANAGER.goto_screen("Menu");

            SCREEN_MANAGER.Init();
        }
Ejemplo n.º 4
0
 /// <summary>
 /// This is called when the game should draw itself.
 /// </summary>
 /// <param name="gameTime">Provides a snapshot of timing values.</param>
 protected override void Draw(GameTime gameTime)
 {
     SCREEN_MANAGER.Draw(gameTime);
     base.Draw(gameTime);
 }