I've seen other pages like this, but the answers were made to their code, and I am not understanding it, the error says:
(我看过其他类似的页面,但是答案是对他们的代码的,但我不理解,错误提示:)
TypeError: argument 1 must be pygame.Surface, not list
(TypeError:参数1必须是pygame.Surface,而不是list)
Here is the code:
(这是代码:)
def get_mask(self):
return pygame.mask.from_surface(self.img)
def draw_window(win, block):
win.blit(BG_IMG, (0, 0))
block.draw(win)
pygame.display.update()
def main():
block = Block(200,200)
win = pygame.display.set_mode((WIN_WIDTH, WIN_HEIGHT))
run = True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
draw_window(win, block)
pygame.quit()
quit()
main()
So if you have an answer, please tell!
(因此,如果您有答案,请告诉!)
ask by masmohr translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…