Ejemplo n.º 1
0
        /// <summary>
        /// StringGridの一行からデータ初期化
        /// </summary>
        /// <param name="row">初期化するためのデータ</param>
        /// <returns>成否</returns>
        public override bool InitFromStringGridRow(StringGridRow row)
        {
            string key = AdvParser.ParseCell <string>(row, AdvColumnName.Label);

            if (string.IsNullOrEmpty(key))
            {
                return(false);
            }
            else
            {
                InitKey(key);
                this.type            = AdvParser.ParseCell <ParamType>(row, AdvColumnName.Type);
                this.parameterString = AdvParser.ParseCell <string>(row, AdvColumnName.Value);
                switch (type)
                {
                case ParamType.Bool:
                    parameter = AdvParser.ParseCell <bool>(row, AdvColumnName.Value);
                    break;

                case ParamType.Float:
                    parameter = AdvParser.ParseCell <float>(row, AdvColumnName.Value);
                    break;

                case ParamType.Int:
                    parameter = AdvParser.ParseCell <int>(row, AdvColumnName.Value);
                    break;

                case ParamType.String:
                    parameter = AdvParser.ParseCell <string>(row, AdvColumnName.Value);
                    break;
                }
                this.fileType = AdvParser.ParseCellOptional <FileType>(row, AdvColumnName.FileType, FileType.Default);
                return(true);
            }
        }
Ejemplo n.º 2
0
        public GraphicInfo(StringGridRow row)
        {
            this.RowData  = row;
            this.fileName = AdvParser.ParseCell <string>(row, AdvColumnName.FileName);
            try
            {
                this.pivot = ParserUtil.ParsePivotOptional(AdvParser.ParseCellOptional <string>(row, AdvColumnName.Pivot, ""), pivot);
            }
            catch (System.Exception e)
            {
                Debug.LogError(row.ToErrorString(e.Message));
            }

            try
            {
                this.scale = ParserUtil.ParseScale2DOptional(AdvParser.ParseCellOptional <string>(row, AdvColumnName.Scale, ""), this.scale);
            }
            catch (System.Exception e)
            {
                Debug.LogError(row.ToErrorString(e.Message));
            }
            this.CondionalExpression = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Conditional, "");
            this.version             = AdvParser.ParseCellOptional <int>(row, AdvColumnName.Version, 0);
//			this.IgnoreLoad = AdvParser.ParseCellOptional<bool>(row, AdvColumnName.IgnoreLoad, false);
        }
Ejemplo n.º 3
0
        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));
                }
            }
        }
Ejemplo n.º 4
0
        void AddUrltList(List <AssetFilePathInfo> urlList, StringGridRow row, string csvDir)
        {
            string path    = AdvParser.ParseCell <string>(row, AdvColumnName.Param1);
            int    version = AdvParser.ParseCell <int>(row, AdvColumnName.Version);

            urlList.Add(new AssetFilePathInfo(FileNameToPath(path, csvDir), version));
        }
Ejemplo n.º 5
0
 public AdvFaceIconInfo(StringGridRow row)
 {
     this.FileName = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Icon, "");
     if (!string.IsNullOrEmpty(FileName))
     {
         if (!AdvParser.IsEmptyCell(row, AdvColumnName.IconSubFileName))
         {
             this.IconType        = AdvFaceIconInfo.Type.DicingPattern;
             this.IconSubFileName = AdvParser.ParseCell <string>(row, AdvColumnName.IconSubFileName);
         }
         else
         {
             this.IconType = AdvFaceIconInfo.Type.IconImage;
         }
     }
     else if (!AdvParser.IsEmptyCell(row, AdvColumnName.IconRect))
     {
         float[] rect = row.ParseCellArray <float>(AdvColumnName.IconRect.QuickToString());
         if (rect.Length == 4)
         {
             this.IconType = AdvFaceIconInfo.Type.RectImage;
             this.IconRect = new Rect(rect[0], rect[1], rect[2], rect[3]);
         }
         else
         {
             Debug.LogError(row.ToErrorString("IconRect. Array size is not 4"));
         }
     }
     else
     {
         this.IconType = Type.None;
     }
 }
