song -接小球游戏1

import pygame
# 初始化
pygame.init()
# play 玩   dis 分开 美术馆   展览展示
ping_mu = pygame.display.set_mode((600,500))
# 设置标题
pygame.display.set_caption("Minecraft")
ballx = 300
while 1>0:
    # 鼠标//键盘
    for caozuo in pygame.event.get():
        print(caozuo)
        if caozuo.type == pygame.QUIT:
            pygame.quit()

    ping_mu.fill((5,3,1))

    # 小球:draw.circle(屏幕,颜色(r,g,b),坐标(x,y),半径)
    pygame.draw.circle(ping_mu,(155,20,50),(ballx,250),25)
    
    ballx=ballx+1

    # 刷新
    pygame.display.update()





猜你喜欢

转载自blog.csdn.net/houlaos/article/details/106981938