Commit 676bc8ed authored by wildfirecode13's avatar wildfirecode13

u

parent 9bfa105d
import { showPanel } from "../../module/ctrls";
import { showPanel, wait } from "../../module/ctrls";
import { RES } from "../../module/RES";
import { layers } from "../../module/views/layers";
import { Panel } from "../../module/views/Panel";
......@@ -11,6 +11,7 @@ import { WebNetName } from "../WebNetName";
import { NoPrizePanel } from "./noprize";
import { notEnoughMoneyPanel } from "./notEnoughMoney";
import { PrizePanel } from "./prize";
import { waitAPI } from "./wait2";
let section;
export class CostPanel extends Panel {
......@@ -39,6 +40,7 @@ export class CostPanel extends Panel {
if (indexResult.data.type == 1) {
params.credits = indexResult.data.needCredits;
result = await sendWebNet(WebNetName.getCreditCost, params);
await waitAPI(500);
if(!result.success) {
btn.mouseEnable=true;
return;
......
......@@ -8,6 +8,7 @@ let section;
export class timesNotEnoughPanel extends Panel {
hidePanel(){
sendLog("click",8);
this.stage.dispatchEvent("restartEnterFrame",{});
super.hidePanel();
}
......@@ -17,7 +18,7 @@ export class timesNotEnoughPanel extends Panel {
initUi() {
super.initUi();
sendLog("click",8);
sendLog("exposure",8);
var skin = RES.getSkinDataByName(this.skinName);
this.position.set(skin.x, skin.y);
}
......
export const waitAPI = (seconds)=>{
return new Promise(r=>{
setTimeout(() => {
r(null)
}, seconds);
})
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment