[RenPy] 纯文本查看 复制代码 screen objectactive(item,shopitem):
frame id "objectactive":
style "objectactive"
vbox:
if shopitem == mybag:
button:
text "使用":
color"#000000"
action[Play("sound","audio/button/objectbutton.mav"),Call('useup',item=item)]
button:
text "丢弃":
color"#000000"
action[Play("sound","audio/button/objectbutton.mav"),Call('discord',item=item,shopitem=shopitem)]
button:
text"全部丢弃":
color"#000000"
action[Play("sound","audio/button/objectbutton.mav"),Call('discordall',item=item,shopitem=shopitem)]
button:
text "售出":
color"#000000"
action [Play("sound","audio/button/objectbutton.wav"),Call('tradeout',item=item,shopitem=shopitem)]
else:
button:
text "购买":
color"#000000"
action [Play("sound","audio/button/objectbutton.wav"),Call('tradeup',item=item,shopitem=shopitem)]
label tradeup(item,shopitem):
if Dorise.gold < item.spr:
$shop_say = "你带的钱好像买不起这个呢。"
python:
mybag.replace(item,shopitem)
Dorise.gold -= item.spr
shop_say = "购买成功,欢迎再次光临。"
label tradeout(item,shopitem):
python:
shopitem.replace(item,mybag)
Dorise.gold += item.bpr
shop_say = "很不错的东西,下次欢迎再卖给我"
label useup(item):
python:
item.use(Dorise)
label discord(item,shopitem):
python:
shopitem.remove(item)
label discordall(item,shopitem):
python:
shopitem.remove(item,number=shopitem.name[item])
这是完整调用了 |