马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 反对司令 于 2026-4-11 21:54 编辑
[RenPy] 纯文本查看 复制代码 ## 在splashscreen后显示主菜单时使用的转场效果。(有问题,会被鼠标点击跳过)
define config.end_splash_transition = Dissolve(2.0)
image Logo = "gui/Logo.png"
transform main_menu_intro:
alpha 0.0 # 主菜单初始状态为透明
linear 2.0 alpha 1.0 # 在2秒内变为完全不透明
transform splashscreen_Logo:
zoom 0.7
center
yalign 0.0
yoffset 430
transform logo_fade:
on show:
alpha 0.0
linear 1.0 alpha 1.0
on hide:
linear 0.5 alpha 0.0
label splashscreen:
scene expression "#ffffff"
$ renpy.pause(1.0, hard=True)
# 使用这个 transform 显示 Logo
show Logo at splashscreen_Logo, logo_fade
$ renpy.pause(2.0, hard=False)
# 隐藏 Logo,消失动画将自动执行
hide Logo
# 必须等待动画的完整时长(0.5秒),然后再返回主菜单
$ renpy.pause(0.5, hard=True)
return
define config.end_splash_transition = Dissolve(2.0)
这行溶解效果的代码是在return后执行的,有没有什么方式可以让 splashscreen 过渡到主菜单时不被鼠标左键点击中断?
|