Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
// getAncestorAsset.js
(function () {
  /* global AdventureJS A */
  var p = AdventureJS.Assets.Tangible.prototype;
  /**
   * Get this asset's topmost parent, excluding {@link AdventureJS.Assets.Room|Room}.
   * @memberOf AdventureJS.Assets.Tangible
   * @method AdventureJS.Assets.Tangible#getAncestorAsset
   * @returns {String}
   */
  p.getAncestorAsset = function Tangible_getAncestorAsset() {
    return this.game.getAsset(this.getAncestorId());
  };
})();