Commit 69184621 authored by zhangjinzhou's avatar zhangjinzhou

代码暂存

parent a522ea2d
......@@ -109,8 +109,17 @@ Page({
avatar4: "",
canwin: false
},
onLoad(props) {
console.log("onLoad========>", app, props);
onLoad(query) {
// console.log("onLoad========>", app, props);
let isnewdata = my.getStorageSync({
key: 'jn_' + app.openId + "_new"
});
let isnew = isnewdata.data ? 0 : 1;
this.setData({
isnew: isnew
});
console.log("新手", isnew, query);
let step = 1;
let sucgl = 70;
let nranksuc = Math.random() * 100;
......@@ -144,12 +153,16 @@ Page({
canwin: canwin,
isfirst: true,
});
let attiontxt1 = "游戏开始啦,共有" + roomnums + "名玩家加入游戏,快来升温队伍拿奖励吧。";
this.addAttionTxt(attiontxt1);
this.changePashow();
},
startGame() {
if (this.data.isnew > 0 && this.data.isnew < 7) {
return;
}
console.log("游戏开始逻辑");
let attiontxt1 = "游戏开始啦,共有" + this.data.roomnums + "名玩家加入游戏,快来升温队伍拿奖励吧。";
this.addAttionTxt(attiontxt1);
this.updateAct();
// this.updateActInfo();
// this.doAiControl();
this.newAiControl();
},
//新ai逻辑
......@@ -294,6 +307,9 @@ Page({
}
},
onShow() {
if ((this.data.isnew > 0 && this.data.isnew < 7)||this.data.show_v!=2) {
return;
}
this.updateActInfo();
},
//更新活动信息
......@@ -427,6 +443,7 @@ Page({
this.setData({
show_v: 2
})
this.startGame();
}, 1000);
},
//新手下一步
......@@ -435,6 +452,7 @@ Page({
this.setData({
isnew: nguide
});
this.startGame();
},
//使用道具
async usetool() {
......
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