mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +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 {
|
||||
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);
|
||||
|
||||
@ -50,6 +50,24 @@ export default class SavingIconHandler extends Phaser.GameObjects.Container {
|
||||
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 {
|
||||
this.shown = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user