private Array<EntityProxy> getOverlappingEntities (EntityProxy baseEntity, boolean up) { Values<EntityProxy> entities = proxyCache.getCache().values(); Array<EntityProxy> overlapping = new Array<>(); for (EntityProxy entity : entities) { if (entity.getLayerID() != baseEntity.getLayerID()) continue; if (baseEntity != entity && baseEntity.getBoundingRectangle().overlaps(entity.getBoundingRectangle())) { if (up ? (baseEntity.getZIndex() <= entity.getZIndex()) : (baseEntity.getZIndex() >= entity.getZIndex())) overlapping.add(entity); } } return overlapping; }
public void rebuildOutline () { buildGroupNodeState(tree.getNodes()); tree.clearChildren(); Values<EntityProxy> proxies = proxyCache.getCache().values(); Array<EntityProxy> ignoreProxies = new Array<>(); for (EntityProxy proxy : proxies) { if (ignoreProxies.contains(proxy, true)) { continue; } int gid = proxy.getLastGroupId(); if (gid != -1) { Array<EntityProxy> result = entitiesCollector.collect(proxy.getLayerID(), gid); ignoreProxies.addAll(result); buildTreeRecursively(result, gid, null); } else { tree.add(new ProxyNode(proxy)); } } expandedNodes.clear(); }
private void updateStyleValuesForRename(String oldName, String newName) { Values<Array<StyleData>> values = main.getJsonData().getClassStyleMap().values(); for (Array<StyleData> styles : values) { for (StyleData style : styles) { for (StyleProperty styleProperty : style.properties.values()) { if (Drawable.class.isAssignableFrom(styleProperty.type)) { if (styleProperty.value != null && styleProperty.value.equals(oldName)) { styleProperty.value = newName; } } } } } }
public void free(PooledEffect effect) { Values<ParticleEffectPool> values = pools.values(); while (values.hasNext) { values.next().free(effect); } }
public void clear() { Values<ParticleEffectPool> values = pools.values(); while (values.hasNext) { values.next().clear(); } }
@Override public void dispose() { logger.info("shutting down"); Values<ShaderProgram> values = shaders.values(); while (values.hasNext) { values.next().dispose(); } }
public Values<String> getRegisteredTags() { return tagsByEntity.values(); }