Advertisement
Guest User

OnSettle

a guest
Feb 27th, 2020
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //playerBetList
  2.         let totalWin = 0;
  3.         for (let betList of data.playerBetList) {
  4.             for (let i = 0; i < this.betBtns.length; i++) {
  5.                 if (this.betBtns[i].betType === betList.type && this.betBtns[i].betID === betList.index) {
  6.                     let chip = this.betBtns[i].chipOnContent.getComponentInChildren(BetChip);
  7.                     if (betList.win - parseInt(chip.stackLabel.string) > 0) {
  8.                         let value = betList.win;
  9.                         chip.stackChips(this.chipsToggleGroup.calculateStack(value), this.chipScale);
  10.                         totalWin += value;
  11.                     }
  12.                     else if (betList.win <= 0) {
  13.                         chip.unuse();
  14.                         chip.node.destroy();
  15.                     }
  16.                     else {
  17.                         //當win == bet -> 退款
  18.                     }
  19.                 }
  20.             }
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement