Exemplo n.º 1
0
    public void SetHudTextString(string text, string fontName, int fontSize, float lifeTime, Vector3 velocity, bool useGravity, bool canOverlapped)
    {
        if (!EnableHudText)
            return;

        if (m_ptc == null)
            m_ptc = gameObject.AddComponent<ECPateTextComponent>();

        m_ptc.SetHudTextString2(text, fontName, fontSize, lifeTime, velocity, useGravity, canOverlapped);
    }
Exemplo n.º 2
0
    public void SetHudTextString(string content, UInt32 color, float delay)
    {
        if (!EnableHudText)
            return;

        Color c = new Color();
        UInt32 temp = color & 0xff;
        c.a = (float)temp / 255.0f;
        temp = (color >> 8) & 0xff;
        c.b = (float)temp / 255.0f;
        temp = (color >> 16) & 0xff;
        c.g = (float)temp / 255.0f;
        temp = (color >> 24) & 0xff;
        c.r = (float)temp / 255.0f;

        if (m_ptc == null)
            m_ptc = gameObject.AddComponent<ECPateTextComponent>();

        m_ptc.SetHudTextString(content, c, delay);
    }