public void CreateBlock(int x, float rotation) { V2Int[] positions = tetrominoes[currentPiece].GetBlockPositions(x, TetrisSettings.SpawnY, rotation); TetrisPiece newBlock = Instantiate(tetrominoes[currentPiece]).GetComponent <TetrisPiece>(); newBlock.transform.SetParent(transform); newBlock.gameObject.SetActive(true); newBlock.Init(this, grid, agent); newBlock.SetBlockPositions(positions); }