Ejemplo n.º 1
0
 internal void BootInitChapter(AdvChapterData chapter)
 {
     chapter.BootInit();
     foreach (var grid in chapter.SettingList)
     {
         IAdvSettingData data = FindSettingData(grid.SheetName);
         if (data != null)
         {
             data.ParseGrid(grid, BootSetting);
         }
     }
 }
Ejemplo n.º 2
0
 internal void Add(string dataType, StringGridRow row, IAdvSettingData settingData)
 {
     infoList.Add(new AdvGraphicInfo(dataType, InfoList.Count, this.Key, row, settingData));
 }
Ejemplo n.º 3
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.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.º 4
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
            {
                string pivot0String = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Pivot0, "");
                this.EnablePivot0 = !string.IsNullOrEmpty(pivot0String) || pivot0String != "NoUse";
                if (this.EnablePivot0)
                {
                    this.Pivot0 = ParserUtil.ParsePivotOptional(pivot0String, new Vector2(0.5f, 0.5f));
                }
                else
                {
                    this.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.AnimationState = AdvParser.ParseCellOptional <string>(row, AdvColumnName.AnimationState, "");

            this.ConditionalExpression = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Conditional, "");
            this.RenderTextureSetting.Parse(row);

            this.Loop = row.ParseCellOptional <bool>("Loop", true);

            //アイコンファイルの設定
            this.Icon = new AdvFaceIconInfo(row);
        }