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

            return(material);
        }
Example #6
0
 public Material GetStaticMaterial()
 {
     if (material == null)
     {
         material = MaterialManager.GetVertexLitCopy();
         material.SetColor(Color.black);
     }
     return(material.material);
 }
Example #7
0
 static public SmartMaterial GetMaterial()
 {
     if (material == null)
     {
         material = MaterialManager.GetAlphaCopy();
         material.SetTexture(Resources.Load <Texture>("Pattern/1"));
     }
     return(material);
 }
        public SmartMaterial GetStaticMaterial()
        {
            if (staticMaterial == null || staticMaterial.material == null)
            {
                staticMaterial = MaterialManager.GetVertexLitCopy();
                staticMaterial.SetColor(Color.black);
            }

            return(staticMaterial);
        }
Example #9
0
        public Material GetFillMaterial()
        {
            if (customMaterial)
            {
                return(customFillMaterial);
            }
            else
            {
                if (fillMaterial == null)
                {
                    fillMaterial = MaterialManager.GetVertexLitCopy();
                }

                fillMaterial.SetColor(slicerColor);

                return(fillMaterial.material);
            }
        }
Example #10
0
        public Material GetBorderMaterial()
        {
            if (customMaterial)
            {
                return(customBoarderMaterial);
            }
            else
            {
                if (boarderMaterial == null)
                {
                    boarderMaterial = MaterialManager.GetVertexLitCopy();
                }

                boarderMaterial.SetColor(Color.black);

                return(boarderMaterial.material);
            }
        }
Example #11
0
        static private SmartMaterial GetVertexLit()
        {
            if (vertexLit == null || vertexLit.material == null)
            {
                if (Slicer2DSettings.GetRenderingPipeline() == Slicer2DSettings.RenderingPipeline.Universal)
                {
                    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);
        }
Example #12
0
 void Start()
 {
     lineMaterial       = MaterialManager.GetVertexLitCopy();
     lineMaterialBorder = MaterialManager.GetVertexLitCopy();
 }