// GlobalAsset.js
(function () {
/*global adventurejs A*/
"use strict";
/**
* @ajspath adventurejs.Atom.Asset.GlobalAsset
* @augments adventurejs.Asset
* @class adventurejs.GlobalAsset
* @ajsconstruct MyGame.createAsset({ "class":"GlobalAsset", "name":"foo", [...] })
* @ajsconstructedby adventurejs.Game#createAsset
* @ajsinternal
* @ajsnavheading LibraryAssets
* @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 Special class, parent class for global assets.
* @todo This isn't complete, is it?
* @classdesc
* <p>
* <strong>GlobalAsset</strong> is a special class of abstract
* global {@link adventurejs.Asset|Assets}.
* Authors should not have to construct or modify this Asset.
* </p>
**/
class GlobalAsset extends adventurejs.Asset {
constructor(name, game_name) {
super(name, game_name);
this.class = "GlobalAsset";
this.is.singleton = true;
this.is.global = true;
this.is.known = true;
this.is.seen = true;
// write "foo" on page
// write "foo" on page with pen
this.setDOV("write");
// say "hello" to man
this.setDOV("say");
//type "hello" on keyboard
this.setDOV("type");
// enter "hello" on
this.setDOV("enter");
}
}
adventurejs.GlobalAsset = GlobalAsset;
})();