//改行などで別の行に線を引く必要があるばあい、その線を作成
		internal List<UguiNovelTextGeneratorAddtionalLine> MakeOtherLineInTextLineSub(UguiNovelTextGenerator generator)
		{
			List<UguiNovelTextGeneratorAddtionalLine> newLineList = new List<UguiNovelTextGeneratorAddtionalLine>();

			int endIndex = stringData.Count - 1;
			foreach (UguiNovelTextLine line in generator.LineDataList)
			{
				if ( textLine == line ) continue;

				bool isFind = false;
				int index = 0;
				int count = 0;
				for (int i = 0; i < stringData.Count; ++i )
				{
					//他の行に文字がある
					if (line.Characters.IndexOf(stringData[i]) >= 0)
					{
						if (!isFind)
						{
							index = i;
							endIndex = Mathf.Min(i, endIndex);
							isFind = true;
						}
						++count;
					}
				}
				if (isFind)
				{
					UguiNovelTextGeneratorAddtionalLine newLine = new UguiNovelTextGeneratorAddtionalLine(this, index, count,generator);
					newLineList.Add(newLine);
					newLine.InitTextLine(generator);
					if (!newLine.characteData.TrySetCharacterInfo(generator.NovelText.font))
					{
						Debug.LogError("Line Font Missing");
					}
				}
			}
			if(endIndex<stringData.Count-1)
			{
				stringData.RemoveRange(endIndex, stringData.Count-endIndex);
			}
			return newLineList;
		}
コード例 #2
0
 //自動改行などのために線を増やす必要がある場合
 UguiNovelTextGeneratorAddtionalLine(UguiNovelTextGeneratorAddtionalLine srcLine, int index, int count, UguiNovelTextGenerator generator)
 {
     InitSub(srcLine.type, generator);
     for (int i = 0; i < count; ++i)
     {
         stringData.Add(srcLine.stringData[index + i]);
     }
 }
		//自動改行などのために線を増やす必要がある場合
		UguiNovelTextGeneratorAddtionalLine(UguiNovelTextGeneratorAddtionalLine srcLine, int index, int count, UguiNovelTextGenerator generator)
		{
			InitSub(srcLine.type, generator);
			for (int i = 0; i < count; ++i)
			{
				stringData.Add(srcLine.stringData[index+i]);
			}
		}
コード例 #4
0
        //改行などで別の行に線を引く必要があるばあい、その線を作成
        internal List <UguiNovelTextGeneratorAddtionalLine> MakeOtherLineInTextLineSub(UguiNovelTextGenerator generator)
        {
            List <UguiNovelTextGeneratorAddtionalLine> newLineList = new List <UguiNovelTextGeneratorAddtionalLine>();

            int endIndex = stringData.Count - 1;

            foreach (UguiNovelTextLine line in generator.LineDataList)
            {
                if (textLine == line)
                {
                    continue;
                }

                bool isFind = false;
                int  index  = 0;
                int  count  = 0;
                for (int i = 0; i < stringData.Count; ++i)
                {
                    //他の行に文字がある
                    if (line.Characters.IndexOf(stringData[i]) >= 0)
                    {
                        if (!isFind)
                        {
                            index    = i;
                            endIndex = Mathf.Min(i, endIndex);
                            isFind   = true;
                        }
                        ++count;
                    }
                }
                if (isFind)
                {
                    UguiNovelTextGeneratorAddtionalLine newLine = new UguiNovelTextGeneratorAddtionalLine(this, index, count, generator);
                    newLineList.Add(newLine);
                    newLine.InitTextLine(generator);
                    if (!newLine.characteData.TrySetCharacterInfo(generator.NovelText.font))
                    {
                        Debug.LogError("Line Font Missing");
                    }
                }
            }
            if (endIndex < stringData.Count - 1)
            {
                stringData.RemoveRange(endIndex, stringData.Count - endIndex);
            }
            return(newLineList);
        }