Ejemplo n.º 1
0
        public AdvCommandText(StringGridRow row, AdvSettingDataManager dataManager)
            : base(row)
        {
            string voice = ParseCellOptional <string>(AdvColumnName.Voice, "");

            //ボイスファイル設定
            if (!string.IsNullOrEmpty(voice) && !AdvCommand.IsEditorErrorCheck)
            {
                VoiceFile = AddLoadFile(dataManager.BootSetting.GetLocalizeVoiceFilePath(voice), AssetFileType.Sound, new AdvVoiceSetting(this.RowData));
//				if (VoiceFile != null) VoiceFile.Version = ParseCellOptional<int>(AdvColumnName.VoiceVersion, 0);
            }
            //ページコントロール
            this.PageCtrlType = ParseCellOptional <AdvPageControllerType>(AdvColumnName.PageCtrl, AdvPageControllerType.InputBrPage);
            this.IsNextBr     = AdvPageController.IsBrType(PageCtrlType);
            this.IsPageEnd    = AdvPageController.IsPageEndType(PageCtrlType);

            //エディター用のチェック
            if (AdvCommand.IsEditorErrorCheck)
            {
                TextData textData = new TextData(ParseCellLocalizedText());
                if (!string.IsNullOrEmpty(textData.ErrorMsg))
                {
                    Debug.LogError(ToErrorString(textData.ErrorMsg));
                }
            }
        }
Ejemplo n.º 2
0
        public AdvScenarioTextDataInPage(AdvCommand command)
        {
            Command = command;
            if (command.RowData == null)
            {
                //暗黙的だけど、選択肢の後の改ページ待ちのために
                IsCharacterShowOnly = false;
                PageCtrlType        = AdvPageControllerType.None;
                IsPageEnd           = true;
                IsEmptyText         = true;
                return;
            }
            else
            {
                //暗黙的だけどキャラ表示のみの場合
                IsCharacterShowOnly = command.IsEmptyCell(AdvColumnName.Text) && command.IsEmptyCell(AdvColumnName.PageCtrl);
                if (IsCharacterShowOnly)
                {
                    IsEmptyText = true;
                    IsPageEnd   = false;
                }
                else
                {
                    IsEmptyText = false;
                    if (command.IsEmptyCell(AdvColumnName.PageCtrl))
                    {
                        this.PageCtrlType = AdvPageControllerType.None;
                    }
                    else
                    {
                        float  autoBrTime;
                        string pageCtrl = command.ParseCell <string>(AdvColumnName.PageCtrl);
                        if (float.TryParse(pageCtrl, out autoBrTime))
                        {
                            AutoBrTime = autoBrTime;
                        }
                        else
                        {
                            this.PageCtrlType = command.ParseCellOptional <AdvPageControllerType>(AdvColumnName.PageCtrl, AdvPageControllerType.None);
                        }
                    }
                    IsPageEnd = AdvPageController.IsPageEndType(PageCtrlType);
                    IsNextBr  = AdvPageController.IsBrType(PageCtrlType);

                    //エディター用のチェック
                    if (AdvCommand.IsEditorErrorCheck)
                    {
                        TextData textData = new TextData(command.ParseCellLocalizedText());
                        if (!string.IsNullOrEmpty(textData.ErrorMsg))
                        {
                            Debug.LogError(command.ToErrorString(textData.ErrorMsg));
                        }
                    }
                }
            }
        }
Ejemplo n.º 3
0
 public override string[] GetExtraCommandIdArray(AdvCommand next)
 {
     if ((next != null) && ((next is AdvCommandSelection) || (next is AdvCommandSelectionClick)))
     {
         return(null);
     }
     if (AdvPageController.IsPageEndType(base.ParseCellOptional <AdvPageControllerType>(AdvColumnName.PageCtrl, AdvPageControllerType.InputBrPage)))
     {
         return(new string[] { "SelectionEnd", "PageControl" });
     }
     return(new string[] { "SelectionEnd" });
 }
Ejemplo n.º 4
0
 // 選択肢終了などの特別なコマンドを自動生成する場合、そのIDを返す
 public override string[] GetExtraCommandIdArray(AdvCommand next)
 {
     if (next != null && ((next is AdvCommandSelection) || (next is AdvCommandSelectionClick)))
     {
         return(null);
     }
     else
     {
         if (AdvPageController.IsPageEndType(ParseCellOptional <AdvPageControllerType>(AdvColumnName.PageCtrl, AdvPageControllerType.InputBrPage)))
         {
             return(new string[] { AdvCommandParser.IdSelectionEnd, AdvCommandParser.IdPageControler });
         }
         else
         {
             return(new string[] { AdvCommandParser.IdSelectionEnd });
         }
     }
 }
Ejemplo n.º 5
0
        public AdvCommandText(StringGridRow row, AdvSettingDataManager dataManager)
            : base(row)
        {
            //ボイスファイル設定
            InitVoiceFile(dataManager);
            //ページコントロール
            this.PageCtrlType = ParseCellOptional <AdvPageControllerType>(AdvColumnName.PageCtrl, AdvPageControllerType.InputBrPage);
            this.IsNextBr     = AdvPageController.IsBrType(PageCtrlType);
            this.IsPageEnd    = AdvPageController.IsPageEndType(PageCtrlType);

            //エディター用のチェック
            if (AdvCommand.IsEditorErrorCheck)
            {
                TextData textData = new TextData(ParseCellLocalizedText());
                if (!string.IsNullOrEmpty(textData.ErrorMsg))
                {
                    Debug.LogError(ToErrorString(textData.ErrorMsg));
                }
            }
        }
 public override bool IsTypePageEnd()
 {
     return(AdvPageController.IsPageEndType(this.pageCtrlType));
 }