Наследование: Axiom.Graphics.SimpleRenderable
Пример #1
0
        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.");
            }

            var text = new MovableText(name, caption, fontName);

            text.MovableType = Type;
            return(text);
        }
Пример #2
0
		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;
		}