Add shiny indicator on summary screen
parent
fdcefbd5c1
commit
dff22c4cae
|
@ -41,6 +41,7 @@ export default class SummaryUiHandler extends UiHandler {
|
||||||
private pokeball: Phaser.GameObjects.Sprite;
|
private pokeball: Phaser.GameObjects.Sprite;
|
||||||
private levelText: Phaser.GameObjects.Text;
|
private levelText: Phaser.GameObjects.Text;
|
||||||
private genderText: Phaser.GameObjects.Text;
|
private genderText: Phaser.GameObjects.Text;
|
||||||
|
private shinyStar: Phaser.GameObjects.Image;
|
||||||
private statusContainer: Phaser.GameObjects.Container;
|
private statusContainer: Phaser.GameObjects.Container;
|
||||||
private status: Phaser.GameObjects.Image;
|
private status: Phaser.GameObjects.Image;
|
||||||
private summaryPageContainer: Phaser.GameObjects.Container;
|
private summaryPageContainer: Phaser.GameObjects.Container;
|
||||||
|
@ -95,6 +96,7 @@ export default class SummaryUiHandler extends UiHandler {
|
||||||
|
|
||||||
this.shinyOverlay = this.scene.add.image(6, -54, 'summary_overlay_shiny');
|
this.shinyOverlay = this.scene.add.image(6, -54, 'summary_overlay_shiny');
|
||||||
this.shinyOverlay.setOrigin(0, 1);
|
this.shinyOverlay.setOrigin(0, 1);
|
||||||
|
this.shinyOverlay.setVisible(false);
|
||||||
this.summaryContainer.add(this.shinyOverlay);
|
this.summaryContainer.add(this.shinyOverlay);
|
||||||
|
|
||||||
this.numberText = addTextObject(this.scene, 17, -149, '0000', TextStyle.SUMMARY);
|
this.numberText = addTextObject(this.scene, 17, -149, '0000', TextStyle.SUMMARY);
|
||||||
|
@ -127,6 +129,11 @@ export default class SummaryUiHandler extends UiHandler {
|
||||||
this.genderText.setOrigin(0, 1);
|
this.genderText.setOrigin(0, 1);
|
||||||
this.summaryContainer.add(this.genderText);
|
this.summaryContainer.add(this.genderText);
|
||||||
|
|
||||||
|
this.shinyStar = this.scene.add.image(96, -19, 'shiny_star');
|
||||||
|
this.shinyStar.setOrigin(0, 1);
|
||||||
|
this.shinyStar.setVisible(false);
|
||||||
|
this.summaryContainer.add(this.shinyStar);
|
||||||
|
|
||||||
this.statusContainer = this.scene.add.container(-106, -16);
|
this.statusContainer = this.scene.add.container(-106, -16);
|
||||||
|
|
||||||
const statusBg = this.scene.add.image(0, 0, 'summary_status');
|
const statusBg = this.scene.add.image(0, 0, 'summary_status');
|
||||||
|
@ -235,6 +242,9 @@ export default class SummaryUiHandler extends UiHandler {
|
||||||
this.genderText.setColor(getGenderColor(this.pokemon.getGender(true)));
|
this.genderText.setColor(getGenderColor(this.pokemon.getGender(true)));
|
||||||
this.genderText.setShadowColor(getGenderColor(this.pokemon.getGender(true), true));
|
this.genderText.setShadowColor(getGenderColor(this.pokemon.getGender(true), true));
|
||||||
|
|
||||||
|
this.shinyStar.setX(96 - (this.genderText.text ? 10 : 0));
|
||||||
|
this.shinyStar.setVisible(this.pokemon.isShiny());
|
||||||
|
|
||||||
switch (this.summaryUiMode) {
|
switch (this.summaryUiMode) {
|
||||||
case SummaryUiMode.DEFAULT:
|
case SummaryUiMode.DEFAULT:
|
||||||
const page = args.length < 2 ? Page.PROFILE : args[2] as Page;
|
const page = args.length < 2 ? Page.PROFILE : args[2] as Page;
|
||||||
|
|
Loading…
Reference in New Issue