Revert "Add UI reskin by LJ Birdman (WiP)"
This reverts commit 0200a2688a.
This commit is contained in:
1 parent
0200a2688a
commit
30c7156c1a
240 files changed
+149
-2594
No files matched your search
+6
-17
@@ -38,7 +38,6 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
private levelNumbersContainer: Phaser.GameObjects.Container;
|
||||
private hpNumbersContainer: Phaser.GameObjects.Container;
|
||||
private expBar: Phaser.GameObjects.Image;
|
||||
private expMaskRect: Phaser.GameObjects.Graphics;
|
||||
|
||||
constructor(scene: Phaser.Scene, x: number, y: number, player: boolean) {
|
||||
super(scene, x, y);
|
||||
@@ -120,7 +119,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
|
||||
this.hpBarSegmentDividers = [];
|
||||
|
||||
this.levelNumbersContainer = this.scene.add.container(9.5, (this.scene as BattleScene).uiTheme ? 0 : -0.5);
|
||||
this.levelNumbersContainer = this.scene.add.container(9.5, 0);
|
||||
this.levelContainer.add(this.levelNumbersContainer);
|
||||
|
||||
if (this.player) {
|
||||
@@ -129,20 +128,10 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
|
||||
const expBar = this.scene.add.image(-98, 18, 'overlay_exp');
|
||||
expBar.setOrigin(0);
|
||||
expBar.setScale(0, 1);
|
||||
this.add(expBar);
|
||||
|
||||
const expMaskRect = this.scene.make.graphics({});
|
||||
expMaskRect.setScale(6);
|
||||
expMaskRect.fillStyle(0xFFFFFF);
|
||||
expMaskRect.beginPath();
|
||||
expMaskRect.fillRect(127, 126, 85, 2);
|
||||
|
||||
const expMask = expMaskRect.createGeometryMask();
|
||||
|
||||
expBar.setMask(expMask);
|
||||
|
||||
this.expBar = expBar;
|
||||
this.expMaskRect = expMaskRect;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,7 +185,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
this.shinyIcon.setVisible(pokemon.isShiny());
|
||||
|
||||
if (this.player) {
|
||||
this.expMaskRect.x = (pokemon.levelExp / getLevelTotalExp(pokemon.level, pokemon.species.growthRate)) * 510;
|
||||
this.expBar.setScale(pokemon.levelExp / getLevelTotalExp(pokemon.level, pokemon.species.growthRate), 1);
|
||||
this.lastExp = pokemon.exp;
|
||||
this.lastLevelExp = pokemon.levelExp;
|
||||
}
|
||||
@@ -413,9 +402,9 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
if (duration)
|
||||
(this.scene as BattleScene).playSound('exp');
|
||||
this.scene.tweens.add({
|
||||
targets: this.expMaskRect,
|
||||
targets: this.expBar,
|
||||
ease: 'Sine.easeIn',
|
||||
x: ratio * 510,
|
||||
scaleX: ratio,
|
||||
duration: duration,
|
||||
onComplete: () => {
|
||||
if (!this.scene)
|
||||
@@ -426,7 +415,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
(this.scene as BattleScene).playSound('level_up');
|
||||
this.setLevel(this.lastLevel);
|
||||
this.scene.time.delayedCall(500 * levelDurationMultiplier, () => {
|
||||
this.expMaskRect.x = 0;
|
||||
this.expBar.setScale(0, 1);
|
||||
this.updateInfo(pokemon, instant).then(() => resolve());
|
||||
});
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user