private int GetInitialVertexToColorize(TEXT_COMPONENT _textComponent)
    {
        if (textChars == null)
        {
            textChars = _privateProperties.text.ToCharArray();
        }
        int num = 0;

        switch (_textComponent)
        {
        case TEXT_COMPONENT.Main:
            if (_privateProperties.enableShadow && _privateProperties.enableOutline)
            {
                num = 5;
            }
            else if (_privateProperties.enableOutline)
            {
                num = 4;
            }
            else if (_privateProperties.enableShadow)
            {
                num = 1;
            }
            break;

        case TEXT_COMPONENT.Shadow:
            num = 0;
            break;

        case TEXT_COMPONENT.Outline:
            num = 1;
            break;
        }
        return(textChars.Length * 4 * num);
    }
예제 #2
0
    private int GetFinalVertexToColorize(TEXT_COMPONENT _textComponent)
    {
        int lastVertex          = 0;
        int meshOptionMultipler = 0;

        switch (_textComponent)
        {
        case TEXT_COMPONENT.Main:
            meshOptionMultipler = GetVertexIndexPosition() + 1;

            lastVertex = parsingList.Length * 4 * meshOptionMultipler;
            break;

        case TEXT_COMPONENT.Shadow:
            lastVertex = parsingList.Length * 4;
            break;

        case TEXT_COMPONENT.Outline:
            meshOptionMultipler = GetVertexIndexPosition();

            lastVertex = parsingList.Length * 4 * meshOptionMultipler;
            break;
        }

        return(lastVertex);
    }
예제 #3
0
    /// <summary>
    /// Gets the initial vertex to colorize.
    /// </summary>
    /// <returns>
    /// The initial vertex to colorize.
    /// </returns>
    /// <param name='_textComponent'>
    /// _text component.
    /// </param>
    private int GetInitialVertexToColorize(TEXT_COMPONENT _textComponent)
    {
        int meshOptionMultipler = 0;

        switch (_textComponent)
        {
        case TEXT_COMPONENT.Main:
            meshOptionMultipler += GetVertexIndexPosition();
            break;

        case TEXT_COMPONENT.Shadow:
            meshOptionMultipler = 0;
            break;

        case TEXT_COMPONENT.Outline:
            if (_privateProperties.enableShadow)
            {
                meshOptionMultipler = 1;
            }
            else
            {
                meshOptionMultipler = 0;
            }
            break;
        }

        return(parsingList.Length * 4 * meshOptionMultipler);
    }
예제 #4
0
    private int GetFinalVertexToColorize(TEXT_COMPONENT _textComponent)
    {
        if (textChars == null)
        {
            textChars = _privateProperties.text.ToCharArray();
        }

        int lastVertex          = 0;
        int meshOptionMultipler = 0;

        switch (_textComponent)
        {
        case TEXT_COMPONENT.Main:

            if (_privateProperties.enableShadow && _privateProperties.enableOutline)
            {
                meshOptionMultipler = 6;
            }
            else if (_privateProperties.enableOutline)
            {
                meshOptionMultipler = 5;
            }
            else if (_privateProperties.enableShadow)
            {
                meshOptionMultipler = 2;
            }

            lastVertex = textChars.Length * 4 * meshOptionMultipler;

            break;

        case TEXT_COMPONENT.Shadow:
            lastVertex = textChars.Length * 4;
            break;

        case TEXT_COMPONENT.Outline:

            if (_privateProperties.enableShadow)
            {
                meshOptionMultipler = 1;
            }
            else
            {
                meshOptionMultipler = 0;
            }

            lastVertex = textChars.Length * 4 * (meshOptionMultipler + 4);
            break;
        }

        return(lastVertex);
    }
예제 #5
0
    /// <summary>
    /// Gets the initial vertex to colorize.
    /// </summary>
    /// <returns>
    /// The initial vertex to colorize.
    /// </returns>
    /// <param name='_textComponent'>
    /// _text component.
    /// </param>
    private int GetInitialVertexToColorize(TEXT_COMPONENT _textComponent)
    {
        if (textChars == null)
        {
            textChars = _privateProperties.text.ToCharArray();
        }

        int meshOptionMultipler = 0;

        switch (_textComponent)
        {
        case TEXT_COMPONENT.Main:

            if (_privateProperties.enableShadow && _privateProperties.enableOutline)
            {
                meshOptionMultipler = 5;
            }
            else if (_privateProperties.enableOutline)
            {
                meshOptionMultipler = 4;
            }
            else if (_privateProperties.enableShadow)
            {
                meshOptionMultipler = 1;
            }
            break;

        case TEXT_COMPONENT.Shadow:
            meshOptionMultipler = 0;
            break;

        case TEXT_COMPONENT.Outline:
            if (_privateProperties.enableShadow)
            {
                meshOptionMultipler = 1;
            }
            else
            {
                meshOptionMultipler = 0;
            }
            break;
        }

        return(textChars.Length * 4 * meshOptionMultipler);
    }
    private int GetFinalVertexToColorize(TEXT_COMPONENT _textComponent)
    {
        if (textChars == null)
        {
            textChars = _privateProperties.text.ToCharArray();
        }
        int result = 0;
        int num    = 0;

        switch (_textComponent)
        {
        case TEXT_COMPONENT.Main:
            if (_privateProperties.enableShadow && _privateProperties.enableOutline)
            {
                num = 6;
            }
            else if (_privateProperties.enableOutline)
            {
                num = 5;
            }
            else if (_privateProperties.enableShadow)
            {
                num = 2;
            }
            result = textChars.Length * 4 * num;
            break;

        case TEXT_COMPONENT.Shadow:
            result = textChars.Length * 4;
            break;

        case TEXT_COMPONENT.Outline:
            num    = ((!_privateProperties.enableShadow) ? 1 : 2);
            result = textChars.Length * 4 * (num + 4);
            break;
        }
        return(result);
    }
    /// <summary>
    /// Gets the initial vertex to colorize.
    /// </summary>
    /// <returns>
    /// The initial vertex to colorize.
    /// </returns>
    /// <param name='_textComponent'>
    /// _text component.
    /// </param>
    private int GetInitialVertexToColorize(TEXT_COMPONENT _textComponent)
    {
        if (textChars == null)
                textChars = _privateProperties.text.ToCharArray();

        int meshOptionMultipler = 0;

        switch (_textComponent)
        {
            case TEXT_COMPONENT.Main:

                if (_privateProperties.enableShadow && _privateProperties.enableOutline)
                    meshOptionMultipler = 5;
                else if (_privateProperties.enableOutline)
                    meshOptionMultipler = 4;
                else if (_privateProperties.enableShadow)
                    meshOptionMultipler = 1;
            break;
            case TEXT_COMPONENT.Shadow:
                    meshOptionMultipler = 0;
            break;

            case TEXT_COMPONENT.Outline:
                if (_privateProperties.enableShadow)
                    meshOptionMultipler = 1;
                else
                    meshOptionMultipler = 0;
            break;
        }

        return  textChars.Length*4*meshOptionMultipler;
    }
    private int GetFinalVertexToColorize(TEXT_COMPONENT _textComponent)
    {
        if (textChars == null)
            textChars = _privateProperties.text.ToCharArray();

        int lastVertex = 0;
        int meshOptionMultipler = 0;

        switch (_textComponent)
        {
            case TEXT_COMPONENT.Main:

                if (_privateProperties.enableShadow && _privateProperties.enableOutline)
                        meshOptionMultipler = 6;
                else if (_privateProperties.enableOutline)
                        meshOptionMultipler = 5;
                else if (_privateProperties.enableShadow)
                        meshOptionMultipler = 2;

                lastVertex = textChars.Length*4*meshOptionMultipler;

            break;

            case TEXT_COMPONENT.Shadow:
                lastVertex =  textChars.Length*4;
            break;

            case TEXT_COMPONENT.Outline:

                if (_privateProperties.enableShadow)
                    meshOptionMultipler = 1;
                else
                    meshOptionMultipler = 0;

                lastVertex = textChars.Length*4*(meshOptionMultipler +4);
            break;
        }

        return lastVertex;
    }
예제 #9
0
    /// <summary>
    /// Creates the characters.
    /// </summary>
    /// <param name="alignmentPass"></param>
    /// <param name="characterPosition"></param>
    /// <param name="_offset"></param>
    /// <param name="_textComponent"></param>
    void CreateCharacters(ref int alignmentPass, ref int characterPosition, Vector3 _offset, TEXT_COMPONENT _textComponent)
    {
        ResetHelperVariables();
        for (int i = 0; i < parsingList.Length; i++)
        {
            CustomFontParsing parsing     = parsingList[i];
            Color             topColor    = parsing.ColorTop;
            Color             bottomColor = parsing.ColorBottom;
            switch (_textComponent)
            {
            case TEXT_COMPONENT.Shadow: topColor = bottomColor = _privateProperties.shadowColor; break;

            case TEXT_COMPONENT.Outline: topColor = bottomColor = _privateProperties.outlineColor; break;
            }
            if (!CreateCharacter(parsing.Char, characterPosition, _offset, topColor, bottomColor, parsing.Style))
            {
                break;
            }
            characterPosition++;
        }
        SetAlignment(alignmentPass++, characterLength);
    }