""" 马儿跑起来.py 本程序需要gameturtle模块支持,安装方法 pip install gameturtle """ from gameturtle import * root = Tk() # 新建窗口 root.title('马儿跑起来_gameturtle多帧动画') cv = Canvas(bg='white') # 新建画布 cv.pack() # 铺上画布 images = [f"{i}.png" for i in range(15)] frames = [Image.open(im) for im in images] sp = Sprite(cv,frames) while 1: sp.nextshape() cv.update() # 更新画布 time.sleep(0.1) # 等待0.1秒
马儿跑起来多帧造型

发表评论