Exemple #1
0
 public ResultStatsViewModel(
     CalculationNodeViewModelFactory nodeFactory, ModifierNodeViewModelFactory modifierNodeFactory)
 {
     _nodeFactory         = nodeFactory;
     _modifierNodeFactory = modifierNodeFactory;
     NewStat        = new AddableResultStatViewModel();
     AddStatCommand = new RelayCommand(AddStat);
 }
Exemple #2
0
        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);
        }
Exemple #3
0
        public static async Task <IndependentResultStatsViewModel> CreateAsync(
            ObservableCalculator observableCalculator,
            CalculationNodeViewModelFactory nodeFactory)
        {
            var vm = new IndependentResultStatsViewModel(nodeFactory);
            await vm.InitializeAsync(new ExplicitlyRegisteredStatsObserver(observableCalculator));

            return(vm);
        }
        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);
        }
        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 };
        }
 public static ConfigurationStatViewModel Create(CalculationNodeViewModelFactory nodeFactory, IStat stat)
 => new ConfigurationStatViewModel(
Exemple #7
0
 private ConfigurationStatsViewModel(CalculationNodeViewModelFactory nodeFactory)
 => _nodeFactory = nodeFactory;
 private SharedConfigurationViewModel(CalculationNodeViewModelFactory nodeFactory)
 => _nodeFactory = nodeFactory;
 public ModifierNodeViewModelFactory(ObservableCalculator calculator,
                                     CalculationNodeViewModelFactory nodeFactory)
 {
     _calculator  = calculator;
     _nodeFactory = nodeFactory;
 }
Exemple #10
0
 private IndependentResultStatsViewModel(CalculationNodeViewModelFactory nodeFactory)
 {
     _nodeFactory = nodeFactory;
 }
 private GainOnActionStatsViewModel(CalculationNodeViewModelFactory nodeFactory)
 => _nodeFactory = nodeFactory;
Exemple #12
0
#pragma warning disable CS8618 // Instances can only be created via Create, which initializes all instance variables
        private SharedConfigurationViewModel(CalculationNodeViewModelFactory nodeFactory)
#pragma warning restore
        => _nodeFactory = nodeFactory;
 private PassiveTreeConnectionsViewModel(CalculationNodeViewModelFactory nodeFactory)
 => _nodeFactory = nodeFactory;