Пример #1
0
 protected AdvCommand(StringGridRow row)
 {
     this.RowData = row;
 }
Пример #2
0
 public AdvCommandShowMap(StringGridRow row, MapManager mapM) : base(row)
 {
     this.mapDataName = base.ParseCell <string>(AdvColumnName.Arg1);
     this.mapManager  = mapM;
 }
 internal void AddGraphicInfo(StringGridRow row)
 {
     Graphic.Add(row);
 }
Пример #4
0
 internal void AddGraphicInfo(StringGridRow row)
 {
     Graphic.Add(AdvGraphicInfo.TypeCharacter, row, this);
 }
Пример #5
0
 public AdvVoiceSetting(StringGridRow row)
 {
     this.RowData = row;
 }
Пример #6
0
 public AdvCommandShake(StringGridRow row, AdvSettingDataManager dataManager)
     : base(row)
 {
     this.effectData = new AdvEffectDataShake(this);
 }
Пример #7
0
 public AdvCommandGuiActive(StringGridRow row)
     : base(row)
 {
     this.name     = this.ParseCellOptional <string>(AdvColumnName.Arg1, "");
     this.isActive = this.ParseCell <bool>(AdvColumnName.Arg2);
 }
Пример #8
0
 //現在の設定言語にローカライズされたテキストを取得
 public static string ParseCellLocalizedText(StringGridRow row, AdvColumnName defaultColumnName)
 {
     return(ParseCellLocalizedText(row, defaultColumnName.QuickToString()));
 }
 public AdvCommandShowMessageWindow(StringGridRow row) : base(row)
 {
 }
Пример #10
0
 //指定の名前のセルを、型Tとして解析・取得(データがなかったらfalse)
 public static bool TryParseCell <T>(StringGridRow row, AdvColumnName name, out T val)
 {
     return(row.TryParseCell <T>(Localize(name), out val));
 }
Пример #11
0
 //セルが空かどうか
 public static bool IsEmptyCell(StringGridRow row, AdvColumnName name)
 {
     return(row.IsEmptyCell(Localize(name)));
 }
Пример #12
0
 //指定の名前のセルを、型Tとして解析・取得(データがなかったらデフォルト値を返す)
 public static T ParseCellOptional <T>(StringGridRow row, AdvColumnName name, T defaultVal)
 {
     return(row.ParseCellOptional <T>(Localize(name), defaultVal));
 }
Пример #13
0
 //指定の名前のセルを、型Tとして解析・取得(データがなかったらエラーメッセージを出す)
 public static T ParseCell <T>(StringGridRow row, AdvColumnName name)
 {
     return(row.ParseCell <T>(Localize(name)));
 }
Пример #14
0
 public AdvCommandBgOff(StringGridRow row) : base(row)
 {
     this.fadeTime = base.ParseCellOptional <float>(AdvColumnName.Arg6, 0.2f);
 }
Пример #15
0
 public AdvCommandGuiPosition(StringGridRow row) : base(row)
 {
     this.name = base.ParseCell <string>(AdvColumnName.Arg1);
     this.x    = base.ParseCellOptionalNull <float>(AdvColumnName.Arg2);
     this.y    = base.ParseCellOptionalNull <float>(AdvColumnName.Arg3);
 }
 public AdvCommandItemPopClose(StringGridRow row, AdvSettingDataManager dataManager)
     : base(row)
 {
 }
Пример #17
0
 public AdvCommandFadeBase(StringGridRow row, bool inverse)
     : base(row)
 {
     this.inverse = inverse;
 }
 public AdvCommandShake(StringGridRow row, AdvSettingDataManager dataManager) : base(row, dataManager)
 {
 }
 public AdvCommandEndSceneGallery(StringGridRow row) : base(row)
 {
 }
Пример #20
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);
        }
Пример #21
0
 /// <summary>
 /// StringGridの一行からデータ初期化
 /// ただし、このクラスに限っては未使用
 /// </summary>
 /// <param name="row">初期化するためのデータ</param>
 /// <returns>成否</returns>
 public override bool InitFromStringGridRow(StringGridRow row)
 {
     Debug.LogError("Not Use");
     return(false);
 }
Пример #22
0
 internal void Add(StringGridRow row)
 {
     Add(new GraphicInfo(row));
 }
