示例#1
0
 public BlockGameGenerator(BlockController[,] blocks, int borderGamePole, int weightGamePole, int heightGamePole, BlocksGenerator blocksGenerator, BlockSpritesViewDescription spritesViewDescription, IDictionary <Side, Sprite> sideSprites)
 {
     _blocks                 = blocks;
     _borderGamePole         = borderGamePole;
     _weightGamePole         = weightGamePole;
     _heightGamePole         = heightGamePole;
     _blocksGenerator        = blocksGenerator;
     _spritesViewDescription = spritesViewDescription;
     _sideSprites            = sideSprites;
 }
 public BlockGameController(BlockPoolView blockPool, IDictionary <Side, Sprite> sideSprites, BlockSpritesViewDescription spritesViewDescription, BlockView previewBlock)
 {
     _blockPool                           = blockPool;
     _sideSprites                         = sideSprites;
     _spritesViewDescription              = spritesViewDescription;
     _previewBlock                        = previewBlock;
     _blocksGenerator                     = new BlocksGenerator(_blockPool, _spritesViewDescription);
     _blocksGenerator.ChangeBlockPrewiew += _blocksGenerator_ChangeBlockPrewiew;
     _blocks                  = new BlockController[_weightGamePole, _heightGamePole];
     _blockGameGenerator      = new BlockGameGenerator(_blocks, _borderGamePole, _weightGamePole, _heightGamePole, _blocksGenerator, _spritesViewDescription, _sideSprites);
     _blockGamePoleController = new BlockGamePoleController(_blocks, _weightGamePole, _heightGamePole, _borderGamePole, _blockGameGenerator);
     _destroyBlock            = new DestroyBlock(_blocksGenerator, _blocks, _blockGameGenerator, _blockPool);
     _blockStateController    = new BlockStateController(_blockGameGenerator, _blockGamePoleController, _destroyBlock);
 }
示例#3
0
 public BlocksGenerator(BlockPoolView blockPool, BlockSpritesViewDescription spritesViewDescription)
 {
     _blockPool = blockPool;
     _spritesViewDescription = spritesViewDescription;
     _blocks.Push(GenBlock());
 }