指针更新

This commit is contained in:
2025-01-14 22:51:44 +08:00
parent c8a80e51a9
commit f4f0b4cf3d
4 changed files with 98 additions and 21 deletions
+9 -2
View File
@@ -30,6 +30,7 @@ namespace AibisDream
#endregion
private bool _skipLineDelay;
private Action _nextStep;
[Header("跳过阻塞延迟时间/ms")] [SerializeField]
private int delayTime = 300;
@@ -110,17 +111,23 @@ namespace AibisDream
dialogText.onTextShowed.AddListener(() => nextArray.gameObject.SetActive(true));
dialogText.onTextShowed.AddListener(() => onTextShowed?.Invoke());
dialogText.onTextShowed.AddListener(() => EnumEventSystem.Global.Send(DialogEventEnum.LineShowed));
_nextStep = nextStep;
// 执行自动跳过结局
if (isAutoSkip)
{
dialogText.onTextShowed.AddListener(() => _ = CommonUtil.Delay(200, nextStep));
dialogText.onTextShowed.AddListener(() => _ = CommonUtil.Delay(200, NextStep));
}
}
public virtual void NextStep()
{
if (_nextStep == null) return;
EnumEventSystem.Global.Send(DialogEventEnum.LineEnd);
_nextStep.Invoke();
_nextStep = null;
}
/// <summary>