|
|
@ -39,9 +39,12 @@ export class DragonTigerSeat extends Component { |
|
|
|
private recordLosePos: Vec3; |
|
|
|
/** 下注总额 */ |
|
|
|
private _totalBetCoin: number = 0; |
|
|
|
private _myPosition: Vec3 = null; |
|
|
|
|
|
|
|
|
|
|
|
protected onLoad(): void { |
|
|
|
this.getComponentByChild(); |
|
|
|
this._myPosition = this.node.getPosition().clone(); |
|
|
|
} |
|
|
|
|
|
|
|
protected start(): void { |
|
|
@ -81,6 +84,7 @@ export class DragonTigerSeat extends Component { |
|
|
|
this.reset() |
|
|
|
} |
|
|
|
reset() { |
|
|
|
this._animing = false; |
|
|
|
this.shensuanzi.active = false; |
|
|
|
this.bigWin.active = false; |
|
|
|
this.winLabel.string = ''; |
|
|
@ -93,6 +97,7 @@ export class DragonTigerSeat extends Component { |
|
|
|
this.nicknameLabel.node.parent.active = false; |
|
|
|
this.betCoinLabel.node.parent.active = false; |
|
|
|
this._totalBetCoin = 0; |
|
|
|
Tween.stopAllByTarget(this.node); |
|
|
|
} |
|
|
|
/** 设置座位数据 */ |
|
|
|
setPLayerData(index: number) { |
|
|
@ -138,9 +143,22 @@ export class DragonTigerSeat extends Component { |
|
|
|
} |
|
|
|
} |
|
|
|
/** 发射筹码 */ |
|
|
|
private _animing: boolean = false; |
|
|
|
onEventBetting(data: { seatIndex: number, bet_areas: BETTING_AREA[] }) { |
|
|
|
if (data.seatIndex != this._curSeatIndex) return; |
|
|
|
// if (data.seatIndex == DragonTiger.table.mySeatIndex) return;
|
|
|
|
if (data.seatIndex == this._curSeatIndex) { |
|
|
|
if (!this._animing) { |
|
|
|
this._animing = true; |
|
|
|
Tween.stopAllByTarget(this.node); |
|
|
|
tween(this.node) |
|
|
|
.to(0.1, { position: v3(this._myPosition.x + 10, this._myPosition.y) }, { easing: 'sineInOut' }) |
|
|
|
.to(0.1, { position: v3(this._myPosition.x, this._myPosition.y) }, { easing: 'sineInOut' }) |
|
|
|
.union().call(() => { |
|
|
|
this._animing = false; |
|
|
|
}).start(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let areaCHips: BET_AREA = {}; |
|
|
|
let total: number = 0; |
|
|
|