Ejemplo n.º 6
0
        public AdvCommandSprite(StringGridRow row, AdvSettingDataManager dataManager)
        {
            this.spriteName = AdvParser.ParseCell <string>(row, AdvColumnName.Arg1);
            string fileName = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Arg2, spriteName);

            if (!dataManager.TextureSetting.ContainsLabel(fileName))
            {
                Debug.LogError(row.ToErrorString(fileName + " is not contained in file setting"));
            }

            this.file      = AddLoadFile(dataManager.TextureSetting.LabelToFilePath(fileName));
            this.layerName = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Arg3, "");
            if (!string.IsNullOrEmpty(layerName) && !dataManager.LayerSetting.Contains(layerName, AdvLayerSettingData.LayerType.Sprite))
            {
                Debug.LogError(row.ToErrorString(layerName + " is not contained in layer setting"));
            }

            //表示位置
            float x;

            if (AdvParser.TryParseCell <float>(row, AdvColumnName.Arg4, out x))
            {
                this.x = x;
            }
            float y;

            if (AdvParser.TryParseCell <float>(row, AdvColumnName.Arg5, out y))
            {
                this.y = y;
            }
            //フェード時間
            this.fadeTime = AdvParser.ParseCellOptional <float>(row, AdvColumnName.Arg6, 0.2f);
        }
Ejemplo n.º 7
0
        public bool TryParse(StringGridRow row)
        {
            string key = AdvParser.ParseCell <string>(row, AdvColumnName.Label);

            if (string.IsNullOrEmpty(key))
            {
                return(false);
            }
            else
            {
                this.key             = key;
                this.type            = AdvParser.ParseCell <ParamType>(row, AdvColumnName.Type);
                this.parameterString = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Value, "");
                this.fileType        = AdvParser.ParseCellOptional <FileType>(row, AdvColumnName.FileType, FileType.Default);
                try
                {
                    ParseParameterString();
                    return(true);
                }
                catch
                {
                    return(false);
                }
            }
        }
Ejemplo n.º 8
0
        public AdvCommandBgEvent(StringGridRow row, AdvSettingDataManager dataManager)
        {
            this.label = AdvParser.ParseCell <string>(row, AdvColumnName.Arg1);
            if (!dataManager.TextureSetting.ContainsLabel(label))
            {
                Debug.LogError(row.ToErrorString(label + " is not contained in file setting"));
            }

            this.file = AddLoadFile(dataManager.TextureSetting.LabelToFilePath(label));
            //表示位置
            float x;

            if (AdvParser.TryParseCell <float>(row, AdvColumnName.Arg4, out x))
            {
                this.x = x;
            }
            float y;

            if (AdvParser.TryParseCell <float>(row, AdvColumnName.Arg5, out y))
            {
                this.y = y;
            }
            //フェード時間
            this.fadeTime = AdvParser.ParseCellOptional <float>(row, AdvColumnName.Arg6, 0.2f);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// バージョン
        /// </summary>
//		public int Version { get; private set; }


        /// <summary>
        /// StringGridの一行からデータ初期化
        /// </summary>
        /// <param name="row">初期化するためのデータ</param>
        /// <returns>成否</returns>
        public override bool InitFromStringGridRow(StringGridRow row)
        {
            if (row.IsEmptyOrCommantOut)
            {
                return(false);
            }

            this.RowData = row;
            string key = AdvParser.ParseCell <string>(row, AdvColumnName.Label);

            if (string.IsNullOrEmpty(key))
            {
                return(false);
            }
            else
            {
                InitKey(key);
                this.Type     = AdvParser.ParseCell <SoundType>(row, AdvColumnName.Type);
                this.fileName = AdvParser.ParseCell <string>(row, AdvColumnName.FileName);
//				this.isStreaming = AdvParser.ParseCellOptional<bool>(row, AdvColumnName.Streaming, false);
//				this.Version = AdvParser.ParseCellOptional<int>(row, AdvColumnName.Version, 0);
                this.Title     = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Title, "");
                this.IntroTime = AdvParser.ParseCellOptional <float>(row, AdvColumnName.IntroTime, 0);
                this.Volume    = AdvParser.ParseCellOptional <float>(row, AdvColumnName.Volume, 1);
                return(true);
            }
        }
