Update GameManager.ts
parent
26c032a861
commit
a719d0e0c3
|
@ -222,7 +222,7 @@ export class GameManager extends Singleton<GameManager>() {
|
||||||
|
|
||||||
private setCurrentBallInGame(value: number) {
|
private setCurrentBallInGame(value: number) {
|
||||||
this._currentBallInGame += value;
|
this._currentBallInGame += value;
|
||||||
if (this._currentBallInGame >= 2) {
|
if (value > 0 && this._currentBallInGame >= 2) {
|
||||||
this._isMultiBall = true;
|
this._isMultiBall = true;
|
||||||
EventManger.instance.emit(GameEvent.MultiBall, true);
|
EventManger.instance.emit(GameEvent.MultiBall, true);
|
||||||
this._ballPool.actives.forEach((ball) => ball.getComponent(Ball).playMultiBallEffect());
|
this._ballPool.actives.forEach((ball) => ball.getComponent(Ball).playMultiBallEffect());
|
||||||
|
@ -261,7 +261,6 @@ export class GameManager extends Singleton<GameManager>() {
|
||||||
SoundManager.instance.playSfx(this._ballOutSound);
|
SoundManager.instance.playSfx(this._ballOutSound);
|
||||||
this.DisableAllBooster();
|
this.DisableAllBooster();
|
||||||
await Utilities.delay(TimeConfig.DelayPLay);
|
await Utilities.delay(TimeConfig.DelayPLay);
|
||||||
this.spawnBall(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue