|
|
@ -158,6 +158,17 @@ export class TeenPattieUpLayerLogic extends Component { |
|
|
|
if (this.cutDownlabelEfct) this.cutDownlabelEfct.setCallBack(null); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private coun:number = 0 |
|
|
|
protected lateUpdate(dt: number): void { |
|
|
|
if(!this.matchTips.active || this.waitCountDown <= 0) return; |
|
|
|
this.coun += dt; |
|
|
|
if(this.coun >= 1){ |
|
|
|
this.coun = 0; |
|
|
|
this.waitCountDown--; |
|
|
|
this.matchTipsLabel.string = Game10001Res.getInstance().getString("game.title.waiting").replace("{0}",`(${this.waitCountDown})`); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 显示游戏匹配提示 |
|
|
@ -167,21 +178,8 @@ export class TeenPattieUpLayerLogic extends Component { |
|
|
|
private waitCountDown:number = 60; |
|
|
|
public showMatchTips(status: boolean) { |
|
|
|
this.waitCountDown = 60; |
|
|
|
this.matchTipsLabel.string = Game10001Res.getInstance().getString("game.title.waiting").replace("{0}",`(${this.waitCountDown})`); |
|
|
|
this.matchTips.active = status; |
|
|
|
if(!status){ |
|
|
|
this.unschedule(this.startCountData.bind(this)); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.schedule(this.startCountData.bind(this),1,60); |
|
|
|
} |
|
|
|
private startCountData(){ |
|
|
|
this.waitCountDown--; |
|
|
|
this.matchTipsLabel.string = Game10001Res.getInstance().getString("game.title.waiting").replace("{0}",`(${this.waitCountDown})`); |
|
|
|
if(this.waitCountDown <= 0){ |
|
|
|
this.unschedule(this.startCountData.bind(this)); |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
/**发牌结束 初始化桌子数据 */ |
|
|
|
public playCutDown(gameRound:number) { |
|
|
|