Tween Add(GameObject g, float d, TweenTypeEnum type) { var add = (System.Reflection.MethodInfo)null; for (var t = type.AsType(); t != null; t = t.BaseType) { add = t.GetMethod("Add", new System.Type[] { typeof(GameObject), typeof(float) }); if (add != null) { break; } } return((Tween)add.Invoke(null, new object[] { g, d })); }
public static bool IsTweenVec4(this TweenTypeEnum type) { return(type.AsType().IsSubclassOf(typeof(TweenVec4))); }