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