public AudioClip LoadAudioClip(string name)
 {
     if (mAudioClips.ContainsKey(name))
     {
         return(mAudioClips[name]);  //有没有想过如果性能瓶颈不是resourcesLoad,而是实例化呢?对象池
     }
     else
     {
         AudioClip audio = mAssetProxyFactory.LoadAudioClip(name);
         mAudioClips.Add(name, audio);
         return(audio);
     }
 }
 public AudioClip LoadAudioClip(string name)
 {
     if (mAudioClips.ContainsKey(name))
     {
         return(mAudioClips[name]);
     }
     else
     {
         AudioClip audio = mAssetFactory.LoadAudioClip(name);
         mAudioClips.Add(name, audio);
         return(audio);
     }
 }
Exemplo n.º 3
0
 public AudioClip LoadAudioClip(string name)
 {
     if (mAudioClips.ContainsKey(name))
     {
         return(mAudioClips[name]);
     }
     else
     {
         AudioClip asset = mAssetFactory.LoadAudioClip(name);
         mAudioClips[name] = asset;
         return(asset);
     }
 }
 public AudioClip LoadAudioClip(string name)
 {
     if (mAudioDicts.ContainsKey(name))
     {
         return(mAudioDicts[name]);
     }
     else
     {
         //常量要通过类名来访问
         AudioClip asset = mAssetFactory.LoadAudioClip(name);
         mAudioDicts.Add(name, asset);
         return(asset);
     }
 }
Exemplo n.º 5
0
 public AudioClip LoadAudioClip(string name)
 {
     return(resourcesAssetFactory.LoadAudioClip(name));
 }