コード例 #1
0
        public TextureRef FindOrCreate(string name)
        {
            foreach (TextureRef t in _textures)
            {
                if (t.Name.Equals(name, StringComparison.OrdinalIgnoreCase))
                {
                    return(t);
                }
            }

            TextureRef tr = new TextureRef(name);

            _textures.Add(tr);
            return(tr);
        }
コード例 #2
0
 public static int Compare(TextureRef t1, TextureRef t2)
 {
     return(String.Compare(t1.Name, t2.Name, false));
 }