fix: Previous/Next走对woman步进 + 开场动画支持重复播放
- PreviousStep/NextStep: woman自由步进优先于Config路径 - UpdateTouchVisibility: 修正索引 i==step (之前错误地用step-1) - PlayOpeningFlow: 每次调用前重置man/man2/摄像机状态,支持返回重来 - PageController: 移除InitializeFromGameManager调用,不再覆盖woman步进
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user