// ----- ----- ----- Method ----- ----- ----- /// <summary> /// ゲームのタイトル等を読み込む。 /// </summary> public GameData LoadGame() { if (_gameData != null) return _gameData; const string fileName = "Config"; string filePath = Path.Combine(_gamePath, fileName); var table = new SettingFileReader(filePath); try { return _gameData = new GameData(table["Name"][0]); } catch (IndexOutOfRangeException e) { throw new DataFormatException("タイトル名が指定されていません", filePath, e); } catch (NullReferenceException e) { throw new DataFormatException("タイトルがありません", filePath, e); } }
public GameLoaderDataPair(GameLoader loader, GameData data) { Contract.Requires(loader != null, "loader"); Contract.Requires(data != null, "data"); this.Loader = loader; this.Data = data; }