public override void copyFrom(UITweener value) { base.copyFrom(value); UITweenRotation other = value as UITweenRotation; if (other != null) { this.from = other.from; this.to = other.to; this.quaternionLerp = other.quaternionLerp; } }
/// <summary> /// Start the tweening operation. /// </summary> public static UITweenRotation Begin(GameObject go, float duration, Quaternion rot) { UITweenRotation comp = UITweener.Begin <UITweenRotation>(go, duration); comp.from = comp.value.eulerAngles; comp.to = rot.eulerAngles; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }