예제 #1
0
  /**
   * Once clear() is called, the Entity it is pretty much dead, it's lost all of its components and
   * the ComponentEventSystem is nulled out.
   */
  public void clear() {
    final ArrayList<Component> comps = new ArrayList<Component>(components);
    removeComponents(comps);

    comps.clear();
    eventSystem.clearHandlers();
  }