无法闪烁任何屏幕。为什么不呢?
因此,我试图打动唐克,但它不起作用。你能帮忙吗?它所显示的只是黑色
import pygame,pynput
pygame.init()
width = 700
height = 700
screen = pygame.display.set_mode((width,height))
pygame.display.set_caption('generic shooter pew pew')
Tonk = pygame.image.load("TONK.png")
screen.blit(Tonk,(0,0))
run = True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
exit()
clock = pygame.time.Clock()
clock.tick(60)
so im trying to blit tonk but its not working. can you help? all it shows is black
import pygame,pynput
pygame.init()
width = 700
height = 700
screen = pygame.display.set_mode((width,height))
pygame.display.set_caption('generic shooter pew pew')
Tonk = pygame.image.load("TONK.png")
screen.blit(Tonk,(0,0))
run = True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
exit()
clock = pygame.time.Clock()
clock.tick(60)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在
中打击
循环,并添加显示更新:You need to blit in the
while
loop and add a display update too :