27 lines
403 B
JavaScript
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;
|
|
}
|
|
|
|
}
|
|
|