【发布时间】:2020-04-22 21:14:04
【问题描述】:
我想出了一个问题,然后我尝试将多个图像放在屏幕上,只有最新的图像才会显示。
AntiAirMissleLauncherRed(200,-200)
InfantryRed(-200,200)
JeepRed(-200,-200)
我在每个图像中放置了不同的坐标,因此它们应该出现在屏幕上的不同位置。然而海龟只是移动到下一个位置而不是打印图像。 The last Image
这是我用来使图像出现在屏幕上的代码:
def InfantryRed(x,y):
turtle.penup()
turtle.goto(x,y)
turtle.pendown()
RedInfantry = "C:\\Users\\User\\Desktop\\a level computer science\\Coursework\\Week\\Red team\\InfantryRedV20.gif"
screen.addshape(RedInfantry)
turtle.shape(RedInfantry)
当单独打印这些图像时,它们中的每一个都会显示,但是当尝试在同一屏幕上打印多个图像时它不起作用。
【问题讨论】:
标签: python image turtle-graphics