Exemple #1
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);
        }
        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);
        }
Exemple #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
            {
                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);
        }