humus-old/common/traits/darkened.trait.js
2019-05-06 12:13:47 -05:00

27 lines
403 B
JavaScript

import {Trait} from '@avocado/entity';
// Input handling.
export class Darkened extends Trait {
static defaultParams() {
return {
isDarkened: true,
};
}
static type() {
return 'darkened';
}
constructor(entity, params, state) {
super(entity, params, state);
this._isDarkened = this.params.isDarkened;
}
get isDarkened() {
return this._isDarkened;
}
}