예제 #1
0
 @Override
 public void removeComponent(EntityComponent component) {
   if (components.remove(component)) {
     component.onDetached();
   }
 }
예제 #2
0
 @Override
 public void attachComponent(EntityComponent component) {
   component.attachToEntity(this);
   component.onAttached();
   components.add(new AtomicReference<EntityComponent>(component));
 }