Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            // do whileをonclickに
            ScriptManager manager = new ScriptManager();

            manager.Start();
            int currentType = 999;

            do
            {
                ScriptData data = manager.GetObject();
                currentType = data.TypeNum;
                switch (currentType)
                {
                case Const.TYPE_CHANGE_TEXT:
                    DummyViewEngine.ChangeText();
                    break;

                case Const.TYPE_CHANGE_BGI:
                    DummyViewEngine.ChangeBGI();
                    break;

                case Const.TYPE_USE_SE:
                    DummyViewEngine.UseSE();
                    break;

                default:
                    break;
                }
            } while (currentType != Const.TYPE_CHANGE_TEXT);

            while (true)
            {
                ;                  // testCode
            }
        }
Ejemplo n.º 2
0
        public void Parse(List <string> raw)
        {
            foreach (var data in raw)
            {
                ScriptData SData = new ScriptData();
                if (!data.Contains("[") && !data.Contains("]"))
                {
                    SData.TypeNum = Const.TYPE_CHANGE_TEXT;
                    SData.Line    = data;
                }
                else
                {
                    string tmp = data.Replace("[", "");
                    tmp = tmp.Replace("]", "");
                    string[] command = tmp.Split(' ');

                    SData.Line = string.Empty;

                    switch (command[0])
                    { //[commandName opt1 opt2 opt3 ... ]
                    case "ChangeBGI":
                        SData.TypeNum = Const.TYPE_CHANGE_BGI;
                        break;

                    case "ChangeCharName":
                        SData.TypeNum = Const.TYPE_CHANGE_CHARNAME;
                        break;

                    case "ChangeBGM":
                        SData.TypeNum = Const.TYPE_CHANGE_BGM;
                        break;

                    case "ChangeCharThumbnail":
                        SData.TypeNum = Const.TYPE_CHANGE_CHARTHUMBNAIL;
                        break;

                    case "ChangeCharImage":
                        SData.TypeNum = Const.TYPE_CHANGE_CHARIMAGE;
                        break;

                    case "UseSE":
                        SData.TypeNum = Const.TYPE_USE_SE;
                        break;

                    case "CreateFlag":
                        SData.TypeNum = Const.TYPE_CREATE_FLAG;
                        break;

                    case "ChangeFlagParams":
                        SData.TypeNum = Const.TYPE_CHANGE_FLAG_PARAMS;
                        break;

                    case "RemoveFlag":
                        SData.TypeNum = Const.TYPE_REMOVE_FLAG;
                        break;

                    case "CreateSwitch":
                        SData.TypeNum = Const.TYPE_CREATE_SWITCH;
                        break;
                    }

                    for (int i = 2; i < command.Length; i++)
                    {
                        SData.AddOption(command[i]);
                    }
                }

                Datas.Add(SData);
            }
        }