Ejemplo n.º 10
0
        public AdvGraphicInfo(string dataType, int index, string key, StringGridRow row, IAdvSettingData advSettindData)
        {
            this.DataType    = dataType;
            this.Index       = index;
            this.Key         = key;
            this.SettingData = advSettindData;
            this.RowData     = row;

            switch (DataType)
            {
            case AdvGraphicInfo.TypeParticle:
                this.FileType = AdvGraphicInfo.FileTypeParticle;
                break;

            default:
                this.FileType = AdvParser.ParseCellOptional <string>(row, AdvColumnName.FileType, "");
                break;
            }

            this.FileName = AdvParser.ParseCell <string>(row, AdvColumnName.FileName);
            try
            {
                this.Pivot = ParserUtil.ParsePivotOptional(AdvParser.ParseCellOptional <string>(row, AdvColumnName.Pivot, ""), new Vector2(0.5f, 0.5f));
            }
            catch (System.Exception e)
            {
                Debug.LogError(row.ToErrorString(e.Message));
            }

            try
            {
                this.Pivot0 = ParserUtil.ParsePivotOptional(AdvParser.ParseCellOptional <string>(row, AdvColumnName.Pivot0, ""), new Vector2(0.5f, 0.5f));
            }
            catch (System.Exception e)
            {
                Debug.LogError(row.ToErrorString(e.Message));
            }

            try
            {
                this.Scale = ParserUtil.ParseScale3DOptional(AdvParser.ParseCellOptional <string>(row, AdvColumnName.Scale, ""), Vector3.one);
            }
            catch (System.Exception e)
            {
                Debug.LogError(row.ToErrorString(e.Message));
            }

            Vector3 pos;

            pos.x         = AdvParser.ParseCellOptional <float>(row, AdvColumnName.X, 0);
            pos.y         = AdvParser.ParseCellOptional <float>(row, AdvColumnName.Y, 0);
            pos.z         = AdvParser.ParseCellOptional <float>(row, AdvColumnName.Z, 0);
            this.Position = pos;

            this.SubFileName = AdvParser.ParseCellOptional <string>(row, AdvColumnName.SubFileName, "");

            this.ConditionalExpression = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Conditional, "");
            this.RenderTextureSetting.Parse(row);
        }
Ejemplo n.º 11
0
 public AdvCommandIf(StringGridRow row, AdvSettingDataManager dataManger)
 {
     this.exp = dataManger.DefaultParam.CreateExpressionBoolean(AdvParser.ParseCell <string>(row, AdvColumnName.Arg1));
     if (this.exp.ErrorMsg != null)
     {
         Debug.LogError(row.ToErrorString(this.exp.ErrorMsg));
     }
 }
Ejemplo n.º 12
0
        /// <summary>
        /// StringGridの一行からデータ初期化
        /// </summary>
        /// <param name="row">初期化するためのデータ</param>
        /// <returns>成否</returns>
        public override bool InitFromStringGridRow(StringGridRow row)
        {
            string key = AdvParser.ParseCell <string>(row, AdvColumnName.FileName);

            InitKey(key);
            this.version = AdvParser.ParseCellOptional <int>(row, AdvColumnName.Version, 0);
            return(true);
        }
        // シナリオラベルを解析
        static public string ParseScenarioLabel(StringGridRow row, AdvColumnName columnName)
        {
            string label = AdvParser.ParseCell <string>(row, columnName);

            if (!IsScenarioLabel(label))
            {
                Debug.LogError(row.ToErrorString(LanguageAdvErrorMsg.LocalizeTextFormat(AdvErrorMsg.NotScenarioLabel, label)));
            }
            return(label.Substring(1));
        }
