Beispiel #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();
  }
Beispiel #2
0
 /**
  * Fetches unique identifier for composition.
  *
  * @param componentBits composition to fetch unique identifier for.
  * @return Unique identifier for passed composition.
  */
 int compositionIdentity(BitSet componentBits) {
   int identity = identityResolver.getIdentity(componentBits);
   if (identity > highestSeenIdentity) {
     subscriptionManager.processComponentIdentity(identity, componentBits);
     highestSeenIdentity = identity;
   }
   return identity;
 }