免费赠送的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;
|
return this._balance;
|
||||||
}
|
}
|
||||||
|
|
||||||
setBet(bet: number) {
|
setBet(bet: number, isSysGift: boolean = false) {
|
||||||
this.node.emit(SLOT_BAR_EVENT.BET_CHANGE, bet);
|
this.node.emit(SLOT_BAR_EVENT.BET_CHANGE, bet);
|
||||||
this.betLabel.string = gold2cash(bet);
|
this.betLabel.string = gold2cash(bet);
|
||||||
|
|
||||||
|
if (isSysGift) {
|
||||||
|
this.betIndex = -1;
|
||||||
|
} else {
|
||||||
|
this.betIndex = this.betGrade.indexOf(bet);
|
||||||
|
}
|
||||||
|
|
||||||
// 停止当前的 tween 动画
|
// 停止当前的 tween 动画
|
||||||
Tween.stopAllByTarget(this.betLabel.node);
|
Tween.stopAllByTarget(this.betLabel.node);
|
||||||
|
|
||||||
// 重置缩放
|
// 重置缩放
|
||||||
this.betLabel.node.scale = new Vec3(1, 1, 1);
|
this.betLabel.node.scale = new Vec3(1, 1, 1);
|
||||||
|
|
||||||
@ -483,6 +488,9 @@ export class SlotBar extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getBet() {
|
getBet() {
|
||||||
|
if (this.betIndex == -1) {
|
||||||
|
return +this.betLabel.string * 10000;
|
||||||
|
}
|
||||||
return this.betGrade[this.betIndex];
|
return this.betGrade[this.betIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -700,6 +708,8 @@ export class SlotBar extends Component {
|
|||||||
this.setBtnEnable(this.addBtn, true);
|
this.setBtnEnable(this.addBtn, true);
|
||||||
this.setBtnEnable(this.autoBtn, true);
|
this.setBtnEnable(this.autoBtn, true);
|
||||||
this.setBtnEnable(this.menuBtn, true);
|
this.setBtnEnable(this.menuBtn, true);
|
||||||
|
this.betIndex = 0;
|
||||||
|
this.setBet(this.betGrade[this.betIndex]);
|
||||||
}
|
}
|
||||||
|
|
||||||
setSysGiftBet(bet) {
|
setSysGiftBet(bet) {
|
||||||
@ -712,10 +722,9 @@ export class SlotBar extends Component {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
let tip = "warning !!! bet not found!";
|
this.setBet(bet, true);
|
||||||
this.showTipSmall(tip);
|
|
||||||
} else {
|
} 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": {
|
"6c48a": {
|
||||||
"importer": "texture",
|
"importer": "texture",
|
||||||
"uuid": "5b709c30-9a67-4f6d-afe4-eb1b25b5d6bc@6c48a",
|
"uuid": "5b709c30-9a67-4f6d-afe4-eb1b25b5d6bc@6c48a",
|
||||||
"displayName": "Wild symbol",
|
"displayName": "wildSymbol",
|
||||||
"id": "6c48a",
|
"id": "6c48a",
|
||||||
"name": "texture",
|
"name": "texture",
|
||||||
"userData": {
|
"userData": {
|
||||||
@ -35,7 +35,7 @@
|
|||||||
"f9941": {
|
"f9941": {
|
||||||
"importer": "sprite-frame",
|
"importer": "sprite-frame",
|
||||||
"uuid": "5b709c30-9a67-4f6d-afe4-eb1b25b5d6bc@f9941",
|
"uuid": "5b709c30-9a67-4f6d-afe4-eb1b25b5d6bc@f9941",
|
||||||
"displayName": "Wild symbol",
|
"displayName": "wildSymbol",
|
||||||
"id": "f9941",
|
"id": "f9941",
|
||||||
"name": "spriteFrame",
|
"name": "spriteFrame",
|
||||||
"userData": {
|
"userData": {
|
||||||
Loading…
Reference in New Issue
Block a user