def setPlayerBlock(x, y, width, height): posX = x posY = y block = Obstacle(posX, posY) block.setImg('block.bmp') block.setSize(width, height) block.setShape(x, y, width, height) return block
def setPlayerBlock(x, y, width, height): posX = x posY = y block = Obstacle(posX, posY) block.setImg('block.bmp') block.setSize(width, height) block.setShape(x, y, width, height) return block
def setBlocksRand(blocks, screenWidth, screenHeight, width, height, num): for x in range(num): posX = randint(100, screenWidth) posY = randint(0, screenHeight) block = Obstacle(posX, posY) block.setImg('block.bmp') block.setSize(width, height) block.setShape(block.x, block.y, width, height) blocks.append(block)
def setBlocks(blocks, width, height, num): posX = 0 posY = 0 for x in range(num): block = Obstacle(posX, posY) block.setImg('block.bmp') block.setSize(width, height) block.setShape(block.x, block.y, width, height) blocks.append(block) posX += 60
def setBlocksRand(blocks, screenWidth, screenHeight, width, height, num): for x in range(num): posX = randint(100, screenWidth) posY = randint(0, screenHeight) block = Obstacle(posX, posY) block.setImg('block.bmp') block.setSize(width, height) block.setShape(block.x, block.y, width, height) blocks.append(block)
def setBlocks(blocks, width, height, num): posX = 0 posY = 0 for x in range(num): block = Obstacle(posX, posY) block.setImg('block.bmp') block.setSize(width, height) block.setShape(block.x, block.y, width, height) blocks.append(block) posX += 60