public Graphic_Multi GetGraphic(Color color)
            {
                for (int i = 0; i < this.graphics.Count; i++)
                {
                    if (color.IndistinguishableFrom(this.graphics[i].Key))
                    {
                        return(this.graphics[i].Value);
                    }
                }
                Graphic_Multi graphic_Multi = (Graphic_Multi)GraphicDatabase.Get <Graphic_Multi>(this.graphicPath, ShaderDatabase.CutoutSkin, Vector2.one, color);

                this.graphics.Add(new KeyValuePair <Color, Graphic_Multi>(color, graphic_Multi));
                return(graphic_Multi);
            }
Example #2
0
            public Graphic_Multi GetGraphic(Color color, bool dessicated = false)
            {
                for (int i = 0; i < graphics.Count; i++)
                {
                    if (color.IndistinguishableFrom(graphics[i].Key))
                    {
                        return(graphics[i].Value);
                    }
                }
                Shader        shader        = dessicated ? ShaderDatabase.Cutout : ShaderDatabase.CutoutSkin;
                Graphic_Multi graphic_Multi = (Graphic_Multi)GraphicDatabase.Get <Graphic_Multi>(graphicPath, shader, Vector2.one, color);

                graphics.Add(new KeyValuePair <Color, Graphic_Multi>(color, graphic_Multi));
                return(graphic_Multi);
            }