Esempio n. 1
0
def create_ufo(ai_settings, screen, stats, ufos):
    if random.randint(1, 8000) == 1 and len(ufos) == 0:
        ufo = UFO(ai_settings, screen)
        ufo.x = 0
        ufo.rect.x = ufo.x
        ufos.add(ufo)
        ai_settings.oscillation.play()
Esempio n. 2
0
def create_ufo(ai_settings, screen, ufos):
    ufo = UFO(ai_settings, screen)
    ufo_width = ufo.rect.width
    ufo.x = ufo_width + 2 * ufo_width
    ufo.rect.x = ufo.x
    ufo.rect.y = ufo.rect.height + 2 * ufo.rect.height
    ufos.add(ufo)
Esempio n. 3
0
def create_ufo(g_set, screen, ufos, no_ufo, row_no):
    for ufo_no in range(no_ufo):
        ufo = UFO(g_set, screen)
        ufo.x = ufo.rect.width + 2 * ufo.rect.width * ufo_no
        ufo.rect.x = ufo.x
        ufo.rect.y = ufo.rect.height + 2 * ufo.rect.height * row_no
        ufos.add(ufo)