猫史档案馆


【Python作品分享】熊峰的库【作品秀】

用户:一只比卡君一只比卡君查看:0 回复:0 评论:0 创建时间:2020-04-21T19:09:25


【作品展示】

center_image

 

【作品介绍】

未完成

尴尬

 

【作品源代码】

import pgzrun

WIDTH = 620
HEIGHT = 900

girl = Actor("co")
girl.pos = 300,500

hair_style = ['hair_1', 'hair_2', 'hair_3', 'hair_4']
hair = Actor("hair_1")
hair.pos = 317,469

dress_style = ['dress_1', 'dress_2', 'dress_3', 'dress_4']
dress = Actor("dress_1")
dress.pos = 313,653

shoes_style = ['shoes_1', 'shoes_2', 'shoes_3', 'shoes_4']
shoes = Actor("shoes_1")
shoes.pos = 312,780

def draw():
    screen.blit('background',(0,0))
    girl.draw()
    hair.draw()
    dress.draw()
    shoes.draw()

def changestyle(obj,styleList):
    style = styleList.index(obj.image)
    if (style < 3):
        obj.image = styleList[style+1]
    else :
        obj.image = styleList[0]

pgzrun.go()

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页