[RenPy] 纯文本查看 复制代码
init python:
    class person:
        def __init__(self, name, employed, hp, max_hp, cl, max_cl, luoji, chenzhuo, xiaolv, qinmian, meili, haogan):
            self.name = name
            self.employed = employed
            self.hp   = hp
            self.max_hp   = max_hp
            self.cl   = cl
            self.max_cl   = max_cl
            self.luoji   = luoji
            self.chenzhuo   = chenzhuo
            self.xiaolv   = xiaolv
            self.qinmian   = qinmian
            self.meili   = meili
            self.haogan   = haogan
            self.xxx   = haogan
    p1 = person("name001", True, 5000, 5000, 100, 100, 500, 500, 500, 500, 500, 0) 
    p2 = person("name002", False, 1000, 1000, 100, 100, 150, 150, 150, 150, 300, 0) 
    p3 = person("name003", True, 5000, 5000, 100, 100, 500, 500, 500, 500, 500, 0) 
    p4 = person("name004", False, 1000, 1000, 100, 100, 150, 150, 150, 150, 300, 0) 
    p5 = person("name005", True, 5000, 5000, 100, 100, 500, 500, 500, 500, 500, 0) 
screen address_list():
    side "c br r":
        area (200, 50, 300, 1000)
        viewport id "add_l":
            draggable True
            pagekeys True
            mousewheel True
            vbox:
                if p1.employed:
                    textbutton p1.name:
                        action Call("show_inf")
                        left_padding 20
                        xfill True
                if p2.employed:
                    textbutton p2.name:
                        action Call("show_inf")
                        left_padding 20
                        xfill True
                if p3.employed:
                    textbutton p3.name:
                        action Call("show_inf")
                        left_padding 20
                        xfill True
                if p4.employed:
                    textbutton p4.name:
                        action Call("show_inf")
                        left_padding 20
                        xfill True
                if p5.employed:
                    textbutton p5.name:
                        action Call("show_inf")
                        left_padding 20
                        xfill True
        bar value XScrollValue("add_l")
        vbar value YScrollValue("add_l")
# 游戏在此开始。
label start:
    "就这么修修。。。"
    show screen address_list()
    "哎,成了!"
    # 此处为游戏结尾。
    return