Advertisement
madmenyo

LibGDX: Loading a skin with AssetManager.

Sep 11th, 2015
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. public class Assets {
  2.     public static AssetManager manager = new AssetManager();
  3.  
  4.     public static final AssetDescriptor<TextureAtlas> uiAtlas =
  5.             new AssetDescriptor<TextureAtlas>("ui/uiskin.pack", TextureAtlas.class);
  6.  
  7.     public static final AssetDescriptor<Skin> uiSkin =
  8.             new AssetDescriptor<Skin>("ui/uiskin.json", Skin.class,
  9.                     new SkinLoader.SkinParameter("ui/uiskin.pack"));
  10.  
  11.     public static void load()
  12.     {
  13.         manager.load(uiAtlas);
  14.         manager.load(uiSkin);
  15.     }
  16.  
  17.     public void dispose()
  18.     {
  19.         manager.dispose();
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement