コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }