更新战令优化
This commit is contained in:
parent
7568cb1d7f
commit
d96f0962a9
|
|
@ -309,7 +309,7 @@ export class GameConfig {
|
||||||
vibrateOpen: true, //震动
|
vibrateOpen: true, //震动
|
||||||
coinnum: 0, //每局的金币数
|
coinnum: 0, //每局的金币数
|
||||||
paid_user: false, //是否是付费用户
|
paid_user: false, //是否是付费用户
|
||||||
version: "1.9.99", //版本号
|
version: "2.0.01", //版本号
|
||||||
shushu_DistinctId: "", //数数访客ID
|
shushu_DistinctId: "", //数数访客ID
|
||||||
shushu_AccountId: "", //数数账号ID
|
shushu_AccountId: "", //数数账号ID
|
||||||
uid: "", //用户和后端唯一id
|
uid: "", //用户和后端唯一id
|
||||||
|
|
|
||||||
|
|
@ -2490,6 +2490,7 @@ var GameTool = {
|
||||||
|
|
||||||
//比较版本号大小方法
|
//比较版本号大小方法
|
||||||
compareVersion(v1: string, v2: string): number {
|
compareVersion(v1: string, v2: string): number {
|
||||||
|
console.log("比较版本号", v1, v2);
|
||||||
let result = 0;
|
let result = 0;
|
||||||
let v1Array = v1.split(".");
|
let v1Array = v1.split(".");
|
||||||
let v2Array = v2.split(".");
|
let v2Array = v2.split(".");
|
||||||
|
|
|
||||||
|
|
@ -749,26 +749,20 @@ export default class passCheck extends cc.Component {
|
||||||
this.activateBtn.node.active = false;
|
this.activateBtn.node.active = false;
|
||||||
}
|
}
|
||||||
cc.fx.GameConfig.GM_INFO.passCheckActivate = true;
|
cc.fx.GameConfig.GM_INFO.passCheckActivate = true;
|
||||||
|
|
||||||
// 获取passCheckMgr实例并更新激活状态
|
// 获取passCheckMgr实例并更新激活状态
|
||||||
if (this.passCheckMgr && typeof this.passCheckMgr.refreshPassCheckItems === 'function') {
|
if (this.passCheckMgr && typeof this.passCheckMgr.refreshPassCheckItems === 'function') {
|
||||||
this.passCheckMgr.refreshPassCheckItems();
|
this.passCheckMgr.refreshPassCheckItems();
|
||||||
}
|
}
|
||||||
this.setbarNodePosX();
|
this.setbarNodePosX();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
setbarNodePosX() {
|
setbarNodePosX() {
|
||||||
let activate = cc.fx.GameConfig.GM_INFO.passCheckActivate;
|
let activate = cc.fx.GameConfig.GM_INFO.passCheckActivate;
|
||||||
let centralNode = this.node && this.node.getChildByName("centralNode");
|
let barNode = this.node.getChildByName("centralNode").getChildByName("barNode")
|
||||||
let barNode = centralNode && centralNode.getChildByName("barNode");
|
if (activate || cc.fx.GameConfig.GM_INFO.getItemType == 1) {
|
||||||
if (barNode) {
|
barNode.x = 0;
|
||||||
if (activate || cc.fx.GameConfig.GM_INFO.getItemType == 1) {
|
|
||||||
barNode.x = 0;
|
|
||||||
} else {
|
|
||||||
barNode.x = -253;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
console.warn("setbarNodePosX: centralNode 或 barNode 不存在,跳过位置更新");
|
barNode.x = -253;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -413,15 +413,14 @@ export default class passCheckMgr extends cc.Component {
|
||||||
if (canvasTemp) {
|
if (canvasTemp) {
|
||||||
JiaZai = canvasTemp.getComponent("JiaZai");
|
JiaZai = canvasTemp.getComponent("JiaZai");
|
||||||
}
|
}
|
||||||
console.log("处理奖励", rewards);
|
|
||||||
// 处理每个奖励
|
// 处理每个奖励
|
||||||
for (const reward of rewards) {
|
for (const reward of rewards) {
|
||||||
// 上报战令奖励领取:itemIndex 从 0 开始,埋点等级从 1 开始;右侧为付费档位
|
cc.fx.GameTool.getPassCheckPorp(reward.itemId, reward.itemNum, false);
|
||||||
cc.fx.GameTool.shushu_Track("get_battle_pass", {
|
cc.fx.GameTool.shushu_Track("get_battle_pass", {
|
||||||
cur_bp_level: reward.itemIndex + 1,
|
cur_bp_level: reward.itemIndex + 1,
|
||||||
is_paid_bp_usr: !reward.isLeftReward,
|
is_paid_bp_usr: !reward.isLeftReward,
|
||||||
});
|
});
|
||||||
cc.fx.GameTool.getPassCheckPorp(reward.itemId, reward.itemNum, false);
|
|
||||||
if (JiaZai) {
|
if (JiaZai) {
|
||||||
switch (reward.itemId) {
|
switch (reward.itemId) {
|
||||||
case 1001: // 金币
|
case 1001: // 金币
|
||||||
|
|
@ -607,4 +606,4 @@ export default class passCheckMgr extends cc.Component {
|
||||||
this.list = null;
|
this.list = null;
|
||||||
this.passCheckItem = null;
|
this.passCheckItem = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user