TypeError:参数1必须是pygame.Surface,而不是property

时间:2018-05-22 01:56:27

标签: python pygame pygame-surface

window.blit(terrain, (Globals.camera_x, Globals.camera_y))

继续给我这个错误。

  

" window.blit(terrain,(Globals.camera_x,Globals.camera_y))   TypeError:参数1必须是pygame.Surface,而不是属性"

tiles[tiles.index(tiles)] = (pos, tile[1])  # Save to tile list

# Create Terrain
terrain = pygame.Surface(map_size, pygame.HWSURFACE)

for tile in tiles:
    if tile[1] in Tiles.Texure_Tags:
        Map_Engine.add_tile(Tiles.Texure_Tags[tile[1]], tile[0], terrain)

return terrain

0 个答案:

没有答案