Axiom.Controllers.ControllerManager.CreateTextureUVScroller C# (CSharp) Метод

CreateTextureUVScroller() публичный Метод

Creates a basic time-based texture uv coordinate modifier designed for creating scrolling textures.
This simple method allows you to easily create constant-speed scrolling textures. If you want to specify differnt speed values for horizontil and vertical scroll, use the specific methods CreateTextureUScroller and CreateTextureVScroller. If you want more control, look up the CreateTextureWaveTransformer for more complex wave-based scrollers / stretchers / rotaters.
public CreateTextureUVScroller ( TextureUnitState layer, float speed ) : Controller
layer Axiom.Graphics.TextureUnitState The texture unit to animate.
speed float speed, in wraps per second.
Результат Controller
		public Controller<float> CreateTextureUVScroller( TextureUnitState layer, float speed )
		{
			IControllerValue<float> val = null;
			IControllerFunction<float> func = null;
			Controller<float> controller = null;

			// if both u and v speeds are the same, we can use a single controller for it
			if ( speed != 0 )
			{
				// create the value and function
				val = new TexCoordModifierControllerValue( layer, true, true );
				func = new MultipyControllerFunction( -speed, true );

				// create the controller (uses FrameTime for source by default)
				controller = CreateController( val, func );
			}

			return controller;
		}