mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 08:46:55 +00:00
[QoL] Offset the status indicator to keep pokeball in view (#2966)
* Offset the status indicator to keep pokeball in view * Only use offsetX when the Pokemon is the enemy * Adjust position to accomodate boss health bar
This commit is contained in:
parent
8d5bfa51e8
commit
416079da88
@ -118,7 +118,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
this.championRibbon.setName("icon_champion_ribbon");
|
||||
this.championRibbon.setVisible(false);
|
||||
this.championRibbon.setOrigin(0, 0);
|
||||
this.championRibbon.setPositionRelative(this.nameText, 11.75, 11.75);
|
||||
this.championRibbon.setPositionRelative(this.nameText, 8, 11.75);
|
||||
this.add(this.championRibbon);
|
||||
}
|
||||
|
||||
@ -538,11 +538,11 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
if (this.lastStatus !== StatusEffect.NONE) {
|
||||
this.statusIndicator.setFrame(StatusEffect[this.lastStatus].toLowerCase());
|
||||
}
|
||||
this.statusIndicator.setVisible(!!this.lastStatus);
|
||||
|
||||
if (!this.player && this.ownedIcon.visible) {
|
||||
this.ownedIcon.setAlpha(this.statusIndicator.visible ? 0 : 1);
|
||||
}
|
||||
const offsetX = !this.player ? (this.ownedIcon.visible ? 8 : 0) + (this.championRibbon.visible ? 8 : 0) : 0;
|
||||
this.statusIndicator.setPositionRelative(this.nameText, offsetX, 11.5);
|
||||
|
||||
this.statusIndicator.setVisible(!!this.lastStatus);
|
||||
}
|
||||
|
||||
const types = pokemon.getTypes(true);
|
||||
|
Loading…
Reference in New Issue
Block a user