Add faster evolution skipping
This commit is contained in:
1 parent
36b3c91276
commit
87e0e06b9e
4 files changed
+83
-59
No files matched your search
@@ -40,7 +40,8 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
private type1Icon: Phaser.GameObjects.Sprite;
|
||||
private type2Icon: Phaser.GameObjects.Sprite;
|
||||
private expBar: Phaser.GameObjects.Image;
|
||||
private expMaskRect: Phaser.GameObjects.Graphics;
|
||||
|
||||
public expMaskRect: Phaser.GameObjects.Graphics;
|
||||
|
||||
constructor(scene: Phaser.Scene, x: number, y: number, player: boolean) {
|
||||
super(scene, x, y);
|
||||
|
||||
@@ -109,7 +109,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||
this.setVisible(false);
|
||||
}
|
||||
|
||||
show(pokemon: Pokemon, showMoves: boolean = false): Promise<void> {
|
||||
show(pokemon: Pokemon, showMoves: boolean = false, speedMultiplier: number = 1): Promise<void> {
|
||||
return new Promise<void>(resolve => {
|
||||
if (pokemon.gender > Gender.GENDERLESS) {
|
||||
this.pokemonGenderText.setText(getGenderSymbol(pokemon.gender));
|
||||
@@ -136,7 +136,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||
|
||||
this.scene.tweens.add({
|
||||
targets: this,
|
||||
duration: Utils.fixedInt(750),
|
||||
duration: Utils.fixedInt(Math.floor(750 / speedMultiplier)),
|
||||
ease: 'Cubic.easeInOut',
|
||||
x: this.initialX - 104,
|
||||
onComplete: () => {
|
||||
@@ -146,9 +146,9 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||
|
||||
if (showMoves) {
|
||||
this.scene.tweens.add({
|
||||
delay: Utils.fixedInt(325),
|
||||
delay: Utils.fixedInt(Math.floor(325 / speedMultiplier)),
|
||||
targets: this.pokemonMovesContainer,
|
||||
duration: Utils.fixedInt(325),
|
||||
duration: Utils.fixedInt(Math.floor(325 / speedMultiplier)),
|
||||
ease: 'Cubic.easeInOut',
|
||||
x: this.movesContainerInitialX - 57,
|
||||
onComplete: () => resolve()
|
||||
@@ -167,21 +167,21 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||
});
|
||||
}
|
||||
|
||||
hide(): Promise<void> {
|
||||
hide(speedMultiplier: number = 1): Promise<void> {
|
||||
return new Promise(resolve => {
|
||||
if (!this.shown)
|
||||
return resolve();
|
||||
|
||||
this.scene.tweens.add({
|
||||
targets: this.pokemonMovesContainer,
|
||||
duration: Utils.fixedInt(750),
|
||||
duration: Utils.fixedInt(Math.floor(750 / speedMultiplier)),
|
||||
ease: 'Cubic.easeInOut',
|
||||
x: this.movesContainerInitialX
|
||||
});
|
||||
|
||||
this.scene.tweens.add({
|
||||
targets: this,
|
||||
duration: Utils.fixedInt(750),
|
||||
duration: Utils.fixedInt(Math.floor(750 / speedMultiplier)),
|
||||
ease: 'Cubic.easeInOut',
|
||||
x: this.initialX,
|
||||
onComplete: () => {
|
||||
|
||||
Reference in new issue
Block a user