【发布时间】:2014-01-15 20:00:39
【问题描述】:
for plusOneFrames in range(0, 25):
xxUL = xxUL + 0
yyUL = yyUL - 5
myText = screen.create_text( xxUL, yyUL, text = "+1", font = "Arial 25", fill = "black" )
screen.update()
sleep(0.05)
screen.delete( myText )
screen.delete( myText )
所以基本上,每当用户点击时,它就会使 +1 浮动,但每当一个上升并且我再次点击时,已经上升的 +1 会停在它的位置并就在那里。如果我再次单击它会执行相同的操作,直到出现数百个。我怎样才能让它永远不会停止动画,即使它全部在一个 for 循环中?
【问题讨论】:
-
请发Minimal, Complete, Valid Example,而不是随机的代码片段。