Пример #1
0
		/// <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 = ZestKit.cacheVector2Tweens ? QuickCache<Vector2Tween>.pop() : new Vector2Tween();
			tween.initialize( tweenTarget, self.GetTextureScale( propertyName ), to, duration );

			return tween;
		}
Пример #2
0
        /// <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, self.GetTextureScale( propertyName ), to, duration );

            return tween;
        }