Histoire.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:RPG 作者: LugosFingite 项目源码 文件源码
def chargerpage(fichier: str):
    global histoire
    data = json.load(open("Aventures/" + histoire + "/" + fichier + ".json"))

    d = (data["desc"], pygame.Color(data["color"]))

    act = []
    for a in data["actions"]:
        act.append(Action((a["desc"], pygame.Color(a["color"])),
                          (a["cible"], a.get("histoire", histoire))))

    try:
        i = pygame.image.load_extended("Aventures/" + histoire + "/" + data["image"])
    except:
        i = None

    try:
        s = st.loadsound(data["son"], data["loop_music"])
    except:
        s = None

    return Page(d, act, i, s)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号