GetTexture() public static méthode

public static GetTexture ( string name ) : Texture
name string
Résultat Texture
Exemple #1
0
        public static Texture GetTexture(string name)
        {
            string lname = name.ToLower();

            lock (textures)
            {
                if (textures.Keys.Contains(lname))
                {
                    return(textures[lname]);
                }
                else
                {
                    if (File.Exists(name))
                    {
                        return(new Texture(name));
                    }
                    else
                    {
                        Log.e("Texture.GetTexture(): No file with name '" + name
                              + "' exists on disk!");
                        return(Texture.GetTexture("error.png"));
                    }
                }
            }
        }
Exemple #2
0
 public Sprite(string filename)
 {
     Texture = Texture.GetTexture(filename);
 }