示例#1
0
 public AdvBacklogDataInPage(AdvCommandText dataInPage, AdvCharacterInfo characterInfo)
 {
     LogText       = "";
     VoiceFileName = "";
     if (characterInfo != null)
     {
         CharacterLabel    = characterInfo.Label;
         CharacterNameText = characterInfo.LocalizeNameText;
     }
     else
     {
         CharacterLabel    = "";
         CharacterNameText = "";
     }
     LogText = TextParser.MakeLogText(dataInPage.ParseCellLocalizedText());
     if (dataInPage.VoiceFile != null)
     {
         VoiceFileName = dataInPage.VoiceFile.FileName;
         LogText       = TextParser.AddTag(LogText, TextParser.TagSound, dataInPage.VoiceFile.FileName);
     }
     else
     {
         VoiceFileName = "";
     }
     if (dataInPage.IsNextBr)
     {
         LogText += "\n";
     }
 }
示例#2
0
 //エンティティ処理のためにテキストデータを修正
 internal void ChangeTextDataOnCreateEntity(int index, AdvCommandText entity)
 {
     if (TextDataList.Count < index)
     {
         Debug.LogError("  Index error On CreateEntity ");
         return;
     }
     TextDataList[index] = entity;
 }
 internal void AddCurrentPageLog(AdvCommandText dataInPage, AdvCharacterInfo characterInfo)
 {
     this.onAddData.Invoke(this);
     if (!this.IgnoreLog)
     {
         AdvBacklog lastLog = this.LastLog;
         if (lastLog != null)
         {
             lastLog.AddData(dataInPage, characterInfo);
         }
     }
 }
示例#4
0
        //現在のページを更新
        internal void AddCurrentPageLog(AdvCommandText dataInPage, AdvCharacterInfo characterInfo)
        {
            onAddData.Invoke(this);
            if (IgnoreLog)
            {
                return;
            }

            AdvBacklog log = LastLog;

            if (log != null)
            {
                log.AddData(dataInPage, characterInfo);
            }
        }
示例#5
0
        /// <summary>
        /// 現在のページのテキストデータを更新
        /// </summary>
        public void UpdatePageTextData(AdvCommandText text)
        {
            bool isLastBr = this.Contoller.IsBr;

            CurrentTextDataInPage = text;
            this.Contoller.Update(CurrentTextDataInPage.PageCtrlType);
            if (isLastBr)
            {
                ++CurrentTextLengthMax;
            }

            RemakeText();
            Engine.UiManager.ShowMessageWindow();
            Engine.BacklogManager.AddCurrentPageLog(CurrentTextDataInPage, CharacterInfo);
        }
示例#6
0
        //今のコマンドから、エンティティ処理したコマンドを作成
        public static AdvCommand CreateEntityCommand(AdvCommand original, AdvEngine engine, AdvScenarioPageData pageData)
        {
            StringGridRow row = new StringGridRow(original.RowData.Grid, original.RowData.RowIndex);

            row.DebugIndex = original.RowData.DebugIndex;

            string[] strings = original.EntityData.CreateCommandStrings(engine.Param.GetParameter);
            row.InitFromStringArray(strings);
            AdvCommand entityCommand = AdvCommandParser.CreateCommand(original.Id, row, engine.DataManager.SettingDataManager);

            if (entityCommand is AdvCommandText)
            {
                AdvCommandText textCommand = entityCommand as AdvCommandText;
                textCommand.InitOnCreateEntity(original as AdvCommandText);
            }
            return(entityCommand);
        }
示例#7
0
        //指定のデータまでのテキストを取得
        public string MakeText(AdvCommandText currentText)
        {
            StringBuilder builder = new StringBuilder();

            foreach (var item in TextDataList)
            {
                builder.Append(item.ParseCellLocalizedText());
                if (item.IsNextBr)
                {
                    builder.Append("\n");
                }
                if (item == currentText)
                {
                    return(builder.ToString());
                }
            }
            Debug.LogError("Not found text data");
            return("");
        }
示例#8
0
 //エンティティコマンドとして利用
 internal void InitOnCreateEntity(AdvCommandText original)
 {
     this.PageData = original.PageData;
     PageData.ChangeTextDataOnCreateEntity(original.IndexPageData, this);
 }
示例#9
0
 //データの追加
 internal void AddData(AdvCommandText log, AdvCharacterInfo characterInfo)
 {
     dataList.Add(new AdvBacklogDataInPage(log, characterInfo));
 }
示例#10
0
 internal void AddTextData(AdvCommandText command)
 {
     TextDataList.Add(command);
 }