// setLinkedState.js
(function () {
/* global AdventureJS A */
var p = AdventureJS.Assets.Asset.prototype;
/**
* <strong>setLinkedState</strong> sets an asset and
* its linked asset to the specified state.
* @memberOf AdventureJS.Assets.Asset
* @method AdventureJS.Assets.Asset#setLinkedState
* @param {Boolean} bool
*/
p.setLinkedState = function Asset_setLinkedState(property, value) {
this.is[property] = value;
if (this.linked_asset) {
let asset = this.game.getAsset(this.linked_asset);
if (asset) asset.is[property] = value;
}
};
})();