mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 08:22:16 +02:00
Add explanatory comment
This commit is contained in:
parent
54162151fa
commit
da51b1848f
@ -727,6 +727,8 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
},
|
},
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
updateHpFrame();
|
updateHpFrame();
|
||||||
|
// If, after tweening, the hp is different from the original (due to rounding), force the hp number display
|
||||||
|
// to update to the correct value.
|
||||||
if (this.player && this.lastHp !== pokemon.hp) {
|
if (this.player && this.lastHp !== pokemon.hp) {
|
||||||
this.setHpNumbers(pokemon.hp, pokemon.getMaxHp());
|
this.setHpNumbers(pokemon.hp, pokemon.getMaxHp());
|
||||||
this.lastHp = pokemon.hp;
|
this.lastHp = pokemon.hp;
|
||||||
|
Loading…
Reference in New Issue
Block a user