public static ITween <Vector2> ZKnormalizedPositionTo(this ScrollRect self, Vector2 to, float duration = 0.3f) { var tweenTarget = new ScrollRectTarget(self); var tween = new Vector2Tween(tweenTarget, self.normalizedPosition, to, duration); return(tween); }
public static ITween <Vector2> vector2PropertyTo(object self, string propertyName, Vector2 from, Vector2 to, float duration) { var tweenTarget = new PropertyTarget <Vector2>(self, propertyName); var tween = new Vector2Tween(tweenTarget, from, to, duration); return(tween); }
public static ITween <Vector2> ZKanchoredPositionTo(this RectTransform self, Vector2 to, float duration = 0.3f) { var tweenTarget = new RectTransformTarget(self); var tween = new Vector2Tween(tweenTarget, self.anchoredPosition, to, duration); return(tween); }
public static ITween <Vector2> ZKtextureScaleTo(this Material self, Vector2 to, float duration, string propertyName) { var tweenTarget = new MaterialTextureScaleTarget(self, propertyName); var tween = new Vector2Tween(tweenTarget, self.GetTextureScale(propertyName), to, duration); return(tween); }
/// <summary> /// tweens the ScrollRects normalizedPosition (scroll position) /// </summary> /// <returns>The knormalized position to.</returns> /// <param name="self">Self.</param> /// <param name="to">To.</param> /// <param name="duration">Duration.</param> public static ITween <Vector2> ZKnormalizedPositionTo(this ScrollRect self, Vector2 to, float duration = 0.3f) { var tweenTarget = new ScrollRectNormalizedPositionTarget(self); var tween = Vector2Tween.create(); tween.initialize(tweenTarget, to, duration); return(tween); }
/// <summary> /// tweens the RectTransforms anchoredPosition property /// </summary> /// <returns>The kanchored position to.</returns> /// <param name="self">Self.</param> /// <param name="to">To.</param> /// <param name="duration">Duration.</param> public static ITween <Vector2> ZKanchoredPositionTo(this RectTransform self, Vector2 to, float duration = 0.3f) { var tweenTarget = new RectTransformAnchoredPositionTarget(self); var tween = Vector2Tween.create(); tween.initialize(tweenTarget, to, duration); return(tween); }
/// <summary> /// tweens the Materials texture scale /// </summary> /// <returns>The ktexture scale to.</returns> /// <param name="self">Self.</param> /// <param name="to">To.</param> /// <param name="duration">Duration.</param> /// <param name="propertyName">Property name.</param> public static ITween <Vector2> ZKtextureScaleTo(this Material self, Vector2 to, float duration, string propertyName = "_MainTex") { var tweenTarget = new MaterialTextureScaleTarget(self, propertyName); var tween = Vector2Tween.create(); tween.initialize(tweenTarget, to, duration); return(tween); }