public AdvCommandSelection(StringGridRow row, AdvSettingDataManager dataManager)
        {
            this.jumpLabel = AdvCommandParser.ParseScenarioLabel(row, AdvColumnName.Arg1);
            this.text      = AdvParser.ParseCell <string>(row, AdvColumnName.Text);
            string expStr = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Arg2, "");

            if (string.IsNullOrEmpty(expStr))
            {
                this.exp = null;
            }
            else
            {
                this.exp = dataManager.DefaultParam.CreateExpressionBoolean(expStr);
                if (this.exp.ErrorMsg != null)
                {
                    Debug.LogError(row.ToErrorString(this.exp.ErrorMsg));
                }
            }

            string selectedExpStr = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Arg3, "");

            if (string.IsNullOrEmpty(selectedExpStr))
            {
                this.selectedExp = null;
            }
            else
            {
                this.selectedExp = dataManager.DefaultParam.CreateExpression(selectedExpStr);
                if (this.selectedExp.ErrorMsg != null)
                {
                    Debug.LogError(row.ToErrorString(this.selectedExp.ErrorMsg));
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// StringGridの一行からデータ初期化
        /// </summary>
        /// <param name="row">初期化するためのデータ</param>
        /// <returns>成否</returns>
        public override bool InitFromStringGridRow(StringGridRow row)
        {
            string key = AdvCommandParser.ParseScenarioLabel(row, AdvColumnName.ScenarioLabel);

            InitKey(key);
            this.title            = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Title, "");
            this.thumbnailName    = AdvParser.ParseCell <string>(row, AdvColumnName.Thumbnail);
            this.thumbnailVersion = AdvParser.ParseCellOptional <int>(row, AdvColumnName.ThumbnailVersion, 0);
            return(true);
        }
Beispiel #3
0
        public override bool InitFromStringGridRow(StringGridRow row)
        {
            string key = AdvCommandParser.ParseScenarioLabel(row, AdvColumnName.ScenarioLabel);

            base.InitKey(key);
            this.title            = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Title, string.Empty);
            this.thumbnailName    = AdvParser.ParseCell <string>(row, AdvColumnName.Thumbnail);
            this.thumbnailVersion = AdvParser.ParseCellOptional <int>(row, AdvColumnName.ThumbnailVersion, 0);
            this.category         = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Categolly, string.Empty);
            base.RowData          = row;
            return(true);
        }
        public override bool InitFromStringGridRow(StringGridRow row)
        {
            int    num;
            string key = AdvCommandParser.ParseScenarioLabel(row, AdvColumnName.Label);

            base.InitKey(key);
            this.Type             = AdvParser.ParseCellOptional <LipSynchType>(row, AdvColumnName.Type, LipSynchType.TextAndVoice);
            this.Interval         = AdvParser.ParseCellOptional <float>(row, AdvColumnName.Interval, 0.2f);
            this.ScaleVoiceVolume = (float)AdvParser.ParseCellOptional <int>(row, AdvColumnName.ScaleVoiceVolume, 1);
            this.Tag = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Tag, "lip");
            if (row.Grid.TryGetColumnIndex(AdvColumnName.Name0.QuickToString(), out num))
            {
                this.animationData.TryParse(row, num);
            }
            return(true);
        }
Beispiel #5
0
        public override bool InitFromStringGridRow(StringGridRow row)
        {
            int    num;
            string key = AdvCommandParser.ParseScenarioLabel(row, AdvColumnName.Label);

            base.InitKey(key);
            this.IntervalMin          = AdvParser.ParseCellOptional <float>(row, AdvColumnName.IntervalMin, 2f);
            this.IntervalMax          = AdvParser.ParseCellOptional <float>(row, AdvColumnName.IntervalMax, 6f);
            this.RandomDoubleEyeBlink = AdvParser.ParseCellOptional <float>(row, AdvColumnName.RandomDouble, 0.2f);
            this.Tag = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Tag, "eye");
            if (row.Grid.TryGetColumnIndex(AdvColumnName.Name0.QuickToString(), out num))
            {
                this.animationData.TryParse(row, num);
            }
            return(true);
        }
        public AdvCommandJumpRandom(StringGridRow row, AdvSettingDataManager dataManager)
            : base(row)
        {
            this.jumpLabel = AdvCommandParser.ParseScenarioLabel(row, AdvColumnName.Arg1);
            string expStr = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Arg2, "");

            if (string.IsNullOrEmpty(expStr))
            {
                this.exp = null;
            }
            else
            {
                this.exp = dataManager.DefaultParam.CreateExpressionBoolean(expStr);
                if (this.exp.ErrorMsg != null)
                {
                    Debug.LogError(row.ToErrorString(this.exp.ErrorMsg));
                }
            }
            this.rate = AdvParser.ParseCellOptional <float>(row, AdvColumnName.Arg3, 1);
        }
Beispiel #7
0
        /// <summary>
        /// StringGridの一行からデータ初期化
        /// </summary>
        /// <param name="row">初期化するためのデータ</param>
        /// <returns>成否</returns>
        public override bool InitFromStringGridRow(StringGridRow row, AdvBootSetting bootSetting)
        {
            string key = AdvCommandParser.ParseScenarioLabel(row, AdvColumnName.ScenarioLabel);

            InitKey(key);
            this.title            = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Title, "");
            this.thumbnailName    = AdvParser.ParseCell <string>(row, AdvColumnName.Thumbnail);
            this.thumbnailVersion = AdvParser.ParseCellOptional <int>(row, AdvColumnName.ThumbnailVersion, 0);
            this.category         = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Categolly, "");
            this.RowData          = row;

            this.thumbnailPath = bootSetting.ThumbnailDirInfo.FileNameToPath(thumbnailName);
            //ファイルマネージャーにバージョンの登録
            AssetFile file = AssetFileManager.GetFileCreateIfMissing(this.ThumbnailPath);

            if (file != null)
            {
                file.Version = this.ThumbnailVersion;
            }

            return(true);
        }
 public AdvCommandScenarioLabel(StringGridRow row)
 {
     this.scenarioLabel = AdvCommandParser.ParseScenarioLabel(row, AdvColumnName.Command);
     this.title         = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Arg1, this.scenarioLabel);
 }