Ejemplo n.º 1
0
 public Game1()
 {
     graphics   = new GraphicsDeviceManager(this);
     juego      = new Marco(new Point(200, 20), avance * colAncho, avance * colAlto, 10, colBordes, colFondo);
     jugar      = new Marco(new Point(20, 20), 150, 40, 10, colBordes, colFondo);
     pausar     = new Marco(new Point(20, 90), 150, 40, 10, colBordes, colFondo);
     salir      = new Marco(new Point(20, 160), 150, 40, 10, colBordes, colFondo);
     prediccion = new Marco(new Point(20, 290), 150, 150, 10, colBordes, colFondo);
     puntuacion = new Marco(new Point(20, 530), 150, 90, 10, colBordes, colFondo);
     graphics.PreferredBackBufferHeight = juego.marco.Bottom + 10;
     graphics.PreferredBackBufferWidth  = juego.marco.Right + 10;
     graphics.ApplyChanges();
     Content.RootDirectory = "Content";
     posActual             = new Point(juego.contenedor.Location.X + (avance * ((colAncho / 2) - 1)) + (separac / 2), juego.contenedor.Location.Y + (separac / 2));
     posMuestra            = new Point(prediccion.contenedor.Center.X - (avance * 2), prediccion.contenedor.Center.Y - avance);
     altMax         = juego.contenedor.Y + (avance * 2) - (separac / 2);
     IsMouseVisible = true;
     remainingDelay = delay;
 }
Ejemplo n.º 2
0
 private void DrawMarco(Marco marco)
 {
     spriteBatch.Draw(whiteRectangle, marco.marco, marco.colBorde);
     spriteBatch.Draw(whiteRectangle, marco.contenedor, marco.colFondo);
 }