Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// Tangible_Must.js
(function () {
  /*global adventurejs A*/
  "use strict";

  /**
   * @ajspath adventurejs.Atom.StateManager.Asset_Can.Tangible_Must
   * @augments adventurejs.Tangible_Must
   * @class adventurejs.Tangible_Must
   * @ajsnavheading StateClasses
   * @param {String} game_name Name of top level game instance that is scoped to window.
   * @param {String} name Instance name.
   * @summary A container for state variables.
   * @classdesc
   * <strong>Tangible_Must</strong> is a state management class
   * used to store a variety of booleans for
   * {@link adventurejs.Tangible|Tangible Assets}.
   **/

  class Tangible_Must extends adventurejs.Asset_Can {
    constructor(name = "can", game_name, parent_id) {
      // Call the constructor of the parent class
      super(name, game_name, parent_id);

      this.class = "Tangible_Must";

      /**
       * Set whether this asset must be held to look with, as with a binocular.
       * @var {Boolean} adventurejs.Tangible#must!be_in_hands_to_look_with
       * @default false
       */
      this.be_in_hands_to_look_with = false;

      /**
       * Set whether this asset must be held to look through, as with a telescope.
       * @var {Boolean} adventurejs.Tangible#must!be_in_hands_to_look_through
       * @default false
       */
      this.be_in_hands_to_look_through = false;

      /**
       * Set whether this asset must be worn to look with, as with glasses.
       * @var {Boolean} adventurejs.Tangible#must!be_worn_to_look_with
       * @default false
       */
      this.be_worn_to_look_with = false;

      /**
       * Set whether this asset must be held to be read, as with a small book.
       * @var {Boolean} adventurejs.Tangible#must!be_in_hands_to_read
       * @default false
       */
      this.be_in_hands_to_read = false;

      /**
       * Set whether player will let go of this asset after swinging on it. Meant
       * for situations such as when player swings from a vine and lets go upon landing.
       * @var {Boolean} adventurejs.Tangible#must!let_go_after_swing
       * @default false
       */
      this.let_go_after_swing = false;

      return this;
    }
  }
  adventurejs.Tangible_Must = Tangible_Must;
})();