Esempio n. 1
0
    protected override void Update(GameTime gameTime)
    {
        inputHelper.Update(gameTime);
        gameWorld.HandleInput(gameTime, inputHelper);
        gameWorld.Update(gameTime);
        tetrisBlock.Update(gameTime);

        // tetrisBlock.FallSpeed(gameTime);
    }
Esempio n. 2
0
 public void Update(GameTime gameTime)
 {
     //spawnt nieuw random block als vorige is geplaatst
     if (useBlock.setBlock)
     {
         CheckIfFullRow();
         CheckIfGameOver();
         for (int i = 0; i < 4; i++)
         {
             CheckIfEmptyLines();
         }
         Spawn();
         useBlock  = type;
         nextblock = random.Next(0, 7);
         Spawn();
         previewBlock          = type;
         previewBlock.position = new int[2] {
             12, 3
         };
     }
     useBlock.Update(gameTime);
 }
Esempio n. 3
0
 /// <summary>
 /// Update method for the TetrisGrid.
 /// </summary>
 /// <param name="gameTime">An object with information about the time that has passed in the game.</param>
 public void Update(GameTime gameTime)
 {
     Block.Update(gameTime);
     GhostBlock.Update(gameTime, Block);
 }