UNPKG

isaacscript-common

Version:

Helper functions and features for IsaacScript mods.

24 lines (23 loc) 865 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DebugDisplayNPC = void 0; const isaac_typescript_definitions_1 = require("isaac-typescript-definitions"); const render_1 = require("../../../../functions/render"); const Feature_1 = require("../../../private/Feature"); const utils_1 = require("./utils"); class DebugDisplayNPC extends Feature_1.Feature { textCallback = utils_1.defaultEntityDisplayCallback; constructor() { super(); this.callbacksUsed = [ // 28 [isaac_typescript_definitions_1.ModCallback.POST_NPC_RENDER, this.postNPCRender], ]; } // ModCallback.POST_NPC_RENDER (28) postNPCRender = (npc) => { const text = this.textCallback(npc); (0, render_1.renderTextOnEntity)(npc, text); }; } exports.DebugDisplayNPC = DebugDisplayNPC;