// ゲームを途中終了 public void ExitGame() { var fname = default(string); Sound.KeepBGM = false; Sound.BossBGM = false; Sound.StopBGM(); // Exit.eveを探す GUI.MainFormHide(); var exitFiles = new string[] { FileSystem.PathCombine(ScenarioPath, "Data", "System", "Exit.eve"), FileSystem.PathCombine(AppPath, "Data", "System", "Exit.eve"), }; var exitFile = exitFiles.FirstOrDefault(x => FileSystem.FileExists(x)); if (string.IsNullOrEmpty(exitFile)) { // Exit.eveが無ければそのまま終了 TerminateSRC(); } var nonPilotFile = FileSystem.PathCombine(Path.GetDirectoryName(exitFile), "non_pilot.txt"); if (FileSystem.FileExists(nonPilotFile)) { NPDList.Load(nonPilotFile); } // Exit.eveを読み込み Event.ClearEventData(); Event.LoadEventData(exitFile, load_mode: ""); ScenarioFileName = fname; if (!Event.IsEventDefined("プロローグ")) { GUI.ErrorMessage(fname + "中にプロローグイベントが定義されていません"); TerminateSRC(); } // Exit.eveのプロローグイベントを実施 Event.HandleEvent("プロローグ"); // SRCを終了 TerminateSRC(); }
public void LoadDataDirectory(string fpath) { var aliasFilePath = FileSystem.PathCombine(fpath, "alias.txt"); if (FileSystem.FileExists(aliasFilePath)) { ALDList.Load(aliasFilePath); } var mindFilePath = FileSystem.PathCombine(fpath, "mind.txt"); var spFilePath = FileSystem.PathCombine(fpath, "sp.txt"); if (FileSystem.FileExists(mindFilePath)) { SPDList.Load(mindFilePath); } else if (FileSystem.FileExists(spFilePath)) { SPDList.Load(spFilePath); } var pilotFilePath = FileSystem.PathCombine(fpath, "pilot.txt"); if (FileSystem.FileExists(pilotFilePath)) { PDList.Load(pilotFilePath); } var nonPilotFilePath = FileSystem.PathCombine(fpath, "non_pilot.txt"); if (FileSystem.FileExists(nonPilotFilePath)) { NPDList.Load(nonPilotFilePath); } var robotFilePath = FileSystem.PathCombine(fpath, "robot.txt"); if (FileSystem.FileExists(robotFilePath)) { UDList.Load(robotFilePath); } var unitFilePath = FileSystem.PathCombine(fpath, "unit.txt"); if (FileSystem.FileExists(unitFilePath)) { UDList.Load(unitFilePath); } //// ロードのインジケータ表示を行う //if (My.MyProject.Forms.frmNowLoading.Visible) //{ // GUI.DisplayLoadingProgress(); //} var pilotMessageFilePath = FileSystem.PathCombine(fpath, "pilot_message.txt"); if (FileSystem.FileExists(pilotMessageFilePath)) { MDList.Load(pilotMessageFilePath, false); } var pilotDialogFilePath = FileSystem.PathCombine(fpath, "pilot_dialog.txt"); if (FileSystem.FileExists(pilotDialogFilePath)) { DDList.Load(pilotDialogFilePath); } var effectFilePath = FileSystem.PathCombine(fpath, "effect.txt"); if (FileSystem.FileExists(effectFilePath)) { EDList.Load(effectFilePath, true); } var animationFilePath = FileSystem.PathCombine(fpath, "animation.txt"); if (FileSystem.FileExists(animationFilePath)) { ADList.Load(animationFilePath, false); } var ext_animationFilePath = FileSystem.PathCombine(fpath, "ext_animation.txt"); if (FileSystem.FileExists(ext_animationFilePath)) { EADList.Load(ext_animationFilePath, false); } var itemFilePath = FileSystem.PathCombine(fpath, "item.txt"); if (FileSystem.FileExists(itemFilePath)) { IDList.Load(itemFilePath); } }