Axiom.ParticleSystems.BillboardParticleRenderer.ParseBillboardRotationType C# (CSharp) Method

ParseBillboardRotationType() private method

private ParseBillboardRotationType ( string values, ParticleSystemRenderer _renderer ) : void
values string
_renderer ParticleSystemRenderer
return void
		public static void ParseBillboardRotationType( string[] values, ParticleSystemRenderer _renderer )
		{
			if ( values.Length != 1 )
			{
				ParseHelper.LogParserError( "billboard_rotation_type", _renderer.Type, "Wrong number of parameters." );
				return;
			}

			// lookup the real enum equivalent to the script value
			object val = ScriptEnumAttribute.Lookup( values[ 0 ], typeof( BillboardRotationType ) );

			BillboardParticleRenderer renderer = (BillboardParticleRenderer)_renderer;
			// if a value was found, assign it
			if ( val != null )
				renderer.BillboardRotationType = (BillboardRotationType)val;
			else
				ParseHelper.LogParserError( "billboard_rotation_type", _renderer.Type, "Invalid enum value" );
		}