Esempio n. 1
0
        private void ApplyStatsDistributionPreset(LevelUpController controller)
        {
            if (instance.Fact == null)
            {
                return;
            }
            LevelUpState state = controller.State;

            if (!state.StatsDistribution.Available)
            {
                return;
            }
            StatsDistributionPreset statsDistributionPreset = instance.Fact.Blueprint.GetComponents <StatsDistributionPreset>().FirstOrDefault((StatsDistributionPreset sd) => sd.TargetPoints == state.StatsDistribution.Points);

            if (statsDistributionPreset == null)
            {
                return;
            }
            controller.ApplyStatsDistributionPreset(statsDistributionPreset);
        }