Exemplo n.º 1
0
  public int getRequiredResources() {
    int resources = Brick.NO_RESOURCES;

    for (Sprite sprite : spriteList) {
      resources |= sprite.getRequiredResources();
    }
    return resources;
  }
Exemplo n.º 2
0
 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);
 }