def create_bunker(ai_settings, screen, bunkers, num_bunker): bunker = Bunker(ai_settings, screen) bunker_width = bunker.rect.width bunker.x = bunker_width + 20 bunker.rect.x = bunker.x + 2 * bunker_width * num_bunker - 50 bunker.rect.y = bunker.rect.height + 2 * bunker.rect.height + 360 bunkers.add(bunker)
def create_bunker(ai_settings, screen, bunkers, bunker_number): bunker = Bunker(ai_settings, screen) bunker_width = bunker.rect.width bunker.x = bunker_width + 2 * bunker_width * bunker_number bunker.rect.x = bunker.x bunker.rect.y = bunker.rect.height + 7 * bunker.rect.height bunkers.add(bunker)
def create_bunker_7(ai_settings, screen, bunkers, alien_number1, row_number): """Create an alien, and place it in the row.""" bunker = Bunker(ai_settings, screen) bunker_width = bunker.rect.width bunker.x = 175 + 15 * bunker_width * alien_number1 bunker.rect.x = bunker.x bunker.rect.y = 550 + 1 * bunker.rect.height * row_number bunker.add(bunkers)
def create_bunker(ai_settings, screen, bunkers, number_bunker_x): """Create a bunker and place it in the row""" bunker = Bunker(ai_settings, screen) bunker_width = bunker.rect.width - 70 # width in between the collumns bunker.x = bunker_width + 20 bunker.rect.x = bunker.x + 2 * bunker_width * number_bunker_x - 50 bunker.rect.y = bunker.rect.height + 2 * bunker.rect.height + 360 bunkers.add(bunker)
def create_bunker(ai_settings, screen, bunkers, bunker_number): bunker = Bunker(ai_settings, screen) bunker_width = bunker.rect.width + 20 bunker.x = bunker_width + 2.4 * bunker_width * bunker_number bunker.y = 500 bunker.rect.x = bunker.x bunker.rect.y = bunker.y bunkers.add(bunker)
def _create_bunker(self, bunker_number): """Create an bunker and place it in the row.""" bunker = Bunker(self) bunker_width, bunker_height = bunker.rect.size bunker.x = (bunker_width // 2) + 2 * bunker_width * bunker_number bunker.rect.x = bunker.x bunker.rect.y = int(self.settings.screen_height * 0.80) self.bunkers.add(bunker)
def disp_bunker(ai_settings, screen, bunkers, bunker_number, row_number): """Create an alien, and place it in the row.""" bunker = Bunker(ai_settings, screen) bunker_width = bunker.rect.width bunker.x = bunker_width + 2 * bunker_width * bunker_number bunker.rect.x = bunker.x - 40 bunker.rect.y = 475 bunkers.add(bunker)
def create_bunker(ai_settings, screen, bunkers, bunker_number): """Create a bunker and place it in the row""" bunker = Bunker(ai_settings, screen) bunker_width = bunker.rect.width bunker.x = bunker_width + 3.25 * bunker_width * bunker_number bunker.rect.x = bunker.x / 2 bunker.rect.y = bunker.rect.height * 4 bunkers.add(bunker)
def create_bunker(ai_settings, screen, bunkers, bunker_number, row_number): bunker = Bunker(ai_settings, screen) bunker_width = bunker.rect.width bunker.x = bunker_width + 4 * bunker_width * bunker_number bunker.rect.x = bunker.x bunker.rect.y = 450 # bunker.rect.y = bunker.rect.height + 4 * bunker.rect.height * row_number * 0.5 bunker.lives = 0 bunkers.add(bunker)
def create_bunkers(ai_settings, screen, bunkers): image = pygame.image.load('images/Bunker.png') for i in range(1, 10, 2): bunker = Bunker(ai_settings, screen, image) bunker_width = bunker.rect.width bunker.x = bunker_width bunker.rect.x = bunker.x * i bunker.rect.y = 600 bunkers.add(bunker)
def create_bunker(ai_settings, screen, alien_bullets, bunker_number, bunkers): bunker = Bunker(ai_settings, screen, alien_bullets) bunker.x = 160 + 200 * bunker_number bunker.rect.x = bunker.x bunker.rect.y = 600 bunkers.add(bunker)