/// <summary> /// 展示对应模块 /// </summary> public virtual async UniTask Show() { await _chapterModuleBasics[_currStepIndex].Show(); if (_nextModule != null && _nextModule == _chapterModuleBasics[_currStepIndex]) { _nextModule = null; } await PrestrainModule(); }
/// <summary> /// 预加载下一步 /// </summary> public virtual async UniTask PrestrainModule() { if (_chapterModuleBasics[_currStepIndex]._IsPrestrain) { int nextStepIndex = _chapterModuleBasics[_currStepIndex]._NextStepIndex; if (nextStepIndex == -1) { return; } await _chapterModuleBasics[nextStepIndex].Creation(); if (_nextModule != null && _nextModule != _chapterModuleBasics[nextStepIndex]) { _nextModule.Dispose(); } _nextModule = _chapterModuleBasics[nextStepIndex]; } else { _nextModule.Dispose(); _nextModule = null; } }