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
Name | Type |
---|---|
maxCharges | int |
Returns
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
Name | Type |
---|---|
sprites | ChargeBarSprites |
position | Vector |
normalCharges | int |
batteryCharges | int |
Returns
void