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

  /**
   * @ajspath adventurejs.Atom.StateManager.Asset_Is.Tangible_Is.Aperture_Is
   * @augments adventurejs.Tangible_Is
   * @class adventurejs.Aperture_Is
   * @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>Aperture_Is.js</strong>  is a state management class
   * used to handle a variety of properties for
   * {@link adventurejs.Aperture|Aperture Assets}.
   **/

  class Aperture_Is extends adventurejs.Tangible_Is {
    constructor(name = "is", game_name, parent_id) {
      // Call the constructor of the parent class
      super(name, game_name, parent_id);
      this.class = "Aperture_Is";

      this._used = false;
      this._closed = false;
      this._locked = false;
      this._sealed = false;

      this.aperture = true;
      this.listed_in_room = false;

      return this;
    }

    get closed() {
      return this._closed;
    }
    set closed(value) {
      this._closed = value;
      this.setLinkedAssetState("_closed", value);
    }

    get locked() {
      return this._locked;
    }
    set locked(value) {
      this._locked = value;
      this.setLinkedAssetState("_locked", value);
    }

    get sealed() {
      return this._sealed;
    }
    set sealed(value) {
      this._sealed = value;
      this.setLinkedAssetState("_sealed", value);
    }

    get used() {
      return this._used;
    }
    set used(value) {
      this._used = value;
      this.setLinkedAssetState("_used", value);
    }

    get known() {
      return this._known;
    }
    set known(value) {
      this._known = value;
      this.setLinkedAssetState("_known", value);
    }

    get seen() {
      return this._seen;
    }
    set seen(value) {
      this._seen = value;
      this.setLinkedAssetState("_seen", value);
    }
  }
  adventurejs.Aperture_Is = Aperture_Is;
})();