// Button.js
(function () {
/*global adventurejs A*/
"use strict";
/**
* @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.Control.Button
* @augments adventurejs.Control
* @class adventurejs.Button
* @ajsconstruct MyGame.createAsset({ "class":"Button", "name":"foo", [...] })
* @ajsconstructedby adventurejs.Game#createAsset
* @ajsnavheading ControlClasses
* @param {String} game_name The name of the top level game object.
* @param {String} name A name for the object, to be serialized and used as ID.
* @summary Please don't press this button again.
* @tutorial Tangibles_Controllers
* @todo How to hook a button up to an action.
* @classdesc
* <p>
* <strong>Button</strong> is a subclass of
* {@link adventurejs.Control|Control} that can be
* pushed or pressed.
* </p>
* <pre class="display"><code class="language-javascript">
* </code></pre>
**/
class Button extends adventurejs.Control {
constructor(name, game_name) {
super(name, game_name);
this.class = "Button";
this.singlePluralPairs = [["button", "buttons"]];
this.setDOVs(["push", "press"]);
}
}
adventurejs.Button = Button;
})();