Commit de6431a6 authored by haiyoucuv's avatar haiyoucuv

init

parent 67d9305b
......@@ -247,13 +247,13 @@ export class MainGame extends Scene {
// 初始化食物
FoodManger.ins.init(gameStore.startInfo?.barrierFlag ? 250 : 500);
if (getUrlParam("aiNum")) {
this.initAnimal(+getUrlParam("aiNum"));
} else {
// if (getUrlParam("aiNum")) {
// this.initAnimal(+getUrlParam("aiNum"));
// } else {
// 初始化NPC
this.initAnimal(12);
this.initAnimal(10);
// this.initAnimal(1);
}
// }
PreCd.ins.node.active = true;
......
......@@ -153,9 +153,20 @@ class GameStore {
const encrypt = AESEncrypt(JSON.stringify(param), "6FDCE02EBB43C3A8", "cDOiBC1n2QrkAY2P");
showWaiting();
const { success, data } = await sendWebNetWithToken(WebNetName.finalSubmit, { param: encrypt }, {
isGet: false,
});
let res = null;
for (let i = 0; i < 3; i++) {
res = await sendWebNetWithToken(WebNetName.finalSubmit, { param: encrypt }, {
isGet: false,
});
const { success, code } = res;
if (success && code) {
break;
}
}
const { success, data } = res;
hideWaiting();
if (!success) {
changeScene(HomeScene);
......
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