[RenPy] 纯文本查看 复制代码 transform dark_in:
alpha 1.0
transform dark_out:
alpha 0.75
define speaking_ls = {}
init -1 python:
from functools import partial
def char_fade(character_name, event_name, *args, **kwargs):
if event_name == "begin":
if character_name != None:
tags = renpy.get_attributes(character_name)
at_ls = renpy.get_at_list(character_name)
if not at_ls or not tags:
return
else:
str_tags = " ".join(tags)
l = [character_name, str_tags, at_ls[0]]
speaking_ls[character_name] = l
renpy.show(character_name + " " + str_tags, at_list=[l[2], dark_in])
for x in speaking_ls.values():
if x[0] != character_name:
renpy.show(x[0] + " " + x[1], at_list=[x[2], dark_out])
if event_name == "end":
for x in speaking_ls.values():
renpy.show(x[0] + " " + x[1], at_list=[x[2], dark_out])
if speaking_ls.has_key(character_name):
speaking_ls.pop(character_name)
再修改了一下,现在不用再每段声明list,不用在意没有立绘的人物说话的问题 |