Python精灵模块的randomshape指令

所有命令 单独命令 屏幕命令 角色命令

角色命令 >> Python精灵模块的randomshape指令

简介:指定角色随机的一个造型。
例子:
from sprites import Sprite

images = ['res/cat1.png','res/cat2.png',
          'res/bat1.png','res/bat2.png'] 

j = Sprite(shape=images)
j.randomshape()

j.screen.mainloop() 

writed by lixingqiu 关注"异编程"微信公众号,获取更多关于Python精灵模块的咨讯: