Ejemplo n.º 1
0
        //描画用の頂点情報を取得(文字送りに対応)
        internal List <UIVertex> GetDrawVertex(Vector2 endPosition, UguiNovelTextGenerator generator)
        {
            List <UIVertex> list = new List <UIVertex>();

            if (!TopCharaceter.IsVisible)
            {
                return(list);
            }

            float xMin = TopCharaceter.PositionX;
            float xMax = TopCharaceter.EndPositionX;

            foreach (UguiNovelTextCharacter c in stringData)
            {
                if (!c.IsVisible)
                {
                    break;
                }
                xMax = c.EndPositionX;
            }
            CharacteData.Width = xMax - xMin;
            CharacteData.MakeVerts(TopCharaceter.Verts[0].color, generator);
            list.AddRange(CharacteData.Verts);
            return(list);
        }
Ejemplo n.º 2
0
        //描画用の頂点情報を追加(文字送りに対応)
        internal void AddDrawVertex(List <UIVertex> verts, Vector2 endPosition, UguiNovelTextGenerator generator)
        {
            if (!TopCharacter.IsVisible)
            {
                return;
            }

            float xMin = TopCharacter.PositionX;
            float xMax = TopCharacter.EndPositionX;

            foreach (UguiNovelTextCharacter c in stringData)
            {
                if (!c.IsVisible)
                {
                    break;
                }
                xMax = Mathf.Max(xMax, c.EndPositionX);
            }
            Color color = Color.white;

            foreach (UguiNovelTextCharacter c in stringData)
            {
                if (!c.IsVisible)
                {
                    break;
                }
                if (c.Verts != null)
                {
                    color = c.Verts[0].color;
                }
            }
            CharacteData.Width = xMax - xMin;
            CharacteData.MakeVerts(color, generator);
            verts.AddRange(CharacteData.Verts);
        }