[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.9, 0.1)
action Hide("ccc"),Jump("fff")
# 游戏在此开始。
label start:
"演示开始"
call screen ccc with dissolve
label fff:
"演示结束"
# 此处为游戏结尾。
return
|