免费赠送的bet相关修改
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 43s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 43s
This commit is contained in:
parent
097b967d78
commit
ed244bd6ae
File diff suppressed because it is too large
Load Diff
@ -465,13 +465,18 @@ export class SlotBar extends Component {
|
||||
return this._balance;
|
||||
}
|
||||
|
||||
setBet(bet: number) {
|
||||
setBet(bet: number, isSysGift: boolean = false) {
|
||||
this.node.emit(SLOT_BAR_EVENT.BET_CHANGE, bet);
|
||||
this.betLabel.string = gold2cash(bet);
|
||||
|
||||
if (isSysGift) {
|
||||
this.betIndex = -1;
|
||||
} else {
|
||||
this.betIndex = this.betGrade.indexOf(bet);
|
||||
}
|
||||
|
||||
// 停止当前的 tween 动画
|
||||
Tween.stopAllByTarget(this.betLabel.node);
|
||||
|
||||
// 重置缩放
|
||||
this.betLabel.node.scale = new Vec3(1, 1, 1);
|
||||
|
||||
@ -483,6 +488,9 @@ export class SlotBar extends Component {
|
||||
}
|
||||
|
||||
getBet() {
|
||||
if (this.betIndex == -1) {
|
||||
return +this.betLabel.string * 10000;
|
||||
}
|
||||
return this.betGrade[this.betIndex];
|
||||
}
|
||||
|
||||
@ -700,6 +708,8 @@ export class SlotBar extends Component {
|
||||
this.setBtnEnable(this.addBtn, true);
|
||||
this.setBtnEnable(this.autoBtn, true);
|
||||
this.setBtnEnable(this.menuBtn, true);
|
||||
this.betIndex = 0;
|
||||
this.setBet(this.betGrade[this.betIndex]);
|
||||
}
|
||||
|
||||
setSysGiftBet(bet) {
|
||||
@ -712,10 +722,9 @@ export class SlotBar extends Component {
|
||||
})
|
||||
|
||||
if (!found) {
|
||||
let tip = "warning !!! bet not found!";
|
||||
this.showTipSmall(tip);
|
||||
this.setBet(bet, true);
|
||||
} else {
|
||||
this.setBet(this.betGrade[this.betIndex]);
|
||||
this.setBet(this.betGrade[this.betIndex], true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
@ -11,7 +11,7 @@
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "5b709c30-9a67-4f6d-afe4-eb1b25b5d6bc@6c48a",
|
||||
"displayName": "Wild symbol",
|
||||
"displayName": "wildSymbol",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
@ -35,7 +35,7 @@
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "5b709c30-9a67-4f6d-afe4-eb1b25b5d6bc@f9941",
|
||||
"displayName": "Wild symbol",
|
||||
"displayName": "wildSymbol",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
Loading…
Reference in New Issue
Block a user