Пример #1
0
 static private SmartMaterial GetSprite()
 {
     if (sprite == null || sprite.material == null)
     {
         sprite = new SmartMaterial("Sprite/Default");
     }
     return(sprite);
 }
Пример #2
0
 public SmartMaterial(SmartMaterial met)
 {
     if (met.material != null)
     {
         material             = new Material(met.material);
         material.mainTexture = met.material.mainTexture;
     }
 }
Пример #3
0
 static private SmartMaterial GetAlpha()
 {
     if (alpha == null || alpha.material == null)
     {
         alpha = new SmartMaterial("Mobile/Particles/Alpha Blended");
     }
     return(alpha);
 }
Пример #4
0
 static private SmartMaterial GetAdditive()
 {
     if (additive == null || additive.material == null)
     {
         additive = new SmartMaterial("Mobile/Particles/Additive");
     }
     return(additive);
 }
        public SmartMaterial GetMaterial()
        {
            if (material == null || material.material == null)
            {
                material = MaterialManager.GetVertexLitCopy();
            }

            return(material);
        }
        public SmartMaterial GetStaticMaterial()
        {
            if (staticMaterial == null || staticMaterial.material == null)
            {
                staticMaterial = MaterialManager.GetVertexLitCopy();
                staticMaterial.SetColor(Color.black);
                //staticMaterial.color =  ("_Emission", Color.black);
            }

            return(staticMaterial);
        }
Пример #7
0
        static private SmartMaterial GetVertexLit()
        {
            if (vertexLit == null || vertexLit.material == null)
            {
                if (Slicer2D.Settings.GetRenderingPipeline() == Slicer2D.Settings.RenderingPipeline.BuiltIn)
                {
                    vertexLit = new SmartMaterial("Legacy Shaders/Transparent/VertexLit");
                }
                else
                {
                    vertexLit = new SmartMaterial("Sprites/Default");
                }

                if (vertexLit != null)
                {
                    vertexLit.SetTexture(Resources.Load("Textures/LineTexture16") as Texture);
                }
            }
            return(vertexLit);
        }