Example #1
0
        private void OnAbilitiesChanged(CharacteristicChangedParams <List <TriggeredAbility> > p)
        {
            var abilitiesToDeactivate = p.OldValue.Where(x => !p.NewValue.Contains(x)).ToList();
            var abilitiesToActivate   = p.NewValue.Where(x => !p.OldValue.Contains(x)).ToList();

            foreach (var ability in abilitiesToDeactivate)
            {
                ability.OnDisable();
            }

            foreach (var ability in abilitiesToActivate)
            {
                ability.OnEnable();
            }
        }
Example #2
0
 private void OnParametersChanged(CharacteristicChangedParams <CardParameters> p)
 {
     Changed.Raise();
 }