Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //playerBetList
- let totalWin = 0;
- for (let betList of data.playerBetList) {
- for (let i = 0; i < this.betBtns.length; i++) {
- if (this.betBtns[i].betType === betList.type && this.betBtns[i].betID === betList.index) {
- let chip = this.betBtns[i].chipOnContent.getComponentInChildren(BetChip);
- if (betList.win - parseInt(chip.stackLabel.string) > 0) {
- let value = betList.win;
- chip.stackChips(this.chipsToggleGroup.calculateStack(value), this.chipScale);
- totalWin += value;
- }
- else if (betList.win <= 0) {
- chip.unuse();
- chip.node.destroy();
- }
- else {
- //當win == bet -> 退款
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement