/// <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) { Globals.keyboardState = Keyboard.GetState(); if (Globals.keyboardState.IsKeyDown(Keys.Escape)) { this.Exit(); } //VerifFenetre(); b1.Update(gameTime, j1, j2); b2.Update(gameTime, j1, j2); j1.Update(gameTime, b1, b2); j2.Update(gameTime, b1, b2); foreach (Brique brique in briques) { brique.VerifCollision(b1); brique.VerifCollision(b2); brique.Update(gameTime); } PointMarqué(); base.Update(gameTime); }