/// <summary> /// tweens the Materials texture offset /// </summary> /// <returns>The ktexture offset 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> ZKtextureOffsetTo( this Material self, Vector2 to, float duration, string propertyName = "_MainTex" ) { var tweenTarget = new MaterialTextureOffsetTarget( self, propertyName ); var tween = ZestKit.cacheVector2Tweens ? QuickCache<Vector2Tween>.pop() : new Vector2Tween(); tween.initialize( tweenTarget, self.GetTextureOffset( propertyName ), to, duration ); return tween; }
/// <summary> /// tweens the Materials texture offset /// </summary> /// <returns>The ktexture offset 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> ZKtextureOffsetTo( this Material self, Vector2 to, float duration, string propertyName = "_MainTex" ) { var tweenTarget = new MaterialTextureOffsetTarget( self, propertyName ); var tween = Vector2Tween.create(); tween.initialize( tweenTarget, self.GetTextureOffset( propertyName ), to, duration ); return tween; }