通了一版
This commit is contained in:
@@ -202,6 +202,10 @@ namespace AibisDream.FixSystem
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool IsSystemOn()
|
||||
{
|
||||
return isSystemOn;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
@@ -538,11 +542,13 @@ namespace AibisDream.FixSystem
|
||||
breathingTween?.Kill();
|
||||
}
|
||||
|
||||
public void StartSystem()
|
||||
public IEnumerator StartSystem()
|
||||
{
|
||||
if (isSystemStarting) return;
|
||||
if (isSystemStarting) yield break;
|
||||
if (isSystemOn) yield break;
|
||||
isSystemStarting = true;
|
||||
StartCoroutine(SystemStartSequence());
|
||||
yield return StartCoroutine(SystemStartSequence());
|
||||
isSystemStarting = false;
|
||||
}
|
||||
|
||||
public void SetSystemPower(bool isOn)
|
||||
@@ -620,18 +626,23 @@ namespace AibisDream.FixSystem
|
||||
// 闪烁两次
|
||||
for (int i = 0; i < panelLightBlinkCount; i++)
|
||||
{
|
||||
panelLight.intensity = panelLightIntensity;
|
||||
// 渐亮
|
||||
DOTween.To(() => panelLight.intensity, x => panelLight.intensity = x, panelLightIntensity, panelLightBlinkDuration * 0.5f)
|
||||
.SetEase(Ease.InOutQuad);
|
||||
yield return new WaitForSeconds(panelLightBlinkDuration);
|
||||
panelLight.intensity = 0f;
|
||||
|
||||
// 渐暗
|
||||
DOTween.To(() => panelLight.intensity, x => panelLight.intensity = x, 0f, panelLightBlinkDuration * 0.5f)
|
||||
.SetEase(Ease.InOutQuad);
|
||||
yield return new WaitForSeconds(panelLightBlinkDuration);
|
||||
}
|
||||
// 常亮
|
||||
panelLight.intensity = panelLightIntensity;
|
||||
// 最后渐亮到常亮状态
|
||||
DOTween.To(() => panelLight.intensity, x => panelLight.intensity = x, panelLightIntensity, panelLightBlinkDuration * 0.5f)
|
||||
.SetEase(Ease.InOutQuad);
|
||||
}
|
||||
|
||||
// 5. 设置系统状态为Normal
|
||||
SetSystemPower(true); // 开启系统
|
||||
isSystemStarting = false;
|
||||
}
|
||||
|
||||
private IEnumerator SmallLightsSelfCheck()
|
||||
|
||||
Reference in New Issue
Block a user