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 { RES } from "../../module/RES";
import { layers } from "../../module/views/layers"; import { layers } from "../../module/views/layers";
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
...@@ -11,6 +11,7 @@ import { WebNetName } from "../WebNetName"; ...@@ -11,6 +11,7 @@ import { WebNetName } from "../WebNetName";
import { NoPrizePanel } from "./noprize"; import { NoPrizePanel } from "./noprize";
import { notEnoughMoneyPanel } from "./notEnoughMoney"; import { notEnoughMoneyPanel } from "./notEnoughMoney";
import { PrizePanel } from "./prize"; import { PrizePanel } from "./prize";
import { waitAPI } from "./wait2";
let section; let section;
export class CostPanel extends Panel { export class CostPanel extends Panel {
...@@ -39,6 +40,7 @@ export class CostPanel extends Panel { ...@@ -39,6 +40,7 @@ export class CostPanel extends Panel {
if (indexResult.data.type == 1) { if (indexResult.data.type == 1) {
params.credits = indexResult.data.needCredits; params.credits = indexResult.data.needCredits;
result = await sendWebNet(WebNetName.getCreditCost, params); result = await sendWebNet(WebNetName.getCreditCost, params);
await waitAPI(500);
if(!result.success) { if(!result.success) {
btn.mouseEnable=true; btn.mouseEnable=true;
return; return;
......
...@@ -8,6 +8,7 @@ let section; ...@@ -8,6 +8,7 @@ let section;
export class timesNotEnoughPanel extends Panel { export class timesNotEnoughPanel extends Panel {
hidePanel(){ hidePanel(){
sendLog("click",8);
this.stage.dispatchEvent("restartEnterFrame",{}); this.stage.dispatchEvent("restartEnterFrame",{});
super.hidePanel(); super.hidePanel();
} }
...@@ -17,7 +18,7 @@ export class timesNotEnoughPanel extends Panel { ...@@ -17,7 +18,7 @@ export class timesNotEnoughPanel extends Panel {
initUi() { initUi() {
super.initUi(); super.initUi();
sendLog("click",8); sendLog("exposure",8);
var skin = RES.getSkinDataByName(this.skinName); var skin = RES.getSkinDataByName(this.skinName);
this.position.set(skin.x, skin.y); 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