mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 16:32:16 +02:00
Add retry state on save icon
This commit is contained in:
parent
ac0eeb10cd
commit
81f5c70aaa
@ -13,7 +13,7 @@ export default class SavingIconHandler extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
setup(): void {
|
setup(): void {
|
||||||
this.icon = this.scene.add.sprite(0, 0, 'saving_icon');
|
this.icon = this.scene.add.sprite(0, 0, 'saving_icon');
|
||||||
this.icon.setOrigin(1, 1);
|
this.icon.setOrigin(0.5, 0.5);
|
||||||
|
|
||||||
this.add(this.icon);
|
this.add(this.icon);
|
||||||
|
|
||||||
@ -50,6 +50,24 @@ export default class SavingIconHandler extends Phaser.GameObjects.Container {
|
|||||||
this.shown = true;
|
this.shown = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
retry(): void {
|
||||||
|
this.setAlpha(1);
|
||||||
|
this.setVisible(true);
|
||||||
|
this.shown = true;
|
||||||
|
|
||||||
|
this.animActive = true;
|
||||||
|
|
||||||
|
this.scene.tweens.add({
|
||||||
|
targets: this,
|
||||||
|
rotation: 360,
|
||||||
|
repeat: Infinity,
|
||||||
|
duration: Utils.fixedInt(60000),
|
||||||
|
ease: 'Linear'
|
||||||
|
});
|
||||||
|
|
||||||
|
this.setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
hide(): void {
|
hide(): void {
|
||||||
this.shown = false;
|
this.shown = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user