public int getRequiredResources() { int resources = Brick.NO_RESOURCES; for (Sprite sprite : spriteList) { resources |= sprite.getRequiredResources(); } return resources; }
public void rename(String newSpriteName) { if ((getRequiredResources() & Brick.PHYSICS) > 0) { List<Sprite> spriteList = ProjectManager.getInstance().getCurrentProject().getSpriteList(); for (Sprite currentSprite : spriteList) { if ((currentSprite.getRequiredResources() & Brick.PHYSICS) > 0) { currentSprite.updateCollisionBroadcastMessages(getName(), newSpriteName); } } } setName(newSpriteName); }