Ejemplo n.º 14
0
        /// <summary>
        /// StringGridの一行からデータ初期化
        /// </summary>
        /// <param name="row">初期化するためのデータ</param>
        /// <returns>成否</returns>
        public override bool InitFromStringGridRow(StringGridRow row)
        {
            this.RowData = row;
            string key = AdvParser.ParseCell <string>(row, AdvColumnName.FileName);

            InitKey(key);
            this.version          = AdvParser.ParseCellOptional <int>(row, AdvColumnName.Version, 0);
            this.ScenaioSheetName = FilePathUtil.GetFileNameWithoutExtension(key);
            return(true);
        }
Ejemplo n.º 15
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);
        }
Ejemplo n.º 16
0
        public AdvCommandBgm(StringGridRow row, AdvSettingDataManager dataManager)
        {
            string label = AdvParser.ParseCell <string>(row, AdvColumnName.Arg1);

            if (!dataManager.SoundSetting.Contains(label, SoundType.Bgm))
            {
                Debug.LogError(row.ToErrorString(label + " is not contained in file setting"));
            }

            this.file = AddLoadFile(dataManager.SoundSetting.LabelToFilePath(label, SoundType.Bgm));
        }
Ejemplo n.º 17
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);
        }
Ejemplo n.º 18
0
        public AdvCommandSendMessage(StringGridRow row)
        {
            this.name = AdvParser.ParseCell <string>(row, AdvColumnName.Arg1);
            this.arg2 = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Arg2, "");
            this.arg3 = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Arg3, "");
            this.arg4 = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Arg4, "");
            this.arg5 = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Arg5, "");

            this.text         = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Text, "");
            this.voice        = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Voice, "");
            this.voiceVersion = AdvParser.ParseCellOptional <int>(row, AdvColumnName.VoiceVersion, 0);
        }
Ejemplo n.º 19
0
 public AdvCommandText(StringGridRow row)
 {
     this.text = AdvParser.ParseCell <string>(row, AdvColumnName.Text);
     if (AdvCommand.IsEditorErrorCheck)
     {
         TextData textData = new TextData(text);
         if (!string.IsNullOrEmpty(textData.ErrorMsg))
         {
             Debug.LogError(row.ToErrorString(textData.ErrorMsg));
         }
     }
 }
Ejemplo n.º 20
0
        public AdvCommandAmbience(StringGridRow row, AdvSettingDataManager dataManager)
        {
            string label = AdvParser.ParseCell <string>(row, AdvColumnName.Arg1);

            if (!dataManager.SoundSetting.Contains(label, SoundType.Ambience))
            {
                Debug.LogError(row.ToErrorString(label + " is not contained in file setting"));
            }

            this.file   = AddLoadFile(dataManager.SoundSetting.LabelToFilePath(label, SoundType.Ambience));
            this.isLoop = AdvParser.ParseCellOptional <bool>(row, AdvColumnName.Arg2, false);
        }
        public AdvCommandBgEvent(StringGridRow row, AdvSettingDataManager dataManager)
            : base(row)
        {
            this.label = AdvParser.ParseCell <string>(row, AdvColumnName.Arg1);
            if (!dataManager.TextureSetting.ContainsLabel(label))
            {
                Debug.LogError(row.ToErrorString(label + " is not contained in file setting"));
            }

            this.graphic = dataManager.TextureSetting.LabelToGraphic(label);
            AddLoadGraphic(graphic);
            this.graphicOperaitonArg = new AdvGraphicOperaitonArg(row, graphic, AdvParser.ParseCellOptional <float>(row, AdvColumnName.Arg6, 0.2f));
        }
        /// <summary>
        /// StringGridの一行からデータ初期化
        /// </summary>
        /// <param name="row">初期化するためのデータ</param>
        /// <returns>成否</returns>
        public override bool InitFromStringGridRow(StringGridRow row)
        {
            string key = AdvParser.ParseCell <string>(row, AdvColumnName.Label);

            InitKey(key);
            this.type             = AdvParser.ParseCell <Type>(row, AdvColumnName.Type);
            this.graphic          = new GraphicInfoList(AdvGraphicInfoParser.TypeTexture, key, AdvParser.ParseCellOptional <string>(row, AdvColumnName.FileType, ""));
            this.thumbnailName    = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Thumbnail, "");
            this.thumbnailVersion = AdvParser.ParseCellOptional <int>(row, AdvColumnName.ThumbnailVersion, 0);
            this.cgCategolly      = AdvParser.ParseCellOptional <string>(row, AdvColumnName.CgCategolly, "");
            this.AddGraphicInfo(row);
            return(true);
        }
