# ボールの次のフレームの動作 for ball in balls: ball.ballMove() ball.decideBallPosition(pygame.key.get_pressed(), screen.getSize() ) #print balls[0].getBallrect() # ボールとバーが衝突した際の動作 for ball in balls: mediator.judgeConflictBallAndBar( ball, barRight ) mediator.judgeConflictBallAndBar( ball, barLeft ) # ボールの射出間隔調整 biggest = choiceBiggestShootTiming(balls) if biggest != None: biggest.shootTimingIncliment() # キーが押されたときバーを移動 barLeft.moveAs2Key( pygame.key.get_pressed()) # 表示 screen.displayFill( white ) for ball in balls: screen.displayBlit( ball.getObj(), ball.getBallrect() ) screen.displayBlit( barRight.getObj(), barRight.getRect() ) screen.displayBlit( barLeft.getObj(), barLeft.getRect() ) pygame.display.flip()