Axiom.Serialization.MaterialSerializer.ParseAnimTexture C# (CSharp) Метод

ParseAnimTexture() приватный Метод

private ParseAnimTexture ( string parameters, MaterialScriptContext context ) : bool
parameters string
context MaterialScriptContext
Результат bool
		protected static bool ParseAnimTexture( string parameters, MaterialScriptContext context )
		{
			string[] values = parameters.Split( new char[] { ' ', '\t' } );

			if ( values.Length < 3 )
			{
				LogParseError( context, "Bad anim_texture attribute, wrong number of parameters (excepted at least 3)." );
				return false;
			}

			if ( values.Length == 3 && int.Parse( values[ 1 ] ) != 0 )
			{
				// first form using the base name and number of frames
				context.textureUnit.SetAnimatedTextureName( values[ 0 ], int.Parse( values[ 1 ] ), StringConverter.ParseFloat( values[ 2 ] ) );
			}
			else
			{
				// second form using individual names
				context.textureUnit.SetAnimatedTextureName( values, values.Length - 1, StringConverter.ParseFloat( values[ values.Length - 1 ] ) );
			}

			return false;
		}