Ejemplo n.º 23
0
        /// <summary>
        /// StringGridの一行からデータ初期化
        /// </summary>
        /// <param name="row">初期化するためのデータ</param>
        /// <returns>成否</returns>
        public override bool InitFromStringGridRow(StringGridRow row)
        {
            this.RowData = row;
            string key = AdvParser.ParseCell <string>(row, AdvColumnName.Label);

            InitKey(key);
            this.TextureType      = AdvParser.ParseCell <Type>(row, AdvColumnName.Type);
            this.Graphic          = new AdvGraphicInfoList(key);
            this.thumbnailName    = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Thumbnail, "");
            this.ThumbnailVersion = AdvParser.ParseCellOptional <int>(row, AdvColumnName.ThumbnailVersion, 0);
            this.CgCategory       = AdvParser.ParseCellOptional <string>(row, AdvColumnName.CgCategolly, "");
            this.AddGraphicInfo(row);
            return(true);
        }
Ejemplo n.º 24
0
        /// <summary>
        /// StringGridの一行からデータ初期化
        /// </summary>
        /// <param name="row">初期化するためのデータ</param>
        /// <returns>成否</returns>
        public override bool InitFromStringGridRow(StringGridRow row)
        {
            string key = AdvParser.ParseCell <string>(row, AdvColumnName.LayerName);

            if (string.IsNullOrEmpty(key))
            {
                return(false);
            }
            else
            {
                InitKey(key);
                this.type = AdvParser.ParseCell <LayerType>(row, AdvColumnName.Type);
                this.center.Set(AdvParser.ParseCellOptional <float>(row, AdvColumnName.X, 0), AdvParser.ParseCellOptional <float>(row, AdvColumnName.Y, 0));
                this.order     = AdvParser.ParseCell <int>(row, AdvColumnName.Order);
                this.layerMask = AdvParser.ParseCellOptional <string>(row, AdvColumnName.LayerMask, "");
                return(true);
            }
        }
Ejemplo n.º 25
0
        public AdvCommandJumpParam(StringGridRow row, AdvSettingDataManager dataManager) : base(row)
        {
            this.paramName = AdvParser.ParseCell <string>(row, AdvColumnName.Arg1);
            this.thisRow   = row;
            string str = base.ParseCellOptional <string>(AdvColumnName.Arg2, string.Empty);

            if (string.IsNullOrEmpty(str))
            {
                this.exp = null;
            }
            else
            {
                this.exp = dataManager.DefaultParam.CreateExpressionBoolean(str);
                if (this.exp.ErrorMsg != null)
                {
                    Debug.LogError(base.ToErrorString(this.exp.ErrorMsg));
                }
            }
        }
Ejemplo n.º 26
0
        /// <summary>
        /// StringGridの一行からデータ初期化
        /// </summary>
        /// <param name="row">初期化するためのデータ</param>
        /// <returns>成否</returns>
        public override bool InitFromStringGridRow(StringGridRow row)
        {
            if (row.IsEmptyOrCommantOut)
            {
                return(false);
            }

            this.RowData = row;
            string key = AdvParser.ParseCell <string>(row, AdvColumnName.Label);

            if (string.IsNullOrEmpty(key))
            {
                return(false);
            }
            else
            {
                InitKey(key);
                this.graphic = new AdvGraphicInfo(AdvGraphicInfo.TypeParticle, 0, key, row, this);
                return(true);
            }
        }
