isaacscript-common
Version:
Helper functions and features for IsaacScript mods.
25 lines (24 loc) • 971 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PostPressurePlateUpdate = void 0;
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
const gridEntitiesSpecific_1 = require("../../functions/gridEntitiesSpecific");
const shouldFire_1 = require("../../shouldFire");
const CustomCallback_1 = require("../private/CustomCallback");
class PostPressurePlateUpdate extends CustomCallback_1.CustomCallback {
constructor() {
super();
this.callbacksUsed = [
// 1
[isaac_typescript_definitions_1.ModCallback.POST_UPDATE, this.postUpdate],
];
}
shouldFire = shouldFire_1.shouldFirePressurePlate;
// ModCallback.POST_UPDATE (1)
postUpdate = () => {
for (const pressurePlate of (0, gridEntitiesSpecific_1.getPressurePlates)()) {
this.fire(pressurePlate);
}
};
}
exports.PostPressurePlateUpdate = PostPressurePlateUpdate;