Exemplo n.º 1
0
        private void CheckVerticalCollision()
        {
            if (!_gridManager.CheckVerticalCollision(_gridCoordinate, _blockInitializer.CurrentShape, 1))
            {
                return;
            }

            _gridManager.RegisterShape(_gridCoordinate, _blockInitializer.CurrentShape, _blockInitializer.BlockGrid);
            var destroyedRows = _gridManager.TryCollectFullRows();

            if (destroyedRows.Length != 0)
            {
                LineFullSignal.Dispatch(destroyedRows.Length);
            }
            SoundManager.PlaybackSound(SoundType.Destroy);
            SpawnManager.Spawn();
            Destroy(gameObject);
        }