Skip to main content

Charge Bar

Functions

newChargeBarSprites

newChargeBarSprites(maxCharges): ChargeBarSprites

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

NameType
maxChargesint

Returns

ChargeBarSprites

Defined in

packages/isaacscript-common/src/functions/chargeBar.ts:12


renderChargeBar

renderChargeBar(sprites, position, normalCharges, batteryCharges): void

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

NameType
spritesChargeBarSprites
positionVector
normalChargesint
batteryChargesint

Returns

void

Defined in

packages/isaacscript-common/src/functions/chargeBar.ts:45