feat: 添加全局屏幕转场面板
- 新增 ScreenTransitionPanel,支持 fade_in/out、fade_in_white、flash_white、 wipe_in/out、shutter_in/out 等多种转场效果 - 新增 Screen Transition Panel Prefab 并在 Persistence 场景挂载 - UIManager 启动时自动显示该面板 - BaseYarnCommand 新增对应的 Yarn 全局转场指令
This commit is contained in:
@@ -57,7 +57,7 @@ namespace AibisDream
|
||||
var panel = UIManager.Instance.GetPanel<PlayToolPanel>();
|
||||
return panel.FadeOutAsync(duration);
|
||||
}
|
||||
|
||||
|
||||
[YarnCommand("fade_in_sync")]
|
||||
public static void FadeInSync(float duration = 1)
|
||||
{
|
||||
@@ -72,6 +72,48 @@ namespace AibisDream
|
||||
panel.FadeOutSync(duration);
|
||||
}
|
||||
|
||||
[YarnCommand("fade_in_white")]
|
||||
public static IEnumerator FadeInWhite(float duration = 1)
|
||||
{
|
||||
var panel = UIManager.Instance.GetPanel<ScreenTransitionPanel>();
|
||||
return panel.FadeInWhiteAsync(duration);
|
||||
}
|
||||
|
||||
[YarnCommand("flash_white")]
|
||||
public static IEnumerator FlashWhite(float duration = 0.2f)
|
||||
{
|
||||
var panel = UIManager.Instance.GetPanel<ScreenTransitionPanel>();
|
||||
return panel.FlashWhite(duration);
|
||||
}
|
||||
|
||||
[YarnCommand("wipe_in")]
|
||||
public static IEnumerator WipeIn(float duration = 0.6f)
|
||||
{
|
||||
var panel = UIManager.Instance.GetPanel<ScreenTransitionPanel>();
|
||||
return panel.WipeInAsync(duration);
|
||||
}
|
||||
|
||||
[YarnCommand("wipe_out")]
|
||||
public static IEnumerator WipeOut(float duration = 0.6f)
|
||||
{
|
||||
var panel = UIManager.Instance.GetPanel<ScreenTransitionPanel>();
|
||||
return panel.WipeOutAsync(duration);
|
||||
}
|
||||
|
||||
[YarnCommand("shutter_in")]
|
||||
public static IEnumerator ShutterIn(float duration = 0.6f)
|
||||
{
|
||||
var panel = UIManager.Instance.GetPanel<ScreenTransitionPanel>();
|
||||
return panel.ShutterInAsync(duration);
|
||||
}
|
||||
|
||||
[YarnCommand("shutter_out")]
|
||||
public static IEnumerator ShutterOut(float duration = 0.6f)
|
||||
{
|
||||
var panel = UIManager.Instance.GetPanel<ScreenTransitionPanel>();
|
||||
return panel.ShutterOutAsync(duration);
|
||||
}
|
||||
|
||||
[YarnCommand("show_obj")]
|
||||
public static IEnumerator ShowObj(string picName, float duration = 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user