Example #1
0
        public AbstractComponent makeTag(string line, int line_num)
        {
            Tag tag = new Tag(line);

            //tagの種類によって、実装する命令が変わってくる
            AbstractComponent cmp = null;

            string className = this.classPrerix + "." + tf.ToTitleCase(tag.Name) + "Component";

            //リフレクションで動的型付け
            Type masterType = Type.GetType(className);


            try {
                cmp = (AbstractComponent)Activator.CreateInstance(masterType);
            } catch (Exception e) {
                //Debug.Log (e.ToString ());
                //マクロとして登録
                cmp = new _MacrostartComponent();
            }

            if (cmp != null)
            {
                cmp.init(tag, line_num);

                //エラーメッセージの蓄積
                cmp.checkVital();
                cmp.mergeDefaultParam();
            }

            return(cmp);
        }
Example #2
0
		public AbstractComponent makeTag(string line, int line_num){
		
			Tag tag = new Tag (line);

			//tagの種類によって、実装する命令が変わってくる
			AbstractComponent cmp = null;

			string className = this.classPrerix+"."+tf.ToTitleCase (tag.Name) + "Component";

			//リフレクションで動的型付け
			Type masterType = Type.GetType (className);


			try {

				cmp = (AbstractComponent)Activator.CreateInstance (masterType);

			} catch (Exception e) {
				//Debug.Log (e.ToString ());
				//マクロとして登録
				cmp = new _MacrostartComponent ();

			}

			if (cmp != null) {

				cmp.init (tag, line_num);

				//エラーメッセージの蓄積
				cmp.checkVital ();
				cmp.mergeDefaultParam ();

			}

			return cmp;

		
		}