public TextureAtlasRegion findRegion(string str) { for (int i = 0; i < _atlasImages.size; i++) { TextureAtlasRegion textureAtlasRegion = _atlasImages.get(i) as TextureAtlasRegion; if (textureAtlasRegion.getName().Equals(str)) { return(textureAtlasRegion); } } return(null); }
public Array findRegions(string str) { Array result = new Array(); for (int i = 0; i < _atlasImages.size; i++) { TextureAtlasRegion textureAtlasRegion = _atlasImages.get(i) as TextureAtlasRegion; if (textureAtlasRegion.getName().Equals(str)) { result.add(textureAtlasRegion); } } return(result); }
public TextureAtlasRegion findRegion(string str, int index) { for (int i = 0; i < _atlasImages.size; i++) { TextureAtlasRegion textureAtlasRegion = _atlasImages.get(i) as TextureAtlasRegion; if (!textureAtlasRegion.getName().Equals(str)) { continue; } if (textureAtlasRegion.getIndex() != index) { continue; } return(textureAtlasRegion); } return(null); }