public Sprite LoadSprite(string name)
 {
     if (mSprites.ContainsKey(name))
     {
         return(mSprites[name]);  //有没有想过如果性能瓶颈不是resourcesLoad,而是实例化呢?对象池
     }
     else
     {
         Sprite sprite = mAssetProxyFactory.LoadSprite(name);
         mSprites.Add(name, sprite);
         return(sprite);
     }
 }
 public Sprite LoadSprite(string name)
 {
     if (mSprites.ContainsKey(name))
     {
         return(mSprites[name]);
     }
     else
     {
         Sprite sprite = mAssetFactory.LoadSprite(name);
         mSprites.Add(name, sprite);
         return(sprite);
     }
 }
示例#3
0
 public Sprite LoadSprite(string name)
 {
     if (m_Sprites.ContainsKey(name))
     {
         return(m_Sprites[name]);
     }
     else
     {
         Sprite go = mAssetFactory.LoadSprite(name);
         m_Sprites.Add(name, go);
         return(go);
     }
 }
示例#4
0
 public Sprite LoadSprite(string name)
 {
     if (mSprites.ContainsKey(name))
     {
         return(mSprites[name]);
     }
     else
     {
         Sprite asset = mAssetFactory.LoadSprite(name);
         mSprites[name] = asset;
         return(asset);
     }
 }
 public Sprite LoadSprite(string name)
 {
     if (mSpriteDicts.ContainsKey(name))
     {
         return(mSpriteDicts[name]);
     }
     else
     {
         //常量要通过类名来访问
         Sprite asset = mAssetFactory.LoadSprite(name);
         mSpriteDicts.Add(name, asset);
         return(asset);
     }
 }
示例#6
0
 public Sprite LoadSprite(string name)
 {
     return(resourcesAssetFactory.LoadSprite(name));
 }