Exemplo n.º 1
0
        private void Register <T>(
            Lights lights,
            EffectConfiguration effectConfiguration)
            where T : IMagicEvent
        {
            if (effectConfiguration.Id == null)
            {
                return;
            }

            var effect = effectFactory.Get <T>(
                effectConfiguration.Id,
                effectConfiguration.Config);

            var performer = BuildPerformer(lights, effect);

            game.Events.Subscriptions.Subscribe <T>(
                performer.Perform);
        }