Пример #23
0
        //連続するデータとして追加できる場合はする。基本はしない
        protected override AdvCharacterSettingData ParseFromStringGridRow(AdvCharacterSettingData last, StringGridRow row)
        {
            //キャラ名
            string name = AdvParser.ParseCellOptional <string>(row, AdvColumnName.CharacterName, "");
            //表示パターン
            string pattern = AdvParser.ParseCellOptional <string>(row, AdvColumnName.Pattern, "");
            //表示名
            string nameText = AdvParser.ParseCellOptional <string>(row, AdvColumnName.NameText, "");

            //キャラ名が空白なら、直前と同じキャラ名を使う
            if (string.IsNullOrEmpty(name))
            {
                if (last == null)
                {
                    Debug.LogError(row.ToErrorString("Not Found Chacter Name"));
                    return(null);
                }
                name = last.Name;
            }

            //表示名が空で、直前のデータとキャラ名が同じならその名前を使う
            if (string.IsNullOrEmpty(nameText))
            {
                if (last != null && (name == last.Name))
                {
                    nameText = last.NameText;
                }
                else
                {
                    nameText = name;
                }
            }

            AdvCharacterSettingData data = new AdvCharacterSettingData();

            data.Init(name, pattern, nameText, row);

            if (!Dictionary.ContainsKey(data.Key))
            {
                AddData(data);
                if (!defaultKey.ContainsKey(name))
                {
                    defaultKey.Add(name, data.Key);
                }
                return(data);
            }
            else
            {
                string errorMsg = "";
                errorMsg += row.ToErrorString(ColorUtil.AddColorTag(data.Key, Color.red) + "  is already contains");
                Debug.LogError(errorMsg);
            }
            return(null);
        }
Пример #24
0
 public AdvCommandWaitCustom(StringGridRow row)
     : base(row)
 {
 }
Пример #25
0
        //コマンドの表示
        void OnGuiCommand(AdvCommand command)
        {
            StringGridRow row = command.RowData;

            Color color            = GUI.color;
            bool  isCurrentCommand = engine.ScenarioPlayer.MainThread.IsCurrentCommand(command);

            //現在のコマンドなら色を変える
            if (isCurrentCommand)
            {
                GUI.color = Color.red;
            }
            //テキストは別表示

            EditorGUILayout.BeginVertical(BoxStyle);
            {
                string text = "";
                EditorGUILayout.BeginHorizontal();
                {
                    GUILayout.Label(command.CommandLabel, GUILayout.Width(200));
                    if (row == null || row.Strings == null)
                    {
//						GUILayout.Label("", BoxStyle);
                    }
                    else
                    {
                        int commandIndex;
                        if (!row.Grid.TryGetColumnIndex(AdvColumnName.Command.ToString(), out commandIndex))
                        {
                            commandIndex = -1;
                        }

                        int textIndex;
                        if (!row.Grid.TryGetColumnIndex(AdvColumnName.Text.ToString(), out textIndex))
                        {
                            textIndex = -1;
                        }
                        if (textIndex > 0 && textIndex < row.Strings.Length)
                        {
                            text = row.Strings[textIndex];
                        }

                        bool isEmpty = true;
                        for (int i = 0; i < row.Strings.Length; ++i)
                        {
                            if (i != textIndex && i != commandIndex && !string.IsNullOrEmpty(row.Strings[i]))
                            {
                                isEmpty = false;
                            }
                        }
                        if (isEmpty)
                        {
                        }
                        else
                        {
                            for (int i = 0; i < row.Strings.Length; ++i)
                            {
                                if (i != textIndex && i != commandIndex)
                                {
                                    GUILayout.Label(row.Strings[i], BoxStyle);
                                }
                            }
                        }
                    }
                }
                EditorGUILayout.EndHorizontal();
                if (!string.IsNullOrEmpty(text) && (command is AdvCommandText || command is AdvCommandSelection))
                {
                    GUILayout.Label(text);
                }
            }
            EditorGUILayout.EndVertical();

            //現在のコマンド
            if (isCurrentCommand)
            {
                //コマンドが変わったときにオートスクロール
                if (Event.current.type == EventType.Repaint && isChangeCurrentCommandTrigger)
                {
                    Rect  rect = GUILayoutUtility.GetLastRect();
                    float minY = Mathf.Max(0, rect.y - this.position.height + rect.height + 50) + scrollTopY;
                    float maxY = rect.y - 50;
                    this.scrollPosition2.y        = Mathf.Clamp(this.scrollPosition.y, minY, maxY);
                    isChangeCurrentCommandTrigger = false;
                }
                GUI.color = color;
            }
        }
Пример #26
0
 /// <summary>
 /// 文字列グリッドの行データから、データを初期化
 /// </summary>
 /// <param name="row">初期化するための文字列グリッドの行データ</param>
 /// <returns>成否。空のデータの場合などはfalseが帰る</returns>
 internal bool InitFromStringGridRowMain(StringGridRow row)
 {
     this.RowData = row;
     return(InitFromStringGridRow(row));
 }
Пример #27
0
 public AdvCommandEndPage(StringGridRow row) : base(row)
 {
 }
Пример #28
0
 /// <summary>
 /// 文字列グリッドの行データから、データを初期化
 /// </summary>
 /// <param name="row">初期化するための文字列グリッドの行データ</param>
 /// <returns>成否。空のデータの場合などはfalseが帰る</returns>
 public abstract bool InitFromStringGridRow(StringGridRow row);
Пример #29
0
 public AdvCommandEndSubroutine(StringGridRow row, AdvSettingDataManager dataManager)
     : base(row)
 {
 }
Пример #30
0
 public AdvCommandFadeOut(StringGridRow row)
     : base(row, false)
 {
 }