doubleUI修改

This commit is contained in:
TJH 2026-04-25 16:49:35 +08:00
parent b797f2b2b9
commit f0266949a7
4 changed files with 28 additions and 32 deletions

View File

@ -1152,8 +1152,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 632.35, "width": 900,
"height": 40 "height": 200
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@ -1188,15 +1188,15 @@
"b": 255, "b": 255,
"a": 255 "a": 255
}, },
"_string": "740.00", "_string": "74022222.00",
"_horizontalAlign": 1, "_horizontalAlign": 1,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 150, "_actualFontSize": 113,
"_fontSize": 150, "_fontSize": 150,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 40, "_lineHeight": 160,
"_overflow": 0, "_overflow": 2,
"_enableWrapText": true, "_enableWrapText": false,
"_font": { "_font": {
"__uuid__": "440b0efb-6a4a-4c11-9cfb-bf746b908efd", "__uuid__": "440b0efb-6a4a-4c11-9cfb-bf746b908efd",
"__expectedType__": "cc.BitmapFont" "__expectedType__": "cc.BitmapFont"

View File

@ -39,6 +39,7 @@ export class SlotGame extends Component {
rollersMsg: number[] = [3, 4, 5, 5, 4, 3]; rollersMsg: number[] = [3, 4, 5, 5, 4, 3];
featureBuyBtnEnabled: boolean = true; featureBuyBtnEnabled: boolean = true;
waysNum = 3 * 4 * 5 * 5 * 4 * 3; waysNum = 3 * 4 * 5 * 5 * 4 * 3;
curBet = 0
protected onLoad(): void { protected onLoad(): void {
this.rollerManager.node.on(ROLLER_COMBINE_EVENT.ONE_ROLLER_STOP, this.onOneRollerStopped, this); this.rollerManager.node.on(ROLLER_COMBINE_EVENT.ONE_ROLLER_STOP, this.onOneRollerStopped, this);
@ -55,6 +56,14 @@ export class SlotGame extends Component {
} }
setCurBet(bet) {
this.curBet = bet
}
updateDoubleWinNeedCount() {
this.doubleWinBtnNode.getChildByPath('on/count').getComponent(Label).string = gold2cash(this.curBet * 1.25)
}
onClickDoubleWin() { onClickDoubleWin() {
this.doubleWinIsOn = !this.doubleWinIsOn; this.doubleWinIsOn = !this.doubleWinIsOn;
// this.doubleWinBtnNode.getChildByName('bg').active = this.doubleWinIsOn // this.doubleWinBtnNode.getChildByName('bg').active = this.doubleWinIsOn
@ -64,6 +73,7 @@ export class SlotGame extends Component {
// this.doubleWinBtnNode.getChildByName('deng_on').active = this.doubleWinIsOn // this.doubleWinBtnNode.getChildByName('deng_on').active = this.doubleWinIsOn
this.doubleWinBtnNode.getChildByName('on').active = this.doubleWinIsOn this.doubleWinBtnNode.getChildByName('on').active = this.doubleWinIsOn
this.doubleWinBtnNode.getChildByName('off').active = !this.doubleWinIsOn this.doubleWinBtnNode.getChildByName('off').active = !this.doubleWinIsOn
this.updateDoubleWinNeedCount()
// this.doubleWinBtnNode.getChildByName('deng_off').active = !this.doubleWinIsOn // this.doubleWinBtnNode.getChildByName('deng_off').active = !this.doubleWinIsOn
// this.doubleWinBtnNode.getChildByName('bet_label').active = !this.doubleWinIsOn // this.doubleWinBtnNode.getChildByName('bet_label').active = !this.doubleWinIsOn
@ -602,17 +612,8 @@ export class SlotGame extends Component {
this.refreshBuyBtnState(false); this.refreshBuyBtnState(false);
} }
showPos = new Vec3(-294, -329, 0);
hidePos = new Vec3(-1080, -329, 0);
hideFeatureBuy() { hideFeatureBuy() {
Tween.stopAllByTarget(this.featureBuyNode); this.setBtnEnable(this.featureBuyNode, false)
this.setBtnEnable(this.featureBuyNode, false);
tween(this.featureBuyNode)
.to(0.1, { position: this.hidePos })
.call(() => {
this.featureBuyNode.setPosition(this.hidePos);
})
.start();
} }
showFeatureBuy(bol: boolean) { showFeatureBuy(bol: boolean) {
@ -621,15 +622,7 @@ export class SlotGame extends Component {
return; return;
} }
Tween.stopAllByTarget(this.featureBuyNode); this.setBtnEnable(this.featureBuyNode, true)
this.setBtnEnable(this.featureBuyNode, false);
tween(this.featureBuyNode)
.to(0.1, { position: this.showPos })
.call(() => {
this.setBtnEnable(this.featureBuyNode, true);
this.featureBuyNode.setPosition(this.showPos);
})
.start();
} }
setFeatureBuyBtnEnable(bol: boolean) { setFeatureBuyBtnEnable(bol: boolean) {

View File

@ -124,6 +124,7 @@ export class SlotScene extends Component {
if (!this.gameInfo.CloseBuyGame) { if (!this.gameInfo.CloseBuyGame) {
this.slotGame.setFeatureBuyActive(!(this.slotBar.getBet() * this.gameInfo.BuyMul > this.gameInfo.MaxBuyBet)); this.slotGame.setFeatureBuyActive(!(this.slotBar.getBet() * this.gameInfo.BuyMul > this.gameInfo.MaxBuyBet));
} }
this.slotGame.setCurBet(this.slotBar.getBet())
this.updateBg(this.isFreeSpin, true); this.updateBg(this.isFreeSpin, true);
let frb = GameDataManager.instance.frb; let frb = GameDataManager.instance.frb;
@ -248,6 +249,8 @@ export class SlotScene extends Component {
this.slotBar.setDisplayBet(bet * 1.25); this.slotBar.setDisplayBet(bet * 1.25);
} }
this.slotGame.refreshDoubleWinCount(); this.slotGame.refreshDoubleWinCount();
this.slotGame.setCurBet(this.slotBar.getBet())
this.slotGame.updateDoubleWinNeedCount()
} }
onMaxBet() { onMaxBet() {
@ -260,14 +263,14 @@ export class SlotScene extends Component {
} }
onOpenMenu() { onOpenMenu() {
// this.slotGame.hideFeatureBuy(); this.slotGame.hideFeatureBuy();
this.slotGame.setDoubleWinBtnEnable(false); this.slotGame.setDoubleWinBtnEnable(false);
} }
onCloseMenu() { onCloseMenu() {
this.slotGame.setDoubleWinBtnEnable(true); this.slotGame.setDoubleWinBtnEnable(true);
if (this.gameInfo.CloseBuyGame) return; if (this.gameInfo.CloseBuyGame) return;
// this.slotGame.showFeatureBuy(false); this.slotGame.showFeatureBuy(false);
} }
onAutoSpin(isAutoSpin: boolean) { onAutoSpin(isAutoSpin: boolean) {

View File

@ -11245,7 +11245,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 61.44, "width": 90,
"height": 40 "height": 40
}, },
"_anchorPoint": { "_anchorPoint": {
@ -11281,14 +11281,14 @@
"b": 255, "b": 255,
"a": 255 "a": 255
}, },
"_string": "1.68", "_string": "10000",
"_horizontalAlign": 1, "_horizontalAlign": 1,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 24, "_actualFontSize": 23,
"_fontSize": 24, "_fontSize": 24,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 40, "_lineHeight": 40,
"_overflow": 0, "_overflow": 2,
"_enableWrapText": true, "_enableWrapText": true,
"_font": { "_font": {
"__uuid__": "e3973bf7-5341-4d1e-8265-88afe473ed48", "__uuid__": "e3973bf7-5341-4d1e-8265-88afe473ed48",