Charge Bar
Functions
Section titled “Functions”newChargeBarSprites()
Section titled “newChargeBarSprites()”newChargeBarSprites(
maxCharges):ChargeBarSprites
Defined in: packages/isaacscript-common/src/functions/chargeBar.ts:12
Constructor for a ChargeBarSprites object. For more information, see the renderChargeBar
helper function.
Note that this is for the vertical charge bar that represents the number of charges that an active item has, not the circular charge bar that shows e.g. the charge rate of Brimstone.
Parameters
Section titled “Parameters”maxCharges
Section titled “maxCharges”int
Returns
Section titled “Returns”renderChargeBar()
Section titled “renderChargeBar()”renderChargeBar(
sprites,position,normalCharges,batteryCharges):void
Defined in: packages/isaacscript-common/src/functions/chargeBar.ts:45
Helper function to render a charge bar on the screen. First, call the newChargeBarSprites
function to initialize the sprites, and then call this function on every render frame.
Note that this is for the vertical charge bar that represents the number of charges that an active item has, not the circular charge bar that shows e.g. the charge rate of Brimstone.
Parameters
Section titled “Parameters”sprites
Section titled “sprites”position
Section titled “position”Vector
normalCharges
Section titled “normalCharges”int
batteryCharges
Section titled “batteryCharges”int
Returns
Section titled “Returns”void
