예제 #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);
        }