protected override MethodInfo FindMethod_Impl(string name, object targetObj)
 {
     return(UnityEventBase.GetValidMethodInfo(targetObj, name, new Type[]
     {
         typeof(T0)
     }));
 }
Beispiel #2
0
        internal MethodInfo FindMethod(string name, object listener, PersistentListenerMode mode, Type argumentType)
        {
            MethodInfo result;

            switch (mode)
            {
            case PersistentListenerMode.EventDefined:
                result = this.FindMethod_Impl(name, listener);
                break;

            case PersistentListenerMode.Void:
                result = UnityEventBase.GetValidMethodInfo(listener, name, new Type[0]);
                break;

            case PersistentListenerMode.Object:
                result = UnityEventBase.GetValidMethodInfo(listener, name, new Type[]
                {
                    argumentType ?? typeof(UnityEngine.Object)
                });
                break;

            case PersistentListenerMode.Int:
                result = UnityEventBase.GetValidMethodInfo(listener, name, new Type[]
                {
                    typeof(int)
                });
                break;

            case PersistentListenerMode.Float:
                result = UnityEventBase.GetValidMethodInfo(listener, name, new Type[]
                {
                    typeof(float)
                });
                break;

            case PersistentListenerMode.String:
                result = UnityEventBase.GetValidMethodInfo(listener, name, new Type[]
                {
                    typeof(string)
                });
                break;

            case PersistentListenerMode.Bool:
                result = UnityEventBase.GetValidMethodInfo(listener, name, new Type[]
                {
                    typeof(bool)
                });
                break;

            default:
                result = null;
                break;
            }
            return(result);
        }
Beispiel #3
0
        internal MethodInfo FindMethod(string name, object listener, PersistentListenerMode mode, Type argumentType)
        {
            switch (mode)
            {
            case PersistentListenerMode.EventDefined:
                return(this.FindMethod_Impl(name, listener));

            case PersistentListenerMode.Void:
                return(UnityEventBase.GetValidMethodInfo(listener, name, new Type[0]));

            case PersistentListenerMode.Object:
                return(UnityEventBase.GetValidMethodInfo(listener, name, new Type[]
                {
                    argumentType ?? typeof(Object)
                }));

            case PersistentListenerMode.Int:
                return(UnityEventBase.GetValidMethodInfo(listener, name, new Type[]
                {
                    typeof(int)
                }));

            case PersistentListenerMode.Float:
                return(UnityEventBase.GetValidMethodInfo(listener, name, new Type[]
                {
                    typeof(float)
                }));

            case PersistentListenerMode.String:
                return(UnityEventBase.GetValidMethodInfo(listener, name, new Type[]
                {
                    typeof(string)
                }));

            case PersistentListenerMode.Bool:
                return(UnityEventBase.GetValidMethodInfo(listener, name, new Type[]
                {
                    typeof(bool)
                }));

            default:
                return(null);
            }
        }
Beispiel #4
0
 protected override MethodInfo FindMethod_Impl(string name, object targetObj)
 {
     return(UnityEventBase.GetValidMethodInfo(targetObj, name, new System.Type[0]));
 }
Beispiel #5
0
 protected override MethodInfo FindMethod_Impl(string name, object targetObj)
 {
     System.Type[] argumentTypes = new System.Type[] { typeof(T0) };
     return(UnityEventBase.GetValidMethodInfo(targetObj, name, argumentTypes));
 }
 protected override MethodInfo FindMethod_Impl(string name, Type targetObjType)
 {
     return(UnityEventBase.GetValidMethodInfo(targetObjType, name, new Type[0]));
 }
 public static MethodInfo GetValidMethodInfo(object obj, string functionName, Type[] argumentTypes)
 {
     return(UnityEventBase.GetValidMethodInfo(obj.GetType(), functionName, argumentTypes));
 }