fix(dreamdoor): 修复星空默认开启导致变门穿帮
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -738,6 +738,8 @@ MonoBehaviour:
|
||||
blackoutFadeInDuration: 0.08
|
||||
blackoutFadeOutDuration: 0.12
|
||||
morphStartTimelineName: "\u59D0\u59D0/\u5934\u75DB"
|
||||
hideOnTerminal:
|
||||
- {fileID: 1420961917}
|
||||
--- !u!1 &450371654
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1841,7 +1843,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &1420961918
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -109,6 +109,7 @@ namespace AibisDream
|
||||
return;
|
||||
}
|
||||
|
||||
EnsureStarfieldActive();
|
||||
director.Stop();
|
||||
SetTimelineTime(0f);
|
||||
}
|
||||
@@ -120,6 +121,8 @@ namespace AibisDream
|
||||
yield break;
|
||||
}
|
||||
|
||||
EnsureStarfieldActive();
|
||||
|
||||
float startTime;
|
||||
float endTime;
|
||||
switch (attempt)
|
||||
@@ -159,6 +162,7 @@ namespace AibisDream
|
||||
yield break;
|
||||
}
|
||||
|
||||
EnsureStarfieldActive();
|
||||
director.Pause();
|
||||
SetTimelineTime(blurFadeStart);
|
||||
director.Play();
|
||||
@@ -195,9 +199,23 @@ namespace AibisDream
|
||||
return;
|
||||
}
|
||||
|
||||
// Fiction 等路径可能只 play_timeline、不走 starfield_prepare;
|
||||
// Timeline 只 key 了「海浪」的 Active,不会打开「星空」。
|
||||
if (director.state == PlayState.Playing)
|
||||
EnsureStarfieldActive();
|
||||
|
||||
ApplyAtTime((float)director.time);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 场景「星空」默认 inactive(与「海浪」一致)。演出开始时打开。
|
||||
/// </summary>
|
||||
private void EnsureStarfieldActive()
|
||||
{
|
||||
if (starfieldRenderer != null && !starfieldRenderer.gameObject.activeSelf)
|
||||
starfieldRenderer.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
private bool TryValidateReferences()
|
||||
{
|
||||
if (director == null)
|
||||
|
||||
Reference in New Issue
Block a user