Skip to main content
 首页 » 编程设计

python之如何在一定时间内将物体移动到特定位置

2025年05月04日6txw1958

<分区>

def showGameFrame(): 
    count=0 
    while count != 400: 
        c.move(theFrame, 0, 10) 
        c.move(gameLabel, 0, -10) 
        playButton.place_forget() 
        quitButton.place_forget() 
        count = count+1 
    if count == 400: 
        window.after(30, showGameFrame) 
        window.after(3000, logged) 
        play1.terminate() 

我曾尝试让我的对象在一段时间内向下移动,但我现在的代码没有显示对象向下或向上 float 的动画。

我想知道是否有正确的方法可以在一定时间内将对象或图像移动到某个位置?