// Token: 0x060002FF RID: 767 RVA: 0x0003C7E8 File Offset: 0x0003A9E8 public static Texture2D changeColor(Texture2D texture, int targetColorIndex, Color baseColor, int range) { Color[] data = new Color[texture.Width * texture.Height]; texture.GetData <Color>(data); Color targetColor = data[targetColorIndex]; for (int i = 0; i < data.Length; i++) { if (ColorChanger.IsSimilar(data[i], targetColor, range, range, range)) { data[i] = new Color((int)(baseColor.R + (data[i].R - targetColor.R)), (int)(baseColor.G + (data[i].G - targetColor.G)), (int)(baseColor.B + (data[i].B - targetColor.B))); } } texture.SetData <Color>(data); return(texture); }
// Token: 0x060002FE RID: 766 RVA: 0x0003C754 File Offset: 0x0003A954 public static Texture2D changeColor(Texture2D texture, int targetColorIndex, int redtint, int greentint, int bluetint, int range) { Color[] data = new Color[texture.Width * texture.Height]; texture.GetData <Color>(data); Color targetColor = data[targetColorIndex]; for (int i = 0; i < data.Length; i++) { if (ColorChanger.IsSimilar(data[i], targetColor, range, range, range)) { data[i] = new Color((int)data[i].R + redtint, (int)data[i].G + greentint, (int)data[i].B + bluetint); } } texture.SetData <Color>(data); return(texture); }
public static Texture2D changeColor(Texture2D texture, int targetColorIndex, Color baseColor, int range) { Color[] array = new Color[texture.Width * texture.Height]; texture.GetData <Color>(array); Color test = array[targetColorIndex]; for (int i = 0; i < array.Length; i++) { if (ColorChanger.IsSimilar(array[i], test, range, range, range)) { array[i] = new Color((int)(baseColor.R + (array[i].R - test.R)), (int)(baseColor.G + (array[i].G - test.G)), (int)(baseColor.B + (array[i].B - test.B))); } } texture.SetData <Color>(array); return(texture); }
public static Texture2D changeColor(Texture2D texture, int targetColorIndex, Color baseColor, int range) { Color[] data = new Color[texture.Width * texture.Height]; texture.GetData <Color>(data); Color test = data[targetColorIndex]; for (int index = 0; index < data.Length; ++index) { if (ColorChanger.IsSimilar(data[index], test, range, range, range)) { data[index] = new Color((int)baseColor.R + ((int)data[index].R - (int)test.R), (int)baseColor.G + ((int)data[index].G - (int)test.G), (int)baseColor.B + ((int)data[index].B - (int)test.B)); } } texture.SetData <Color>(data); return(texture); }
public static Texture2D changeColor(Texture2D texture, int targetColorIndex, int redtint, int greentint, int bluetint, int range) { Color[] array = new Color[texture.Width * texture.Height]; texture.GetData <Color>(array); Color test = array[targetColorIndex]; for (int i = 0; i < array.Length; i++) { if (ColorChanger.IsSimilar(array[i], test, range, range, range)) { array[i] = new Color((int)array[i].R + redtint, (int)array[i].G + greentint, (int)array[i].B + bluetint); } } texture.SetData <Color>(array); return(texture); }