Exemplo n.º 1
0
  /**
   * Inform subscribers of state changes.
   *
   * <p>Performs callbacks on registered instances of {@link
   * com.artemis.EntitySubscription.SubscriptionListener}.
   *
   * <p>Will run repeatedly until any state changes caused by subscribers have been handled.
   */
  void updateEntityStates() {
    // changed can be populated by EntityTransmuters and Archetypes,
    // bypassing the editPool.
    while (!changed.isEmpty() || editPool.processEntities()) am.process(changed, deleted);

    cm.clean();
  }
Exemplo n.º 2
0
 /**
  * Delete the entity from the world.
  *
  * <p>The entity is considered to be in a final state once invoked; adding or removing components
  * from an entity scheduled for deletion will likely throw exceptions.
  *
  * @param entityId the entity to delete
  */
 public void delete(int entityId) {
   editPool.delete(entityId);
 }
Exemplo n.º 3
0
 /**
  * Get entity editor for entity.
  *
  * @return a fast albeit verbose editor to perform batch changes to entities.
  * @param entityId entity to fetch editor for.
  */
 public EntityEdit edit(int entityId) {
   return editPool.obtainEditor(entityId);
 }