public BlockMoveController(BlockController[,] blocks, BlocksGenerator blocksGenerator, BlockGameGenerator blockGameGenerator) { _blocks = blocks; _blocksGenerator = blocksGenerator; _blockGameGenerator = blockGameGenerator; _blockGameGenerator.AddBlock += _blockGameGenerator_AddBlock; }
public DestroyBlock(BlocksGenerator blocksGenerator, BlockController[,] blocks, BlockGameGenerator blockGameGenerator, BlockPoolView blockPool) { _blocksGenerator = blocksGenerator; _blocks = blocks; _blockPool = blockPool; blockGameGenerator.AddBlock += _blockGameGenerator_AddBlock; }
public async Task <IActionResult> Create(int length = 20) { var block = BlocksGenerator.Generate(length); hostRepository.Add(block); return(Ok(block)); }
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); }
public void Start() { if (GlobalVariables.currentLevel - 1 >= levelGoalsList.Count) { interfaceManager.showTotalVictory(); } GlobalVariables.levelGoal = levelGoalsList[GlobalVariables.currentLevel - 1]; blocksGenerator = GameObject.FindGameObjectWithTag("generator").GetComponent <BlocksGenerator>(); interfaceManager = GameObject.FindGameObjectWithTag("ui").GetComponent <InterfaceManager>(); mainCamera = Camera.main.gameObject; float blockSize = blocksGenerator.blocks[0].transform.localScale.y; upStep = blockSize; blocksGenerator.gameObject.SetActive(true); blocksGenerator.StartGame(); }
public ReverseMoveController(BlockController[,] blocks, BlocksGenerator blocksGenerator, BlockGameGenerator blockGameGenerator) { _blocks = blocks; _blocksGenerator = blocksGenerator; _blockGameGenerator = blockGameGenerator; }