/// <summary> /// Creates and returns a Tween for the informed component. /// The Tween is configured based on the attribute values of this TweenData file. /// </summary> /// <param name="transform"></param> /// <returns></returns> public Tween GetTween(LayoutElement element) { switch (command) { case LayoutElementCommand.FlexibleSize: return(element.DOFlexibleSize(to, duration, snapping)); case LayoutElementCommand.MinSize: return(element.DOMinSize(to, duration, snapping)); case LayoutElementCommand.PreferredSize: return(element.DOPreferredSize(to, duration, snapping)); default: return(null); } }
public override Tween GetTween(UniTween.UniTweenTarget uniTweenTarget) { LayoutElement element = (LayoutElement)GetComponent(uniTweenTarget); switch (command) { case LayoutElementCommand.FlexibleSize: return(element.DOFlexibleSize(to, duration, snapping)); case LayoutElementCommand.MinSize: return(element.DOMinSize(to, duration, snapping)); case LayoutElementCommand.PreferredSize: return(element.DOPreferredSize(to, duration, snapping)); default: return(null); } }