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.line = line; // 変更 by ei //エラーメッセージの蓄積 cmp.checkVital (); cmp.mergeDefaultParam (); } return cmp; }
public void init (Tag tag, int line_num) { this.tag = tag; this.tagName = tag.Name; this.gameManager = NovelSingleton.GameManager; this.gameView = NovelSingleton.GameView; this.line_num = line_num; this.finishAnimationDeletgate = this.finishAnimation; }