private void SetNextTetrimino() { if (nextTetrimino == null) nextTetrimino = CreateTetrimino(-1); tetrimino = nextTetrimino; tetrimino.Position = tetriminoStartPosition; controller.Tetrimino = tetrimino; tetrimino.Update(); if (CheckBlockCollision(tetrimino.Blocks)) { state = State.Dead; foreach (Block block in blocks) { VanishBlock vanishBlock = new VanishBlock(this, block.Model); vanishBlock.Position = block.Position; vanishBlocks.Add(vanishBlock); } } nextTetrimino = CreateTetrimino(-1); nextTetrimino.Position = nextTetriminoPosition; }
private void Reset() { nextTetrimino = null; tetrimino = null; blocks.Clear(); vanishBlocks.Clear(); SetNextTetrimino(); state = State.Play; }