Exemplo n.º 1
0
        public void CreateReceiver(MonoBehaviour target, ReceiverBuilder receivers)
        {
            var provider = ReceiverComponentBuilder.FindProvider(target, type, ReceiverComponentBuilder.TypeProvider);

            if (provider != null)
            {
                DelegateReceiverCreator.Create(provider, this, target, receivers);
            }
            else
            {
                Debug.LogError($"Unable to find {nameof(Provider)}<{type.GetFriendlyName()}> for {target.GetType().Name} named '{target.name}'", target);
            }
        }
Exemplo n.º 2
0
        public static void Create(Provider provider, ReceiverCreator receiverCreator, object target, ReceiverBuilder receivers)
        {
            var delegateProvider = new DelegateReceiverCreator(receiverCreator, target, receivers);

            provider.Register(delegateProvider);
        }