//一ページ内のコマンド処理 IEnumerator CoStartPage(AdvScenarioLabelData labelData, AdvScenarioPageData pageData, AdvCommand returnToCommand) { int index = 0; AdvCommand command = pageData.GetCommand(index); if (returnToCommand != null) { while (command != returnToCommand) { command = pageData.GetCommand(++index); } } //復帰直後はIf内分岐は無効 if (IfManager.IsLoadInit) { index = pageData.GetIfSkipCommandIndex(index); command = pageData.GetCommand(index); } while (command != null) { if (command.IsEntityType) { command = command.CreateEntityCommand(Engine, pageData); } //古いセーブデータのロード中はページ末までスキップ if (IsOldVersion && !command.IsTypePageEnd()) { command = pageData.GetCommand(++index); continue; } //ifスキップチェック if (IfManager.CheckSkip(command)) { if ((debugOutPut & DebugOutPut.Log) == DebugOutPut.Log) { Debug.Log("Command If Skip: " + command.GetType() + " " + labelData.ScenaioLabel + ":" + pageData.PageNo); } command = pageData.GetCommand(++index); continue; } currentCommand = command; //ロード command.Load(); //ロード待ち while (!command.IsLoadEnd()) { isWaitLoading = true; yield return(0); } isWaitLoading = false; //コマンド実行 if ((debugOutPut & DebugOutPut.Log) == DebugOutPut.Log) { Debug.Log("Command : " + command.GetType() + " " + labelData.ScenaioLabel + ":" + pageData.PageNo); } this.OnBeginCommand.Invoke(command); command.DoCommand(engine); ///ページ末端・オートセーブデータを更新 // if (command.IsTypePageEnd()) // { // ///ページ開始処理 // engine.Page.BeginPage(currentScenarioLabel, currentPage); // engine.SaveManager.UpdateAutoSaveData(engine); // } //コマンド実行後にファイルをアンロード command.Unload(); while (IsPausing) { yield return(0); } //コマンドの処理待ち while (true) { this.OnUpdatePreWaitingCommand.Invoke(command); if (!command.Wait(engine)) { break; } if ((debugOutPut & DebugOutPut.Waiting) == DebugOutPut.Waiting) { Debug.Log("Wait..." + command.GetType()); } this.OnUpdateWaitingCommand.Invoke(command); yield return(0); } if ((debugOutPut & DebugOutPut.CommandEnd) == DebugOutPut.CommandEnd) { Debug.Log("End :" + command.GetType() + " " + labelData.ScenaioLabel + ":" + pageData.PageNo); } this.OnEndCommand.Invoke(command); Engine.UiManager.IsInputTrig = false; Engine.UiManager.IsInputTrigCustom = false; if (IsBreakCommand) { yield break; } command = pageData.GetCommand(++index); } }