public SavegameModel CreateNewSavegame() { var mineSavegame = new MineSavegame { NumberCorridor = 3 }; var corridorSavegame = new CorridorSavegame { Level = 1 }; var savegameModel = new SavegameModel { CorridorSavegame = corridorSavegame, MineSavegame = mineSavegame }; return(savegameModel); }
public CorridorModel([NotNull] ICorridorData corridorData, [NotNull] CorridorSavegame savegameModel) { if (corridorData == null) { throw new ArgumentNullException("corridorData"); } if (savegameModel == null) { throw new ArgumentNullException("savegameModel"); } _savegameModel = savegameModel; _corridorData = corridorData; Level = new ReactiveProperty <int>(_savegameModel.Level).AddTo(_disposer); Level.Subscribe(level => _savegameModel.Level = level); }