protected override void Update(GameTime gameTime) { inputHelper.Update(gameTime); gameWorld.HandleInput(gameTime, inputHelper); gameWorld.Update(gameTime); tetrisBlock.Update(gameTime); // tetrisBlock.FallSpeed(gameTime); }
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); }
/// <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); }