龙虎榜相关
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 48s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 48s
This commit is contained in:
parent
cec9737024
commit
c3853aa3fe
@ -22172,7 +22172,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -369,
|
||||
"x": -320,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@ -22353,7 +22353,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -190,
|
||||
"x": -140,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@ -22534,7 +22534,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 15,
|
||||
"x": 50,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@ -22715,7 +22715,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 205,
|
||||
"x": 220,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@ -24034,7 +24034,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -369,
|
||||
"x": -320,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@ -24215,7 +24215,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -190,
|
||||
"x": -140,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@ -24396,7 +24396,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 15,
|
||||
"x": 50,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@ -24577,7 +24577,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 205,
|
||||
"x": 220,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
|
||||
@ -80,7 +80,7 @@ export class RankHistoryList extends Component {
|
||||
this.historyIndex = 1;
|
||||
|
||||
this.updateHistoryArrows();
|
||||
|
||||
this.refreshSelfRankingInfo(null);
|
||||
await this.loadHistoryData(this.currentHistoryType, this.historyIndex);
|
||||
}
|
||||
|
||||
@ -114,11 +114,10 @@ export class RankHistoryList extends Component {
|
||||
// ==================== 历史记录逻辑 ====================
|
||||
async loadHistoryData(type: string, index: number) {
|
||||
this.setRankHistoryRadioBtn(type);
|
||||
|
||||
this.refreshSelfRankingInfo(null);
|
||||
if (!this.isTypeAvailable(type)) {
|
||||
console.log(`${type} 历史榜单活动未开启`);
|
||||
this.rankHistoryLoadingNode.active = false;
|
||||
this.refreshSelfRankingInfo(null);
|
||||
this.showActivityNotOpenTip();
|
||||
return;
|
||||
}
|
||||
@ -163,7 +162,7 @@ export class RankHistoryList extends Component {
|
||||
this.selfInfo.getChildByName('Rank').getChildByName('sp_1').active = false;
|
||||
this.selfInfo.getChildByName('Rank').getChildByName('sp_2').active = false;
|
||||
this.selfInfo.getChildByName('Rank').getChildByName('sp_3').active = false;
|
||||
this.selfInfo.getChildByName('Rank').getChildByName('rankLab').active = false;
|
||||
this.selfInfo.getChildByName('Rank').getChildByName('rankLab').active = true;
|
||||
this.selfInfo.getChildByName('Rank').getChildByName('rankLab').getComponent(Label).string = '-';
|
||||
this.selfInfo.getChildByName('Uid').getComponent(Label).string = '-';
|
||||
this.selfInfo.getChildByName('Shop').getComponent(Label).string = '-';
|
||||
|
||||
@ -77,7 +77,7 @@ export class RankList extends Component {
|
||||
this.rankList.active = true;
|
||||
this.currentRankType = '';
|
||||
this.updateRankButtonsAvailability();
|
||||
|
||||
this.refreshSelfRankingInfo(null);
|
||||
await this.switchRankTab(defaultType);
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ export class RankList extends Component {
|
||||
this.currentRankType = type;
|
||||
|
||||
this.setRankRadioBtn(type);
|
||||
|
||||
this.refreshSelfRankingInfo(null);
|
||||
if (!this.isTypeAvailable(type)) {
|
||||
console.log(`${type} 榜单活动未开启`);
|
||||
this.rankLoadingNode.active = false;
|
||||
@ -132,7 +132,6 @@ export class RankList extends Component {
|
||||
}
|
||||
this.marqueeTexts = [];
|
||||
this.currentMarqueeIndex = 0;
|
||||
this.refreshSelfRankingInfo(null);
|
||||
this.showActivityNotOpenTip();
|
||||
if (this.countdownTimer) {
|
||||
clearInterval(this.countdownTimer);
|
||||
@ -183,7 +182,19 @@ export class RankList extends Component {
|
||||
console.error('获取排行榜数据失败:', error);
|
||||
this.showActivityNotOpenTip();
|
||||
Tween.stopAllByTarget(this.rankLoadingNode);
|
||||
if (this.countdownTimer) {
|
||||
clearInterval(this.countdownTimer);
|
||||
this.countdownTimer = null;
|
||||
}
|
||||
this.rankingEndTime.getComponent(Label).string = "--:--:--";
|
||||
this.rankLoadingNode.active = false;
|
||||
// 停止跑马灯
|
||||
if (this.msg_1 && this.msg_1.isValid) {
|
||||
Tween.stopAllByTarget(this.msg_1);
|
||||
this.msg_1.active = false;
|
||||
}
|
||||
this.marqueeTexts = [];
|
||||
this.currentMarqueeIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,6 +275,9 @@ export class RankList extends Component {
|
||||
this.rankingListVScroll.setTotalCount(rankInfos.List.length);
|
||||
this.rankingListVScroll.renderItemFn = (node: Node, idx: number) => {
|
||||
let itemData = rankInfos.List[idx];
|
||||
if (!itemData) {
|
||||
return;
|
||||
}
|
||||
node.getChildByName('bg').active = idx % 2 === 0;
|
||||
node.getChildByName('bg2').active = idx % 2 !== 0;
|
||||
node.getChildByName('Rank').getChildByName('sp_1').active = idx === 0;
|
||||
@ -285,7 +299,7 @@ export class RankList extends Component {
|
||||
this.selfInfo.getChildByName('Rank').getChildByName('sp_1').active = false;
|
||||
this.selfInfo.getChildByName('Rank').getChildByName('sp_2').active = false;
|
||||
this.selfInfo.getChildByName('Rank').getChildByName('sp_3').active = false;
|
||||
this.selfInfo.getChildByName('Rank').getChildByName('rankLab').active = false;
|
||||
this.selfInfo.getChildByName('Rank').getChildByName('rankLab').active = true;
|
||||
this.selfInfo.getChildByName('Rank').getChildByName('rankLab').getComponent(Label).string = '-';
|
||||
this.selfInfo.getChildByName('Uid').getComponent(Label).string = '-';
|
||||
this.selfInfo.getChildByName('Shop').getComponent(Label).string = '-';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { _decorator, Component, Label, Node, Tween, tween } from 'cc';
|
||||
import { VirtualScrollView } from './VScrollView';
|
||||
import { I18nManager } from 'db://assets/Loading/scripts/manager/I18nManager';
|
||||
import { callGameApiForRank } from 'db://assets/Loading/scripts/comm';
|
||||
import { I18nManager } from 'db://assets/Loading/scripts/manager/I18nManager';
|
||||
import { AudioManager } from 'db://assets/Loading/scripts/manager/AudioManager';
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ -303,8 +303,6 @@ export class RewardList extends Component {
|
||||
this.slotScene.slotBar.setBalance(result.Balance);
|
||||
}
|
||||
|
||||
// 播放音效
|
||||
AudioManager.instance.playSFX("Coin_Drop");
|
||||
|
||||
console.log(`成功领取 ${result.Ids.length} 个奖励,新余额: ${result.Balance}`);
|
||||
} else {
|
||||
|
||||
@ -67,10 +67,10 @@ export class SlotRanking extends Component {
|
||||
this.initComponents();
|
||||
|
||||
this.rankingBtn.setPosition(this.startPos);
|
||||
this.rankingBtn.active = SlotRankingDataManager.instance.getRankListStatus() === 0 || SlotRankingDataManager.instance.getRankListStatus() === 1 || SlotRankingDataManager.instance.getCurTimeIsBiggerThanRankMaxCloseTime();
|
||||
this.rankingBtn.getComponent(Button).interactable = SlotRankingDataManager.instance.getRankListStatus() === 0 || SlotRankingDataManager.instance.getCurTimeIsBiggerThanRankMaxCloseTime();
|
||||
this.rankingBtn.getChildByName('icon').getComponent(sp.Skeleton).color = SlotRankingDataManager.instance.getRankListStatus() === 0 ? Color.WHITE : Color.GRAY;
|
||||
this.rankingBtn.active = SlotRankingDataManager.instance.getRankListStatus() === 0 || SlotRankingDataManager.instance.getRankListStatus() === 1 || SlotRankingDataManager.instance.getRankMaxCloseTimeIsBiggerThanCurTime();
|
||||
|
||||
this.rankingBtn.getComponent(Button).interactable = SlotRankingDataManager.instance.getRankListStatus() === 0;
|
||||
this.rankingBtn.getChildByName('icon').getComponent(sp.Skeleton).color = SlotRankingDataManager.instance.getRankListStatus() === 0 ? Color.WHITE : Color.GRAY;
|
||||
|
||||
this.rankingBtn.on(Node.EventType.TOUCH_START, this.onTouchStart, this);
|
||||
this.rankingBtn.on(Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
|
||||
@ -144,10 +144,18 @@ export class SlotRanking extends Component {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.slotScene.gameState.isFeatureBuySpin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.slotScene.gameState.isEliminating) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.rankingBtn.getComponent(Button).interactable) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ export class SlotRankingDataManager {
|
||||
set rankList(list: any) { this._rankList = list; }
|
||||
get rankList(): any { return this._rankList; }
|
||||
|
||||
getCurTimeIsBiggerThanRankMaxCloseTime(): boolean {
|
||||
getRankMaxCloseTimeIsBiggerThanCurTime(): boolean {
|
||||
if (!this._rankList || !this._rankList.List || this._rankList.List.length === 0) {
|
||||
// 代表当前没有活动开启,则说明关闭入口按钮
|
||||
return false;
|
||||
|
||||
@ -24,6 +24,7 @@ interface GameState {
|
||||
isAutoSpin: boolean;
|
||||
isEliminating: boolean;
|
||||
isFastSpin: boolean;
|
||||
isFeatureBuySpin: boolean;
|
||||
isFirstFreeSpin: boolean;
|
||||
isInFreeSpin: boolean;
|
||||
isOneRoundEnd: boolean;
|
||||
@ -87,6 +88,7 @@ export class SlotScene extends Component {
|
||||
isEliminating: false,
|
||||
isFastSpin: false,
|
||||
isFirstFreeSpin: false,
|
||||
isFeatureBuySpin: false,
|
||||
isInFreeSpin: false,
|
||||
isOneRoundEnd: false,
|
||||
isDebug: false
|
||||
@ -213,9 +215,12 @@ export class SlotScene extends Component {
|
||||
let panel = NodePoolManager.instance.getNodeFromPoolStatic('FeatureBuy', this.FeatureBuyPre);
|
||||
let featureBuy = panel.getComponent(FeatureBuy)
|
||||
this.node.addChild(panel);
|
||||
|
||||
featureBuy.show(this.slotBar.getBet(), this.gameInfo.BuyMul, () => {
|
||||
this.slotGame.setFeatureBuyInteractable(false)
|
||||
this.spinBtnClick(false, true);
|
||||
this.gameState.isFeatureBuySpin = true;
|
||||
|
||||
this.slotBar.featureBuySpin();
|
||||
});
|
||||
}
|
||||
@ -727,6 +732,7 @@ export class SlotScene extends Component {
|
||||
|
||||
private async handleFreeSpinEnd(winType: WIN_TYPE, isReconnect: boolean = false) {
|
||||
this.gameState.isFirstFreeSpin = false;
|
||||
this.gameState.isFeatureBuySpin = false;
|
||||
this.gameState.isInFreeSpin = false;
|
||||
this.slotBar.exitFreeSpin();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user