UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

25 lines (24 loc) 1.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PostGridEntityCustomCollision = void 0; const ISCFeature_1 = require("../../enums/ISCFeature"); const CustomCallback_1 = require("../private/CustomCallback"); class PostGridEntityCustomCollision extends CustomCallback_1.CustomCallback { constructor() { super(); this.featuresUsed = [ISCFeature_1.ISCFeature.GRID_ENTITY_COLLISION_DETECTION]; } shouldFire = (fireArgs, optionalArgs) => { const [_gridEntity, gridEntityTypeCustom, entity] = fireArgs; const [callbackGridEntityTypeCustom, callbackEntityType, callbackEntityVariant, callbackEntitySubType,] = optionalArgs; return ((callbackGridEntityTypeCustom === undefined || callbackGridEntityTypeCustom === gridEntityTypeCustom) && (callbackEntityType === undefined || callbackEntityType === entity.Type) && (callbackEntityVariant === undefined || callbackEntityVariant === entity.Variant) && (callbackEntitySubType === undefined || callbackEntitySubType === entity.SubType)); }; } exports.PostGridEntityCustomCollision = PostGridEntityCustomCollision;