novaparse
Version:
An EV Nova file parser for NovaJS
26 lines • 799 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const NovaResourceBase_1 = require("./NovaResourceBase");
class BoomResource extends NovaResourceBase_1.BaseResource {
constructor(resource, idSpace) {
super(resource, idSpace);
var d = this.data;
this.animationRate = d.getInt16(0);
this.sound = d.getInt16(2);
if (this.sound != -1) {
this.sound += 300;
}
else {
this.sound = null;
}
this.graphic = d.getInt16(4);
if (this.graphic != -1) {
this.graphic += 400;
}
else {
throw new Error("Boom id " + this.id + " had no graphic");
}
}
}
exports.BoomResource = BoomResource;
//# sourceMappingURL=BoomResource.js.map