mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-18 06:51:08 +00:00
Update Biome Text Labels and Variable Name (#1340)
* Added ability to get hex colour from type, added biome text, added functionality for querying biomeType with object. * Revert "Added ability to get hex colour from type, added biome text, added functionality for querying biomeType with object." This reverts commit 0f87000aa46ebb0a6d1fc628dd56ac39ef7229db. * Reverted changes, added biome text to line one and renamed wavecounttext to a more standard name. * Update battle-scene.ts * Update Formatting * Update Enums * Revert * Update overrides.ts * Update battle-scene.ts --------- Co-authored-by: Jon Studders <jonstudders1@gmail.com>
This commit is contained in:
parent
815b37d23c
commit
416d666b30
@ -151,8 +151,8 @@ export default class BattleScene extends SceneBase {
|
||||
public money: integer;
|
||||
public pokemonInfoContainer: PokemonInfoContainer;
|
||||
private party: PlayerPokemon[];
|
||||
private lineOneText: Phaser.GameObjects.Text;
|
||||
private waveCountText: Phaser.GameObjects.Text;
|
||||
/** Combined Biome and Wave count text */
|
||||
private biomeWaveText: Phaser.GameObjects.Text;
|
||||
private moneyText: Phaser.GameObjects.Text;
|
||||
private scoreText: Phaser.GameObjects.Text;
|
||||
private luckLabelText: Phaser.GameObjects.Text;
|
||||
@ -351,9 +351,9 @@ export default class BattleScene extends SceneBase {
|
||||
this.candyBar.setup();
|
||||
this.fieldUI.add(this.candyBar);
|
||||
|
||||
this.lineOneText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, startingWave.toString(), TextStyle.BATTLE_INFO);
|
||||
this.lineOneText.setOrigin(1, 0);
|
||||
this.fieldUI.add(this.lineOneText);
|
||||
this.biomeWaveText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, startingWave.toString(), TextStyle.BATTLE_INFO);
|
||||
this.biomeWaveText.setOrigin(1, 0);
|
||||
this.fieldUI.add(this.biomeWaveText);
|
||||
|
||||
this.moneyText = addTextObject(this, (this.game.canvas.width / 6) - 2, 0, "", TextStyle.MONEY);
|
||||
this.moneyText.setOrigin(1, 0);
|
||||
@ -481,7 +481,7 @@ export default class BattleScene extends SceneBase {
|
||||
}
|
||||
});
|
||||
|
||||
this.updateLineOneText();
|
||||
this.updateBiomeWaveText();
|
||||
this.updateMoneyText();
|
||||
this.updateScoreText();
|
||||
}
|
||||
@ -795,8 +795,8 @@ export default class BattleScene extends SceneBase {
|
||||
|
||||
this.currentBattle = null;
|
||||
|
||||
this.lineOneText.setText(startingWave.toString());
|
||||
this.lineOneText.setVisible(false);
|
||||
this.biomeWaveText.setText(startingWave.toString());
|
||||
this.biomeWaveText.setVisible(false);
|
||||
|
||||
this.updateMoneyText();
|
||||
this.moneyText.setVisible(false);
|
||||
@ -1245,13 +1245,13 @@ export default class BattleScene extends SceneBase {
|
||||
});
|
||||
}
|
||||
|
||||
updateLineOneText(): void {
|
||||
updateBiomeWaveText(): void {
|
||||
const isBoss = !(this.currentBattle.waveIndex % 10);
|
||||
const biomeString: string = getBiomeName(this.arena.biomeType);
|
||||
this.lineOneText.setText( biomeString + " - " + this.currentBattle.waveIndex.toString());
|
||||
this.lineOneText.setColor(!isBoss ? "#404040" : "#f89890");
|
||||
this.lineOneText.setShadowColor(!isBoss ? "#ded6b5" : "#984038");
|
||||
this.lineOneText.setVisible(true);
|
||||
this.biomeWaveText.setText( biomeString + " - " + this.currentBattle.waveIndex.toString());
|
||||
this.biomeWaveText.setColor(!isBoss ? "#404040" : "#f89890");
|
||||
this.biomeWaveText.setShadowColor(!isBoss ? "#ded6b5" : "#984038");
|
||||
this.biomeWaveText.setVisible(true);
|
||||
}
|
||||
|
||||
updateMoneyText(): void {
|
||||
@ -1299,8 +1299,8 @@ export default class BattleScene extends SceneBase {
|
||||
|
||||
updateUIPositions(): void {
|
||||
const enemyModifierCount = this.enemyModifiers.filter(m => m.isIconVisible(this)).length;
|
||||
this.lineOneText.setY(-(this.game.canvas.height / 6) + (enemyModifierCount ? enemyModifierCount <= 12 ? 15 : 24 : 0));
|
||||
this.moneyText.setY(this.lineOneText.y + 10);
|
||||
this.biomeWaveText.setY(-(this.game.canvas.height / 6) + (enemyModifierCount ? enemyModifierCount <= 12 ? 15 : 24 : 0));
|
||||
this.moneyText.setY(this.biomeWaveText.y + 10);
|
||||
this.scoreText.setY(this.moneyText.y + 10);
|
||||
[ this.luckLabelText, this.luckText ].map(l => l.setY((this.scoreText.visible ? this.scoreText : this.moneyText).y + 10));
|
||||
const offsetY = (this.scoreText.visible ? this.scoreText : this.moneyText).y + 15;
|
||||
|
@ -18,10 +18,8 @@ export function getBiomeName(biome: Biome | -1) {
|
||||
return "Ancient Ruins";
|
||||
case Biome.ABYSS:
|
||||
return "The Abyss";
|
||||
case Biome.SPACE:
|
||||
return "Stratosphere";
|
||||
case Biome.END:
|
||||
return "Final Destination";
|
||||
return "???";
|
||||
default:
|
||||
return Utils.toReadableString(Biome[biome]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user