コード例 #1
0
ファイル: main.py プロジェクト: meagoodboy/BrickBreaker
        try:
            signal.signal(signal.SIGALRM, alarmHandler)
            signal.setitimer(signal.ITIMER_REAL, timeout)

            ballvelx, ballvely = ball.getvel()
            if ballvelx == 0 and keyinput.returninput == 'c':
                randomvar = random.choice(randvelocity)
                ball.setvel(randomvar, -1)
                grabbingoverride = 0
            dead2 = 0
            #collisionball(ball, window)
            yvariable = 0
            bossbulletpaddle = 0
            if ballvelx != 0:
                ball.ballmovement()
                px, py = paddle.getloc()
                bossitem.bossmovement(px)
                if bulletlist != None:
                    yvariable = bulletlist.bulletmovement()
                    bossbulletpaddle = collisionbulletpaddle(
                        bulletlist, paddle)
                    if bossbulletpaddle == 1:
                        dead2 = 1
                        bulletlist = None
                    if yvariable == 1:
                        bulletlist = None
                powerupmove(poweruplist, wycor - 4)
                dead = checkdead(ball, window)
                ballborder = collitionballborder(ball, window)
                ballpaddle = collisionballpaddle(ball, window, paddle)