Beispiel #1
0
        public void ApplyEffect(Transform transform, int vertexStart, int vertexEnd, UILabel.Effect effect, Color effectColor, float size)
        {
            int num;

            if (effect != UILabel.Effect.None && vertexStart != vertexEnd && !NGUITools.ZeroAlpha(effectColor.a) && size != 0f && !MeshBuffer.ZeroedXYScale(transform) && this.SeekPrimitiveIndex(vertexStart, out num))
            {
                float          single  = 1f / size;
                UILabel.Effect effect1 = effect;
                if (effect1 == UILabel.Effect.Shadow)
                {
                    this.ApplyShadow(vertexStart, vertexEnd, num, single, effectColor.r, effectColor.g, effectColor.b, effectColor.a);
                }
                else if (effect1 == UILabel.Effect.Outline)
                {
                    this.ApplyOutline(vertexStart, vertexEnd, num, single, effectColor.r, effectColor.g, effectColor.b, effectColor.a);
                }
            }
        }
Beispiel #2
0
        // Token: 0x06004B4C RID: 19276 RVA: 0x00125E60 File Offset: 0x00124060
        public void ApplyEffect(Transform transform, int vertexStart, int vertexEnd, global::UILabel.Effect effect, Color effectColor, float size)
        {
            int primitiveIndex;

            if (effect != global::UILabel.Effect.None && vertexStart != vertexEnd && !global::NGUITools.ZeroAlpha(effectColor.a) && size != 0f && !MeshBuffer.ZeroedXYScale(transform) && this.SeekPrimitiveIndex(vertexStart, out primitiveIndex))
            {
                float pixel = 1f / size;
                if (effect != global::UILabel.Effect.Shadow)
                {
                    if (effect == global::UILabel.Effect.Outline)
                    {
                        this.ApplyOutline(vertexStart, vertexEnd, primitiveIndex, pixel, effectColor.r, effectColor.g, effectColor.b, effectColor.a);
                    }
                }
                else
                {
                    this.ApplyShadow(vertexStart, vertexEnd, primitiveIndex, pixel, effectColor.r, effectColor.g, effectColor.b, effectColor.a);
                }
            }
        }