指针更新
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user