public ResultStatsViewModel(
     CalculationNodeViewModelFactory nodeFactory, ModifierNodeViewModelFactory modifierNodeFactory)
 {
     _nodeFactory         = nodeFactory;
     _modifierNodeFactory = modifierNodeFactory;
     NewStat        = new AddableResultStatViewModel();
     AddStatCommand = new RelayCommand(AddStat);
 }
        private ComputationViewModel(ObservableCalculator observableCalculator, ComputationSchedulerProvider schedulers)
        {
            _observableCalculator = observableCalculator;
            _nodeFactory          = new CalculationNodeViewModelFactory(observableCalculator, schedulers.Dispatcher);
            var modifierNodeFactory = new ModifierNodeViewModelFactory(observableCalculator, _nodeFactory);

            OffensiveStats = new ResultStatsViewModel(_nodeFactory, modifierNodeFactory);
            DefensiveStats = new ResultStatsViewModel(_nodeFactory, modifierNodeFactory);
        }
Esempio n. 3
0
        public static MainSkillSelectionViewModel Create(
            SkillDefinitions skillDefinitions, IBuilderFactories builderFactories,
            CalculationNodeViewModelFactory nodeFactory,
            ObservableSet <IReadOnlyList <Skill> > skills)
        {
            var vm = new MainSkillSelectionViewModel(skillDefinitions, builderFactories, nodeFactory);

            vm.Initialize(skills);
            return(vm);
        }
Esempio n. 4
0
        private MainSkillSelectionViewModel(
            SkillDefinitions skillDefinitions, IBuilderFactories builderFactories,
            CalculationNodeViewModelFactory nodeFactory)
        {
            _skillDefinitions = skillDefinitions;
            var selectedSkillItemSlotStat = builderFactories.MetaStatBuilders.MainSkillItemSlot
                                            .BuildToStats(Entity.Character).Single();

            _selectedSkillItemSlot = nodeFactory.CreateConfiguration(selectedSkillItemSlotStat, new NodeValue(0));
            var selectedSkillSocketIndexStat = builderFactories.MetaStatBuilders.MainSkillSocketIndex
                                               .BuildToStats(Entity.Character).Single();

            _selectedSkillSocketIndex = nodeFactory.CreateConfiguration(selectedSkillSocketIndexStat, new NodeValue(0));
            var selectedSkillPartStat = builderFactories.StatBuilders.MainSkillPart
                                        .BuildToStats(Entity.Character).Single();

            _selectedSkillPart = nodeFactory.CreateConfiguration(selectedSkillPartStat, new NodeValue(0));
            ConfigurationNodes = new[] { _selectedSkillItemSlot, _selectedSkillSocketIndex, _selectedSkillPart };
        }
 private ConfigurationStatsViewModel(CalculationNodeViewModelFactory nodeFactory)
 => _nodeFactory = nodeFactory;
Esempio n. 6
0
 private GainOnActionStatsViewModel(CalculationNodeViewModelFactory nodeFactory)
 => _nodeFactory = nodeFactory;
 public ModifierNodeViewModelFactory(ObservableCalculator calculator,
                                     CalculationNodeViewModelFactory nodeFactory)
 {
     _calculator  = calculator;
     _nodeFactory = nodeFactory;
 }
Esempio n. 8
0
 private SharedConfigurationViewModel(CalculationNodeViewModelFactory nodeFactory)
 => _nodeFactory = nodeFactory;
 public static ConfigurationStatViewModel Create(CalculationNodeViewModelFactory nodeFactory, IStat stat)
 => new ConfigurationStatViewModel(