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

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

private ParseColorOp ( string parameters, MaterialScriptContext context ) : bool
parameters string
context MaterialScriptContext
Результат bool
		protected static bool ParseColorOp( string parameters, MaterialScriptContext context )
		{
			// lookup the real enum equivalent to the script value
			object val = ScriptEnumAttribute.Lookup( parameters, typeof( LayerBlendOperation ) );

			// if a value was found, assign it
			if ( val != null )
			{
				context.textureUnit.SetColorOperation( (LayerBlendOperation)val );
			}
			else
			{
				string legalValues = ScriptEnumAttribute.GetLegalValues( typeof( LayerBlendOperation ) );
				LogParseError( context, "Bad color_op attribute, valid values are {0}.", legalValues );
			}

			return false;
		}