GFGGLoader.cs 612 B

12345678910111213141516171819202122232425
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. using FairyGUI;
  4. using VEngine;
  5. namespace GFGGame
  6. {
  7. public class GFGGLoader : GLoader
  8. {
  9. protected override void LoadExternal()
  10. {
  11. Texture2D texture = GFGAsset.Load<Texture2D>(this.url);
  12. if (texture != null)
  13. onExternalLoadSuccess(new NTexture(texture));
  14. else
  15. onExternalLoadFailed();
  16. }
  17. protected override void FreeExternal(NTexture texture)
  18. {
  19. //释放外部载入的资源
  20. GFGAsset.Release(this.url);
  21. }
  22. }
  23. }