public void addToGraphics(LinkedList<GraphicsComponent> components) { for (Entity e : entities) { if (components.contains(e.getGraphics())) System.out.println("From Square: redundant local storage adding: " + e); if (e.getGraphics() != null) components.add(e.getGraphics()); } }
// graphics: public void clearFromGraphics(LinkedList<GraphicsComponent> components) { for (Entity e : entities) { if (e.getGraphics() != null) components.remove(e.getGraphics()); } }