code: function() {
          if (this.length === 1 && !this.__frozen) {
              this.trigger("Freeze", this);
              this._freezeCallbacks();
              this.__frozen = true;
          } else {
              for (var i = 0; i < this.length; i++) {
                  var e = entities[this[i]];
                  if (e && !e.__frozen) {
                      e.trigger("Freeze", e);
                      e._freezeCallbacks();
                      // Set a frozen flag.  (This is distinct from the __callbackFrozen flag)
                      e.__frozen = true;
                  }
              }
          }
          return this;
      }
docs: @
  #.freeze
  @comp Crafty Core
  @kind Method
  
  @sign public this .freeze()
  
  @triggers Freeze - Directly before the entity is frozen
  
  Freezes the entity.  A frozen entity will not receive events or be displayed by graphics systems.
  It is also removed from the spatial map, which means it will not be found by collisions,
  raycasting, or similar functions.
  
  This method may be called upon a collection of entities.
  
  @note Because the entity no longer listens to events, modifying its properties can result in an inconsistent state.
  
  If custom components need to handle frozen entities, they can listen to the "Freeze" event, which will be triggered before the event system is disabled.
  
  @example
  
  ```
  // Freeze all entities with the Dead component
  Crafty("Dead").freeze();
  ```
  
  @see .unfreeze