示例#1
0
        p.draw_hero(st_co, last_y2, last_y3, last_y4, last_y5, last_y6,
                    last_y7)
        p.draw_villain(st_co, last_y8)

    if hit_flag == 1:
        for i in range(dr_bullets):
            o5.clear_dragon_bullet(dr_x[i] + 3, dr_y[i])
        dr_bullets = 0

    if st_co + x >= 2022:
        if shoot % 15 == 0:
            o5 = Features(mat, is_filled)
            dr_x[dr_bullets], dr_y[dr_bullets] = o5.draw_bullet_dragon(
                2110, last_y8)
            dr_bullets = dr_bullets + 1
            o5.clear_dragon_bullet(2110, last_y8)

    hit_flag = 0

    if st_co + x >= 2022:
        for i in range(dr_bullets):
            hit = p.dragon_hero_collision(dr_x[i], dr_y[i])
            dr_x[i], dr_y[i] = o5.draw_bullet_dragon(dr_x[i], dr_y[i])

            if hit == 1:
                p.clearhero(st_co, recent_x, recent_y, last_y2, last_y3,
                            last_y4, last_y5, last_y6, last_y7)
                hit_flag = 1
                transform = 0
                time.sleep(1.5)
                st_co = st_co - 20