ie.
public static EaseDelegate GetEaseFunction(EaseCategory easeCategory, EaseType easeType)
{
switch (easeCategory)
{
case EaseCategory.Linear:
switch (easeType)
{
case EaseType.EaseIn:
return new EaseDelegate(Linear.EaseIn);
case EaseType.EaseOut:
return new EaseDelegate(Linear.EaseOut);
case EaseType.EaseInOut:
return new EaseDelegate(Linear.EaseInOut);
case EaseType.EaseNone:
return new EaseDelegate(Linear.EaseNone);
}
break;
...
}
}Note that in the above extract "Linear" is a static class and "EaseIn", "EaseOut" etc. are static methods. EaseDelegate is a delegate matching the method signatures in the class.
Now I need two methods that do the reverse; return the enum value based on the class and method of the delegate.
public static EaseCategory GetEaseCategory(EaseDelegate easeFunction)
{
// return ???
}
public static EaseType GetEaseType(EaseDelegate easeFunction)
{
// return ???
}






