Update GameManager.ts

main
tiendat3699 2024-05-02 09:33:07 +07:00
parent 26c032a861
commit a719d0e0c3
1 changed files with 1 additions and 2 deletions

View File

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