// Token: 0x060000EA RID: 234 RVA: 0x0000A224 File Offset: 0x00008424
        public void recolorEyes(Color lightestColor)
        {
            Color[] tmp = new Color[23];
            this.baseTexture.GetData <Color>(0, new Rectangle?(new Rectangle(256, 0, 23, 1)), tmp, 0, 23);
            Color darkerColor = FarmerRenderer.changeBrightness(lightestColor, -75);

            if (lightestColor.Equals(darkerColor))
            {
                lightestColor.B += 10;
            }
            for (int i = 256; i < tmp.Length; i++)
            {
                if (lightestColor.Equals(tmp[i]))
                {
                    lightestColor.G += 1;
                }
                if (darkerColor.Equals(tmp[i]))
                {
                    darkerColor.G += 1;
                }
            }
            ColorChanger.swapColor(this.baseTexture, 276, (int)lightestColor.R, (int)lightestColor.G, (int)lightestColor.B);
            ColorChanger.swapColor(this.baseTexture, 277, (int)darkerColor.R, (int)darkerColor.G, (int)darkerColor.B);
        }
Ejemplo n.º 2
0
        public void recolorEyes(Color lightestColor)
        {
            Color[] data = new Color[23];
            this.baseTexture.GetData <Color>(0, new Rectangle?(new Rectangle(256, 0, 23, 1)), data, 0, 23);
            Color other = FarmerRenderer.changeBrightness(lightestColor, -75);

            if (lightestColor.Equals(other))
            {
                lightestColor.B += (byte)10;
            }
            for (int index = 256; index < data.Length; ++index)
            {
                if (lightestColor.Equals(data[index]))
                {
                    ++lightestColor.G;
                }
                if (other.Equals(data[index]))
                {
                    ++other.G;
                }
            }
            ColorChanger.swapColor(this.baseTexture, 276, (int)lightestColor.R, (int)lightestColor.G, (int)lightestColor.B);
            ColorChanger.swapColor(this.baseTexture, 277, (int)other.R, (int)other.G, (int)other.B);
        }
Ejemplo n.º 3
0
        public void recolorEyes(Color lightestColor)
        {
            Color[] array = new Color[23];
            this.baseTexture.GetData <Color>(0, new Rectangle?(new Rectangle(256, 0, 23, 1)), array, 0, 23);
            Color other = FarmerRenderer.changeBrightness(lightestColor, -75);

            if (lightestColor.Equals(other))
            {
                lightestColor.B += 10;
            }
            for (int i = 256; i < array.Length; i++)
            {
                if (lightestColor.Equals(array[i]))
                {
                    lightestColor.G += 1;
                }
                if (other.Equals(array[i]))
                {
                    other.G += 1;
                }
            }
            ColorChanger.swapColor(this.baseTexture, 276, (int)lightestColor.R, (int)lightestColor.G, (int)lightestColor.B);
            ColorChanger.swapColor(this.baseTexture, 277, (int)other.R, (int)other.G, (int)other.B);
        }