mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Ensure pokemon hp numbers are not visible during stat display
This commit is contained in:
parent
bcfe629db5
commit
a912ff223a
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user