Пример #1
0
def spawnGoodBlock(spawnCount,playerX,playerY,playerW,playerH):
    for i in range(spawnCount):
        gBlock = goodBlock(colors.BLACK, goodBlockWidth, goodBlockHeight)
        list = getSpawnCoordinates.generateCoords(playerX, playerY, playerW, playerH,goodBlockWidth,goodBlockHeight)
        gBlock.rect.x = list[len(list)-2]
        gBlock.rect.y = list[len(list)-1]

        # Add the block to the list of objects
        Lists.Good_block_list.add(gBlock)
        Lists.all_sprites_list.add(gBlock)
Пример #2
0
def spawnFourSquare(spawnCount,playerX,playerY,playerW,playerH,color):
    for i in range(spawnCount):
        enemyFourSquare = fourSquare(color, fourSquareWidth, fourSquareHeight)
        list = getSpawnCoordinates.generateCoords(playerX, playerY, playerW, playerH, fourSquareWidth, fourSquareHeight)

        enemyFourSquare.rect.x = list[len(list)-2]
        enemyFourSquare.rect.y = list[len(list)-1]

        if constants.activeMode == 2:
            if color == colors.BLUE:
                Lists.blue_fourSquare_list.add(enemyFourSquare)
            else:
                Lists.red_fourSquare_list.add(enemyFourSquare)
        Lists.all_sprites_list.add(enemyFourSquare)
        Lists.fourSquare_list.add(enemyFourSquare)
Пример #3
0
def spawnFatty(spawnCount,playerX,playerY,playerW,playerH,color):
    for i in range(spawnCount):
        enemyFatty = fatty(color, fattyWidth, fattyHeight)
        list = getSpawnCoordinates.generateCoords(playerX, playerY, playerW, playerH,fattyWidth,fattyHeight)

        enemyFatty.rect.x = list[len(list)-2]
        enemyFatty.rect.y = list[len(list)-1]


        if constants.activeMode == 2:
            if color == colors.BLUE:
                Lists.bluefatty_list.add(enemyFatty)
            else:
                Lists.redfatty_list.add(enemyFatty)
        Lists.all_sprites_list.add(enemyFatty)
        Lists.fatty_list.add(enemyFatty)
Пример #4
0
def spawnTriangleUD(spawnCount,playerX,playerY,playerW,playerH,triangleMaxSpeed,color):
    # creates triangle enemies
    for i in range(spawnCount):
        triangle_enemy = triangleUD(color, triangleMaxSpeed)

        list = getSpawnCoordinates.generateCoords(playerX, playerY, playerW, playerH,triangleWidth,triangleHeight)
        triangle_enemy.rect.x = list[len(list)-2]
        triangle_enemy.rect.y = list[len(list)-1]

        if constants.activeMode != 2:
            Lists.Enemy_list.add(triangle_enemy)
        else:
            if color == colors.BLUE:
                Lists.Blue_Enemy_list.add(triangle_enemy)
            else:
                Lists.Red_Enemy_list.add(triangle_enemy)
        Lists.all_sprites_list.add(triangle_enemy)
        Lists.triangle_list.add(triangle_enemy)
Пример #5
0
def spawnBadBlock(spawnCount,playerX,playerY,playerW,playerH,color):
    for i in range(spawnCount):
        enemyBlock = badBlock(color, block.blockWidth, block.blockHeight)
        list = getSpawnCoordinates.generateCoords(playerX, playerY, playerW, playerH, badBlockWidth, badBlockHeight)

        enemyBlock.rect.x = list[len(list)-2]
        enemyBlock.rect.y = list[len(list)-1]

        # Add the block to the list of objects
        if constants.activeMode != 2:
            Lists.Enemy_list.add(enemyBlock)
        else:
            if color == colors.BLUE:
                Lists.Blue_Enemy_list.add(enemyBlock)
            else:
                Lists.Red_Enemy_list.add(enemyBlock)
        Lists.all_sprites_list.add(enemyBlock)
        Lists.Bad_block_list.add(enemyBlock)
Пример #6
0
def spawnfastCircle(spawnCount,playerX,playerY,playerW,playerH,color):
    for i in range(spawnCount):
        enemyCircle = fastCircle(color, circleWidth, circleHeight, circleMaxSpeed)
        list = getSpawnCoordinates.generateCoords(playerX, playerY, playerW, playerH,circleWidth,circleHeight)

        enemyCircle.rect.x = list[len(list)-2]
        enemyCircle.rect.y = list[len(list)-1]

        if constants.activeMode != 2:
            Lists.Enemy_list.add(enemyCircle)
        else:
            if color == colors.BLUE:
                Lists.Blue_Enemy_list.add(enemyCircle)
            else:
                Lists.Red_Enemy_list.add(enemyCircle)
        Lists.all_sprites_list.add(enemyCircle)

        Lists.circle_list.add(enemyCircle)
Пример #7
0
def spawnStraffer(spawnCount,playerX,playerY,playerW,playerH,color):
    for i in range(spawnCount):
        enemyStraffer = straffer(color, strafferWidth, strafferHeight)
        list = getSpawnCoordinates.generateCoords(playerX, playerY, playerW, playerH,strafferWidth,strafferHeight)

        enemyStraffer.rect.x = list[len(list)-2]
        enemyStraffer.rect.y = list[len(list)-1]


        if constants.activeMode == 2:
            if color == colors.BLUE:
                Lists.bluestraffer_list.add(enemyStraffer)
                Lists.Blue_Enemy_list.add(enemyStraffer)
            else:
                Lists.redstraffer_list.add(enemyStraffer)
                Lists.Red_Enemy_list.add(enemyStraffer)

        Lists.straffer_list.add(enemyStraffer)
        Lists.all_sprites_list.add(enemyStraffer)
        Lists.Enemy_list.add(enemyStraffer)
Пример #8
0
def spawnHunterStraffer(spawnCount,playerX,playerY,playerW,playerH,color):
    for i in range(spawnCount):
        enemyStraffer = hunterStraffer(color, strafferWidth, strafferHeight)
        list = getSpawnCoordinates.generateCoords(playerX, playerY, playerW, playerH,strafferWidth,strafferHeight)

        enemyStraffer.rect.x = list[len(list)-2]
        enemyStraffer.rect.y = list[len(list)-1]

        # Add the block to the list of objects
        if constants.activeMode == 2:
            if color == colors.BLUE:
                Lists.bluestraffer_list.add(enemyStraffer)
                Lists.Blue_Enemy_list.add(enemyStraffer)
            else:
                Lists.redstraffer_list.add(enemyStraffer)
                Lists.Red_Enemy_list.add(enemyStraffer)

        Lists.straffer_list.add(enemyStraffer)
        Lists.all_sprites_list.add(enemyStraffer)
        Lists.Enemy_list.add(enemyStraffer)
        # add to the circle list to get the hunt behavior
        Lists.circle_list.add(enemyStraffer)