Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 1
// destroy.js
(function () {
  /*global adventurejs A*/
  var p = adventurejs.Asset.prototype;

  /**
   * <strong>destroy</strong> is called to remove an asset
   * from the game world.
   * @memberOf adventurejs.Asset
   * @method adventurejs.Asset#destroy
   * @todo What else needs to happen on destroy?
   */
  p.destroy = function Asset_destroy() {
    this.is.destroyed = true;
    this.is.extant = false;

    var results = this.callAction("doDestroyThis");
    if ("undefined" !== typeof results) return results;

    return;
  };
})();