Пример #1
0
        private void Effect_Changed(object sender, EventArgs e)
        {
            var effect = sender as IPersonEffect;
            var args   = new EffectEventArgs(effect);

            Changed?.Invoke(this, args);
        }
Пример #2
0
        public void Remove(IPersonEffect effect)
        {
            Items.Remove(effect);
            effect.Changed -= Effect_Changed;

            var args = new EffectEventArgs(effect);

            Removed?.Invoke(this, args);
        }
Пример #3
0
        public void Add(IPersonEffect effect)
        {
            Items.Add(effect);

            effect.Changed += Effect_Changed;

            var args = new EffectEventArgs(effect);

            Added?.Invoke(this, args);
        }
Пример #4
0
        private void Effects_CollectionChanged(object sender, EffectEventArgs e)
        {
            ClearCalculatedStats();

            if (EvolutionData != null)
            {
                CalcCombatStats();
            }

            TacticalActCarrier.Acts = CalcActs(EquipmentCarrier);
        }
Пример #5
0
        private void Effects_CollectionChanged(object sender, EffectEventArgs e)
        {
            ClearCalculatedStats();

            if (EvolutionData != null)
            {
                CalcCombatStats();
            }

            var perks = GetPerksSafe();

            TacticalActCarrier.Acts = CalcActs(_defaultActScheme, EquipmentCarrier, Effects, perks);

            CalcSurvivalStats();
        }