Axiom.Core.MovableTextFactory._createInstance C# (CSharp) Method

_createInstance() protected method

protected _createInstance ( string name, NamedParameterList param ) : Axiom.Core.MovableObject
name string
param NamedParameterList
return Axiom.Core.MovableObject
		protected override MovableObject _createInstance( string name, NamedParameterList param )
		{
			// must have mesh parameter
			string caption = null;
			string fontName = null;

			if ( param != null )
			{
				if ( param.ContainsKey( "caption" ) )
				{
					caption = (string)param[ "caption" ];
				}
				if ( param.ContainsKey( "fontName" ) )
				{
					fontName = (string)param[ "fontName" ];
				}
			}
			if ( caption == null )
			{
				throw new AxiomException( "'caption' parameter required when constructing MovableText." );
			}
			if ( fontName == null )
			{
				throw new AxiomException( "'fontName' parameter required when constructing MovableText." );
			}

			MovableText text = new MovableText( name, caption, fontName );
			text.MovableType = this.Type;
			return text;
		}