Advertisement
Guest User

asdf

a guest
May 6th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. public static List<AtlasRegion> extractRegionsByNames(TextureAtlas textureAtlas, List<String> regionNames) {
  2.  
  3.         LinkedList<AtlasRegion> regions = new LinkedList<>();      
  4.  
  5.         for (String regionName : regionNames) {
  6.  
  7.             AtlasRegion region = textureAtlas.findRegion(regionName);
  8.            
  9.             if(region != null) {
  10.                 regions.add(region);
  11.             }
  12.  
  13.         }
  14.  
  15.         return regions;
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement