public static void RotateToOffset(this SerializedConfig.Extensions.AsTransform ext, Quaternion to, bool isGlobal = true, EasingType easingType = EasingType.Linear, IEasingContainer easingContainer = null, string prefix = "") { ext.Add(isGlobal ? new ReflectedConfigProperty <Quaternion>() { Path = prefix + ".rotation", To = to, } : new ReflectedConfigProperty <Quaternion>() { Path = prefix + ".localRotation", To = to }, BaseYieldTweenProperty.PropertyOffsetMode.AddOffset, easingType, easingContainer); }
public void Add(ConfigProp prop, BaseYieldTweenProperty.PropertyOffsetMode offsetMode, EasingType easingType = EasingType.Linear, IEasingContainer easingContainer = null) { prop.Path = Owner.Path + Prefix + prop.Path; prop.OffsetMode = offsetMode; prop.EasingType = easingType; prop.EasingContainer = easingContainer; Owner.Add(prop); }
public static void Move(this SerializedConfig.Extensions.AsTransform ext, Vector3 from, Vector3 to, EasingType easingType = EasingType.Linear, bool isGlobal = true, IEasingContainer easingContainer = null, string prefix = "") { ext.Add(isGlobal ? new ReflectedConfigProperty <Vector3>() { Path = prefix + ".position", From = from, To = to, } : new ReflectedConfigProperty <Vector3>() { Path = prefix + ".localPosition", From = from, To = to, }, BaseYieldTweenProperty.PropertyOffsetMode.CurrentTo, easingType, easingContainer); }
public static void RotateToOffset(this SerializedConfig.Extensions.AsTransform ext, Vector3 from, Vector3 to, EasingType easingType = EasingType.Linear, bool isGlobal = true, IEasingContainer easingContainer = null, string prefix = "") { ext.RotateToOffset(Quaternion.Euler(to), isGlobal, easingType, easingContainer, prefix); }
public static void ScaleToOffset(this SerializedConfig.Extensions.AsTransform ext, Vector3 to, EasingType easingType = EasingType.Linear, IEasingContainer easingContainer = null, string prefix = "") { ext.Add(new ReflectedConfigProperty <Vector3>() { Path = prefix + ".localScale", To = to, }, BaseYieldTweenProperty.PropertyOffsetMode.AddOffset, easingType, easingContainer); }
public static void Scale(this SerializedConfig.Extensions.AsTransform ext, float to, EasingType easingType = EasingType.Linear, IEasingContainer easingContainer = null, string prefix = "") { ext.Scale(Vector3.one * to, easingType, easingContainer, prefix); }
public static void Color(this SerializedConfig.Extensions.AsRenderer ext, Color from, Color to, EasingType easingType = EasingType.Linear, IEasingContainer easingContainer = null, string prefix = "") { ext.Add(new ReflectedConfigProperty <Color>() { Path = prefix + MaterialPrefix + ".color", From = from, To = to }, BaseYieldTweenProperty.PropertyOffsetMode.FromTo, easingType, easingContainer); }
public static void SetValueToOffset <T>(this SerializedConfig.Extensions.AsRenderer ext, string name, T to, EasingType easingType = EasingType.Linear, IEasingContainer easingContainer = null, string prefix = "") where T : struct { ext.Add(new MaterialConfigProperty <T>() { Path = prefix + MaterialPrefix + name, To = to, }, BaseYieldTweenProperty.PropertyOffsetMode.AddOffset, easingType, easingContainer); }