static DebugMatsRandom()
 {
     for (int i = 0; i < 100; i++)
     {
         DebugMatsRandom.mats[i] = SolidColorMaterials.SimpleSolidColorMaterial(new Color(Rand.Value, Rand.Value, Rand.Value, 0.25f), false);
     }
 }
 static DebugMatsRandom()
 {
     mats = new Material[100];
     for (int i = 0; i < 100; i++)
     {
         mats[i] = SolidColorMaterials.SimpleSolidColorMaterial(new Color(Rand.Value, Rand.Value, Rand.Value, 0.25f));
     }
 }
Exemplo n.º 3
0
 private void CreateMaterialIfNeeded(bool careAboutVertexColors)
 {
     if (this.material == null || this.materialCaresAboutVertexColors != careAboutVertexColors)
     {
         this.material = SolidColorMaterials.SimpleSolidColorMaterial(new Color(this.giver.Color.r, this.giver.Color.g, this.giver.Color.b, this.opacity * this.giver.Color.a), careAboutVertexColors);
         this.materialCaresAboutVertexColors = careAboutVertexColors;
         this.material.renderQueue           = 3600;
     }
 }
Exemplo n.º 4
0
 public static Material MaterialOf(Color col)
 {
     if (colorMatDict.TryGetValue(col, out Material value))
     {
         return(value);
     }
     value = SolidColorMaterials.SimpleSolidColorMaterial(col);
     colorMatDict.Add(col, value);
     return(value);
 }
 private void CreateMaterialIfNeeded(bool careAboutVertexColors)
 {
     if (material == null || materialCaresAboutVertexColors != careAboutVertexColors)
     {
         Color color = colorGetter();
         material = SolidColorMaterials.SimpleSolidColorMaterial(new Color(color.r, color.g, color.b, opacity * color.a), careAboutVertexColors);
         materialCaresAboutVertexColors = careAboutVertexColors;
         material.renderQueue           = renderQueue;
     }
 }
Exemplo n.º 6
0
        public static Material MaterialOf(Color col)
        {
            Material material = default(Material);

            if (DebugSolidColorMats.colorMatDict.TryGetValue(col, out material))
            {
                return(material);
            }
            material = SolidColorMaterials.SimpleSolidColorMaterial(col, false);
            DebugSolidColorMats.colorMatDict.Add(col, material);
            return(material);
        }
Exemplo n.º 7
0
        public static Material MaterialOf(Color col)
        {
            Material material;
            Material result;

            if (DebugSolidColorMats.colorMatDict.TryGetValue(col, out material))
            {
                result = material;
            }
            else
            {
                material = SolidColorMaterials.SimpleSolidColorMaterial(col, false);
                DebugSolidColorMats.colorMatDict.Add(col, material);
                result = material;
            }
            return(result);
        }
Exemplo n.º 8
0
 private void CreateMaterialIfNeeded(bool careAboutVertexColors)
 {
     if (material == null || materialCaresAboutVertexColors != careAboutVertexColors)
     {
         Color color  = giver.Color;
         float r      = color.r;
         Color color2 = giver.Color;
         float g      = color2.g;
         Color color3 = giver.Color;
         float b      = color3.b;
         float num    = opacity;
         Color color4 = giver.Color;
         material = SolidColorMaterials.SimpleSolidColorMaterial(new Color(r, g, b, num * color4.a), careAboutVertexColors);
         materialCaresAboutVertexColors = careAboutVertexColors;
         material.renderQueue           = 3600;
     }
 }
        private void CreateMaterialIfNeeded(bool careAboutVertexColors)
        {
            if (!((Object)this.material == (Object)null) && this.materialCaresAboutVertexColors == careAboutVertexColors)
            {
                return;
            }
            Color color  = this.giver.Color;
            float r      = color.r;
            Color color2 = this.giver.Color;
            float g      = color2.g;
            Color color3 = this.giver.Color;
            float b      = color3.b;
            float num    = this.opacity;
            Color color4 = this.giver.Color;

            this.material = SolidColorMaterials.SimpleSolidColorMaterial(new Color(r, g, b, num * color4.a), careAboutVertexColors);
            this.materialCaresAboutVertexColors = careAboutVertexColors;
            this.material.renderQueue           = 3600;
        }