Merge branch 'hotfix-cloudRiseModal'
This commit is contained in:
@@ -235,7 +235,7 @@ export default class CloudRiseView extends cc.Component {
|
||||
if (!reuse) {
|
||||
this.retainResources();
|
||||
const resources = Promise.all([CloudRiseService.pagePrefab(),
|
||||
CloudRiseService.pageFragment("stage", item ? item.after.stage : CloudRiseService.stage().stage)]).then(([prefab]) => prefab);
|
||||
CloudRiseService.pageFragment("stage", item ? item.after.stage : CloudRiseService.stage().stage)]).then(([prefab]) => prefab);
|
||||
const prefab = await Promise.race([resources, new Promise<cc.Prefab>((_, reject) => {
|
||||
loadTimer = setTimeout(() => reject(new Error("百人赛动画资源待加载")), 2500);
|
||||
})]);
|
||||
@@ -247,7 +247,9 @@ export default class CloudRiseView extends cc.Component {
|
||||
if (!item && !CloudRiseService.unseenResult()) return;
|
||||
}
|
||||
this.overlay = cc.instantiate(prefab);
|
||||
this.host.addChild(this.overlay); this.overlay.zIndex = 99;
|
||||
// Keep both drawing and input disabled while page fragments are loading.
|
||||
this.overlay.active = false;
|
||||
this.host.addChild(this.overlay); this.overlay.zIndex = 1001;
|
||||
this.panel = this.overlay.getComponent("CloudRisePanel");
|
||||
}
|
||||
await this.panel.preparePage(item ? "elimination" : "result", item && item.after.stage);
|
||||
@@ -267,7 +269,7 @@ export default class CloudRiseView extends cc.Component {
|
||||
if (this.eliminationDone) this.eliminationDone();
|
||||
};
|
||||
if (reuse) this.panel.beginSettlement(item ? "elimination" : "result", close);
|
||||
else this.panel.initialize(item ? "elimination" : "result", !!this.map, close, () => {});
|
||||
else this.panel.initialize(item ? "elimination" : "result", !!this.map, close, () => { });
|
||||
await new Promise<void>(resolve => {
|
||||
this.eliminationDone = resolve;
|
||||
// The cloud motion may already be acknowledged while its stage result is still unseen.
|
||||
@@ -323,7 +325,8 @@ export default class CloudRiseView extends cc.Component {
|
||||
if (!cc.isValid(this.node, true) || !canOpen()) return;
|
||||
if (locked()) return;
|
||||
this.overlay = cc.instantiate(prefab);
|
||||
this.host.addChild(this.overlay); this.overlay.zIndex = 99;
|
||||
this.overlay.active = false;
|
||||
this.host.addChild(this.overlay); this.overlay.zIndex = 1001;
|
||||
this.panel = this.overlay.getComponent("CloudRisePanel");
|
||||
await this.panel.preparePage(pageMode);
|
||||
if (!cc.isValid(this.node, true)) return;
|
||||
|
||||
@@ -140,7 +140,7 @@ export default class GoldMinerService {
|
||||
serverNow: Date.now() + this.offset, granted, status: info.status, state: {
|
||||
config: {
|
||||
periodId: info.periodId, startsAt: info.startsAt, endsAt: info.endsAt,
|
||||
priceCents: info.priceFen, stages
|
||||
productId: info.productId, priceCents: info.priceFen, stages
|
||||
},
|
||||
totalWins: info.progressWins || 0, paidAt: info.status === 'unlocked' ? 1 : 0,
|
||||
claimed, stage: next < 0 ? stages.length : next, settled: false,
|
||||
|
||||
Reference in New Issue
Block a user