fix: Previous/Next走对woman步进 + 开场动画支持重复播放

- PreviousStep/NextStep: woman自由步进优先于Config路径
- UpdateTouchVisibility: 修正索引 i==step (之前错误地用step-1)
- PlayOpeningFlow: 每次调用前重置man/man2/摄像机状态,支持返回重来
- PageController: 移除InitializeFromGameManager调用,不再覆盖woman步进
This commit is contained in:
yangbear
2026-06-30 14:47:51 +08:00
parent 2df79866d0
commit 3ebe010dfd
3 changed files with 34 additions and 7 deletions
+16 -3
View File
@@ -124,14 +124,18 @@ public class StepManager : MonoBehaviour
public void NextStep()
{
if (_activeSteps == null) { WomanStepNext(); return; }
// Woman 自由步进优先
if (_womanObject != null && _womanPositions != null) { WomanStepNext(); return; }
if (_activeSteps == null) return;
if (_currentStepIndex >= _activeSteps.Length - 1) { CompleteExperiment(); return; }
GoToStep(_currentStepIndex + 1);
}
public void PreviousStep()
{
if (_activeSteps == null) { WomanStepPrevious(); return; }
// Woman 自由步进优先
if (_womanObject != null && _womanPositions != null) { WomanStepPrevious(); return; }
if (_activeSteps == null) return;
if (_currentStepIndex <= 0) return;
GoToStep(_currentStepIndex - 1);
}
@@ -221,7 +225,16 @@ public class StepManager : MonoBehaviour
private void UpdateTouchVisibility(int step)
{
if (_touchPoints == null) return;
for (int i = 0; i < _touchPoints.Length; i++) _touchPoints[i].SetActive(i == step - 1);
for (int i = 0; i < _touchPoints.Length; i++)
{
bool show = (i == step);
_touchPoints[i].SetActive(show);
if (show)
{
var mr = _touchPoints[i].GetComponent<MeshRenderer>();
if (mr != null) mr.enabled = true;
}
}
}