Ejemplo n.º 27
0
        /// <summary>
        /// StringGridのデータ解析
        /// </summary>
        /// <param name="grid">解析するデータ</param>
        protected override void ParseFromStringGrid(StringGrid grid)
        {
            string name = "";

            foreach (StringGridRow row in grid.Rows)
            {
                if (row.RowIndex < grid.DataTopRow)
                {
                    continue;                                                                   //データの行じゃない
                }
                if (row.IsEmpty)
                {
                    continue;                                                                                           //データがない
                }
                //名前は空白なら、直前のものと同じ
                name = AdvParser.ParseCellOptional <string>(row, AdvColumnName.CharacterName, name);
                string key = ToFileKey(name, AdvParser.ParseCellOptional <string>(row, AdvColumnName.Pattern, ""));

                Vector2 pivot = Vector2.one * 0.5f;
                try
                {
                    pivot = PivotUtil.ParsePivotOptional(AdvParser.ParseCellOptional <string>(row, AdvColumnName.Pivot, ""), pivot);
                }
                catch (System.Exception e)
                {
                    Debug.LogError(row.ToErrorString(e.Message));
                }
                //データ追加
                AdvCharacterSettingData data = new AdvCharacterSettingData();
                data.Init(key, pivot,
                          AdvParser.ParseCellOptional <float>(row, AdvColumnName.Scale, 1.0f),
                          AdvParser.ParseCell <string>(row, AdvColumnName.FileName),
                          AdvParser.ParseCellOptional <int>(row, AdvColumnName.Version, 0));
                Add(data);
                if (!defaultKey.ContainsKey(name))
                {
                    defaultKey.Add(name, key);
                }
            }
        }
        public AdvCommandSprite(StringGridRow row, AdvSettingDataManager dataManager)
            : base(row)
        {
            this.spriteName = AdvParser.ParseCell <string>(row, AdvColumnName.Arg1);
            string fileName = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Arg2, spriteName);

            if (!dataManager.TextureSetting.ContainsLabel(fileName))
            {
                Debug.LogError(row.ToErrorString(fileName + " is not contained in file setting"));
            }

            this.graphic = dataManager.TextureSetting.LabelToGraphic(fileName);
            AddLoadGraphic(graphic);
            this.layerName = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Arg3, "");
            if (!string.IsNullOrEmpty(layerName) && !dataManager.LayerSetting.Contains(layerName, AdvLayerSettingData.LayerType.Sprite))
            {
                Debug.LogError(row.ToErrorString(layerName + " is not contained in layer setting"));
            }

            //グラフィック表示処理を作成
            this.graphicOperaitonArg = new AdvGraphicOperaitonArg(row, graphic, AdvParser.ParseCellOptional <float>(row, AdvColumnName.Arg6, 0.2f));
        }
Ejemplo n.º 29
0
        //
        static public bool TryParseScenarioLabel(StringGridRow row, AdvColumnName columnName, out string scenarioLabel)
        {
            string label = AdvParser.ParseCell <string>(row, columnName);

            if (!IsScenarioLabel(label))
            {
                scenarioLabel = label;
                return(false);
            }
            else
            {
                if (label.Length >= 3 && label[1] == '*')
                {
                    scenarioLabel = row.Grid.SheetName + '*' + label.Substring(2);
                }
                else
                {
                    scenarioLabel = label.Substring(1);
                }
                return(true);
            }
        }
Ejemplo n.º 30
0
        void ParseFromCsvStringGridRow(StringGridRow row, string csvDir)
        {
            string tag = AdvParser.ParseCell <string>(row, AdvColumnName.Tag);

            switch (tag)
            {
            case TagScenarioSetting:
                AddUrltList(ScenarioSettingUrlList, row, csvDir);
                break;

            case TagCharacterSetting:
                AddUrltList(CharacterSettingUrlList, row, csvDir);
                break;

            case TagTextureSetting:
                AddUrltList(TextureSettingUrlList, row, csvDir);
                break;

            case TagSoundSetting:
                AddUrltList(SoundSettingUrlList, row, csvDir);
                break;

            case TagParamSetting:
                AddUrltList(ParamSettingUrlList, row, csvDir);
                break;

            case TagLayerSetting:
                AddUrltList(LayerSettingUrlList, row, csvDir);
                break;

            case TagSceneGallerySetting:
                AddUrltList(SceneGallerySettingUrlList, row, csvDir);
                break;

            default:
                Debug.LogError(LanguageAdvErrorMsg.LocalizeTextFormat(AdvErrorMsg.UnknownTag, tag));
                break;
            }
        }