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)
评论列表
文章目录