Пример #1
0
        public void RemoveParticularSubscriber <T>(AudioManager component)
        {
            SubscriberList subscriberList_ = component?.subscriberList_;

            if (subscriberList_ is null)
            {
                return;
            }

            StaticEvent <T> .Delegate func;

            foreach (IEventSubscriber subscriber in new List <IEventSubscriber>(subscriberList_))
            {
                if (subscriber is StaticEvent <T> .Subscriber eventSubscriber)
                {
                    func = eventSubscriber?.func_;

                    if (func != null)
                    {
                        subscriberList_.Remove(subscriber);
                    }
                }
            }
        }