Exemplo n.º 1
0
        //ラインからタグを作成

        //コンポーネントから即実行されるタグを生成
        public AbstractComponent makeTag(string line)
        {
            AbstractComponent cmp = this.makeTag(line, 0);

            cmp.calcVariable();
            return(cmp);
        }
Exemplo n.º 2
0
        //次の命令へ
        public void nextOrder()
        {
            if (StatusManager.isMessageShowing == true)
            {
                return;
            }

            //nextOrder を指定されたなら、クリックは有効になる
            StatusManager.enableClickOrder = true;

            this.currentComponentIndex++;

            //シナリオファイルの最後まで来た時。スタックが存在するならreturn する
            if (this.currentComponentIndex >= this.arrayComponents.Count)
            {
                if (this.scenarioManager.countStack() > 0)
                {
                    //スタックがあるならreturn する
                    this.startTag("[return]");
                }
                else
                {
                    //this.showError ("シナリオファイルの終端まで到達しました");
                }

                return;
            }

            AbstractComponent cmp = this.arrayComponents [this.currentComponentIndex];


            cmp.before();

            if (StatusManager.skipOrder == false)
            {
                cmp.calcVariable();
                cmp.validate();

                string p = "";
                foreach (KeyValuePair <string, string> kvp in cmp.param)
                {
                    p += kvp.Key + "=" + kvp.Value + " ";
                }

                this.showLog("[" + cmp.tagName + " " + p + " ]");

                cmp.start();
                cmp.after();
            }
            else
            {
                this.nextOrder();
            }
        }
Exemplo n.º 3
0
        //コンポーネントから即実行されるタグを生成
        public AbstractComponent makeTag(string tag_name, Dictionary <string, string> param)
        {
            string line      = "[" + tag_name + " ";
            string param_str = "";

            foreach (KeyValuePair <string, string> pair in param)
            {
                param_str += pair.Key + "=" + pair.Value + " ";
            }

            line = line + param_str + "]";

            Debug.Log(line);


            AbstractComponent cmp = this.makeTag(line, 0);

            cmp.calcVariable();

            return(cmp);
        }