马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 怀念丶落樱 于 2021-7-6 21:51 编辑
随机语句,如何转跳后不刷新?我添加了一个Jump出去,Jump回来后发现这个界面刷新了。
如何使Jump不触发刷新,点击刷新按钮才刷新?[RenPy] 纯文本查看 复制代码 screen aaa(x,y):
default a1_name = renpy.random.choice(['周一', '王二', '张三', '李四', '刘五', '赵六', '田七'])
default a1_Star = renpy.random.randint(1, 3)
if a1_Star == 1:
default a1_grade = renpy.random.randint(1, 3)
default a1_charm = renpy.random.randint(10, 30)
default a1_gold = renpy.random.randint(10, 100)
if a1_Star == 2:
default a1_grade = renpy.random.randint(4, 6)
default a1_charm = renpy.random.randint(40, 60)
default a1_gold = renpy.random.randint(200, 600)
if a1_Star == 3:
default a1_grade = renpy.random.randint(7, 10)
default a1_charm = renpy.random.randint(70, 100)
default a1_gold = renpy.random.randint(800, 1000)
frame:
pos (x,y)
vbox:
spacing 5
text "人物卡"
text "姓名:[a1_name]"
text "品阶:[a1_Star]"
textbutton "查看详细属性" action ShowTransient("bbb",transition=dissolve,name=a1_name,aa=a1_grade ,bb=a1_charm ,cc=a1_gold)
#transclude
screen bbb(name,aa,bb,cc):
tag m123
frame:
align (0.2,0.2)
vbox:
spacing 10
text "[name]:各项属性值"
text "级别:[aa]"
text "魅力:[bb]"
text "金币:[cc]"
textbutton "关闭" action Hide("bbb")
#transclude
screen ccc():
#tag m123
on "show" action Notify("已刷新人物卡")
vbox:
xpos 0.6
spacing 5
use aaa(0.8, 0.1)
use aaa(0.8, 0.5)
use aaa(0.8, 0.9)
textbutton "生成新人物卡":
pos (0.5, 0.8)
action Hide("ccc"),Show("ccc")
textbutton "转跳":
pos (0.5, 0.6)
action Jump("c10")
textbutton "退出":
pos (0.9, 0.1)
action Hide("ccc"),Jump("fff")
# 游戏在此开始。
label start:
"演示开始"
call screen ccc with dissolve
label fff:
"演示结束"
# 此处为游戏结尾。
return
label c10:
jump start
|