UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

26 lines (25 loc) 965 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PostSlotCollision = void 0; const isaac_typescript_definitions_1 = require("isaac-typescript-definitions"); const entityTypes_1 = require("../../functions/entityTypes"); const shouldFire_1 = require("../../shouldFire"); const CustomCallback_1 = require("../private/CustomCallback"); class PostSlotCollision extends CustomCallback_1.CustomCallback { constructor() { super(); this.callbacksUsed = [ // 33 [isaac_typescript_definitions_1.ModCallback.PRE_PLAYER_COLLISION, this.prePlayerCollision], ]; } shouldFire = shouldFire_1.shouldFireSlot; // ModCallback.PRE_PLAYER_COLLISION (33) prePlayerCollision = (player, collider) => { if ((0, entityTypes_1.isSlot)(collider)) { this.fire(collider, player); } return undefined; }; } exports.PostSlotCollision = PostSlotCollision;