|
|
@ -91,7 +91,8 @@ export class PlayerHeadInfoComp extends Game20009BaseComp{ |
|
|
|
if(this._isHandler)return |
|
|
|
this._isHandler=true |
|
|
|
console.log("下注 >> ",JSON.stringify(val)) |
|
|
|
if(this.currentBet)GameController.getInstance().addPlayerOpt(Object.assign({},this.currentBet)) |
|
|
|
// if(this.currentBet)GameController.getInstance().addPlayerOpt(Object.assign({},this.currentBet))
|
|
|
|
if(this.currentBet)GameController.getInstance().addPlayerOpt(this.currentBet) |
|
|
|
if(val.userScore && this.isPlayer){ |
|
|
|
this.onUserDataChanaged(val.userScore) |
|
|
|
} |
|
|
@ -124,7 +125,8 @@ export class PlayerHeadInfoComp extends Game20009BaseComp{ |
|
|
|
//用户点击了下注
|
|
|
|
private onPlayerClickBetGold(pos:Vec3,betVal:any,goldlayer:Node){ |
|
|
|
let betAmount:number=GameController.getInstance().getCurBetValue() |
|
|
|
this.currentBet={ |
|
|
|
if(!this.currentBet) this.currentBet=[] |
|
|
|
const data ={ |
|
|
|
pos:pos, |
|
|
|
betArea:betVal.betArea, |
|
|
|
// betArea:betVal.areaId,
|
|
|
@ -132,6 +134,7 @@ export class PlayerHeadInfoComp extends Game20009BaseComp{ |
|
|
|
goldlayer:goldlayer, |
|
|
|
betAmount:betAmount |
|
|
|
} |
|
|
|
this.currentBet.push(data) |
|
|
|
let infos:any[]=[ |
|
|
|
{ |
|
|
|
betArea:betVal.betArea, |
|
|
|