Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
// isPlacedAtAspect.js
(function () {
  /* global AdventureJS A */
  var p = AdventureJS.Assets.Tangible.prototype;
  /**
   * Verify that asset is in the specified aspect.
   * For example, cap.isPlacedAtAspect( 'attached' )
   * @memberOf AdventureJS.Assets.Tangible
   * @method AdventureJS.Assets.Tangible#isPlacedAtAspect
   * @return {Boolean}
   */
  p.isPlacedAtAspect = function Tangible_isPlacedAtAspect(aspect) {
    if (!this._place) return false;
    if (!this._place.aspect) return false;
    if (aspect && aspect !== this._place.aspect) return false;
    return true;
  };
})();