我不知道为什么会这样。我已在其他计算机上测试过,它运行正常。这就是它的样子:
下面的代码,并不认为它在其他计算机上工作很重要。
pygame.init()
pygame.display.set_caption("Pixelites")
surface = pygame.display.set_mode((WIDTH,HEIGHT), 0, 32)
CLOCK = pygame.time.Clock()
tiles=defaultTiles(surface,WIDTH,HEIGHT)
while True:
surface.fill((0,0,0))
for event in pygame.event.get():
if event.type == MOUSEBUTTONDOWN:
pass
if event.type == QUIT:
pygame.quit()
sys.exit()
for t in tiles:
t.draw(surface)
pygame.display.update()
CLOCK.tick(1000)
答案 0 :(得分:1)
没有更新表面。糟糕。