private static void AddAvailableStats(
     ResultStatsViewModel viewModel, IStatBuilder statBuilder, Entity entity = Entity.Character)
 {
     foreach (var stat in statBuilder.BuildToStats(entity))
     {
         viewModel.AddAvailableStat(stat);
     }
 }
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);
        }
 private static void AddStats(
     ResultStatsViewModel viewModel,
     IStatBuilder statBuilder, Entity entity = Entity.Character,
     NodeType nodeType = NodeType.Total)
 {
     foreach (var stat in statBuilder.BuildToStats(entity))
     {
         viewModel.AddStat(stat, nodeType);
     }
 }