Ensure pokemon hp numbers are not visible during stat display

This commit is contained in:
Sirz Benjie 2025-05-17 11:02:27 -05:00
parent bcfe629db5
commit a912ff223a
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -36,6 +36,16 @@ export class PlayerBattleInfo extends BattleInfo {
this.expMaskRect = expMaskRect;
}
/**
* Toggle the stat overlay, ensuring that the hp numbers container is hidden while the stats are visible.
* @param visible - Whether the stats should be visible or not.
*/
override toggleStats(visible: boolean): void {
// Need to make the hp numbers container invisible
this.hpNumbersContainer.setVisible(!visible);
super.toggleStats(visible);
}
override initInfo(pokemon: PlayerPokemon): void {
super.initInfo(pokemon);
this.setHpNumbers(pokemon.hp, pokemon.getMaxHp());