Пример #1
0
 @Override
 protected void removed(Entity e) {
   super.removed(e);
   if (tm.get(e).getParent() != null) {
     tm.get(tm.get(e).getParent()).removeChild(e);
   } else roots.remove(e);
 }
Пример #2
0
 public void removeFromTeam(String player) {
   String team = teamByPlayer.remove(player);
   if (team != null) {
     Bag<String> players = playersByTeam.get(team);
     if (players != null) {
       players.remove(player);
     }
   }
 }
Пример #3
0
 public void setParent(Entity parent, Entity child, String bone) {
   if (tm.get(child).getParent() != null) tm.get(tm.get(child).getParent()).removeChild(child);
   else if (parent != null) roots.remove(child);
   tm.get(child).setParent(parent, bone);
   if (parent != null) {
     tm.get(parent).addChild(child);
   } else {
     if (!roots.contains(child)) roots.add(child);
   }
 }
 private void removeFromSystem(Entity e) {
   actives.remove(e);
   e.getSystemBits().clear(this.getSystemIndex());
   removed(e);
 }