Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// hasPropertyOnAspectAt.js
(function () {
  /*global adventurejs A*/
  "use strict";
  var p = adventurejs.Tangible.prototype;
  /**
   * Determine whether asset has specified property on
   * specified aspect. Useful for testing whether properties
   * exist before trying to assign to them.
   * @memberOf adventurejs.Tangible
   * @method adventurejs.Tangible#hasPropertyOnAspectAt
   * @return {Boolean}
   * @deprecated this will likely go away
   */
  p.hasPropertyOnAspectAt = function Tangible_hasPropertyOnAspectAt(
    property,
    aspect
  ) {
    if (
      !aspect ||
      !property ||
      !this.aspects[aspect] ||
      !this.aspects[aspect][property]
    ) {
      return false;
    }
    return true;
  };
})();