コード例 #1
0
ファイル: main.py プロジェクト: meagoodboy/BrickBreaker
                if ballbrick:
                    print("\a")
                powerupval = powerupcollide(paddle, poweruplist)
                if powerupval != 'N':
                    # test = 9
                    activepowerups.append((powerupval, timecount))
                    check = activatepowerup(ball, paddle, powerupval)
                    if check == 5:
                        velocityoverride = 1
                    if check == 6:
                        grabbingoverride = 1

                if ballbrick != 0:
                    test = ballbrick
                if ballbrick == 2:
                    xcc, ycc = ball.getloc()
                    test = 3
                    # blastit(xcc, ycc, bricks, window)
                    bllist = [(xcc, ycc)]
                    for k in bllist:
                        lx = k[0] - 15
                        ly = k[1] - 10
                        ux = k[0] + 15
                        uy = k[1] + 10
                        for i in bricks:
                            xc, yc = i.getloc()
                            if i.bproperty == 'E' and i.health != 0:
                                bllist.append(i.getloc())
                            if xc >= lx and xc <= ux and yc >= ly and yc <= uy:
                                test = 4
                                i.health = 0