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

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

Creates a basic time-based texture v coordinate modifier designed for creating scrolling textures.
This simple method allows you to easily create constant-speed scrolling textures. If you want more control, look up the CreateTextureWaveTransformer for more complex wave-based scrollers / stretchers / rotaters.
public CreateTextureVScroller ( 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> CreateTextureVScroller( 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, false, true );
				func = new MultipyControllerFunction( -speed, true );

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

			return controller;
		}