马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
当我想遍历字典用键作为类名引用类的信息时就会得到这个错误
[RenPy] 纯文本查看 复制代码 screen shop(shopitem):
tag menu
frame id "shoptitle":
style "shoptitle"
text "商店" :
size 30
outlines[()]
frame:
xalign 0.1
add "images/parter/laoban.png"
viewport id "shopobject":
grid 1 len(shopitem.name):
for object in shopitem.name:
imagebutton:
idle object.img
hover object.img
action [Play("sound","audio/objectbutton.wav"),Show("objectactive([object],[shopitem.name])")]
text "x”+[shopitem.name(object)]
frame:
align (1,0.4)
text "[Dorise.gold]"
style shoptitle:
xysize (100,60)
align(0.6,0.4)
background Frame("gui/overlay/shoptitle.png")
style shopobject:
xysize (300,400)
align(0.6,0.5)
background Frame("gui/overlay/shopobject.png")
style objectuser:
xysize (300,200)
align(0.2,0.4)
background Frame("gui/overlay/objectuser.png")
[RenPy] 纯文本查看 复制代码 #物品(姓名,图片路径,效果,买价=bpr,售价=spr,介绍)
#(name,img,user,bpr,spr,intr)
define blackbread = objects(name_1,bmp_1,catejory_1,user_1,intr_1,bpr=5,spr=10)
#buff列表
define buff.item = [
"yanger"
]
#(name,img,intr,attibute)
#创建商店
define store_items = Inventory("store_items")
define my_bag = Inventory("my_bag")
#库列表Inventory
init -1 python:
store_items.add("blackbread",number=1)
store_items.add("blackbread",number=1)
init -3 python:
#(name,img,user,bpr,spr,intr="")
#物品(姓名,图片路径,效果,买价=bpr,售价=spr,介绍)
name_1 = "黑面包"
bmp_1 = "blackbread.png"
catejory_1 = "食物"
user_1 = dict(physical=5)
intr_1 = "可以食用的黑面包"
|