修改无尽关卡可以调关
This commit is contained in:
parent
398df66037
commit
c7fec01378
|
|
@ -967,7 +967,13 @@ export default class JiaZai extends cc.Component {
|
||||||
// if (version != "开发版" && version != "体验版") {
|
// if (version != "开发版" && version != "体验版") {
|
||||||
// MiniGameSdk.API.showToast("关卡每周更新,敬请期待!");
|
// MiniGameSdk.API.showToast("关卡每周更新,敬请期待!");
|
||||||
// cc.fx.GameTool.requestSubscribe();
|
// cc.fx.GameTool.requestSubscribe();
|
||||||
|
if (version == "开发版" || version == "体验版") {
|
||||||
|
if (this.custom.string != "") {
|
||||||
|
cc.fx.GameConfig.GM_INFO.level = parseInt(this.custom.string) - 1;
|
||||||
|
this.isShow = false;
|
||||||
|
cc.fx.GameConfig.LEVEL_INFO_init(true, 0, false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
cc.fx.AudioManager._instance.playEffect("zhuan1", null);
|
cc.fx.AudioManager._instance.playEffect("zhuan1", null);
|
||||||
this.node.getChildByName("zhuanchang").active = true;
|
this.node.getChildByName("zhuanchang").active = true;
|
||||||
this.node.getChildByName("zhuanchang").getComponent(sp.Skeleton).setAnimation(1, "up", false);
|
this.node.getChildByName("zhuanchang").getComponent(sp.Skeleton).setAnimation(1, "up", false);
|
||||||
|
|
@ -979,6 +985,20 @@ export default class JiaZai extends cc.Component {
|
||||||
Utils.setEndlessLevel(() => { }, rLevel, cc.fx.GameConfig.GM_INFO.endLevelNum);
|
Utils.setEndlessLevel(() => { }, rLevel, cc.fx.GameConfig.GM_INFO.endLevelNum);
|
||||||
|
|
||||||
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, false, true);
|
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, false, true);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cc.fx.AudioManager._instance.playEffect("zhuan1", null);
|
||||||
|
this.node.getChildByName("zhuanchang").active = true;
|
||||||
|
this.node.getChildByName("zhuanchang").getComponent(sp.Skeleton).setAnimation(1, "up", false);
|
||||||
|
|
||||||
|
// cc.fx.GameConfig.GM_INFO.randomLevel = cc.fx.GameTool.getNextLevel() || 0;
|
||||||
|
let rLevel = cc.fx.GameConfig.GM_INFO.randomLevel;
|
||||||
|
cc.fx.StorageMessage.setStorage("randomLevel", rLevel);
|
||||||
|
console.log("保存玩家随机关卡", rLevel, cc.fx.GameConfig.GM_INFO.endLevelNum)
|
||||||
|
Utils.setEndlessLevel(() => { }, rLevel, cc.fx.GameConfig.GM_INFO.endLevelNum);
|
||||||
|
|
||||||
|
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
// }
|
// }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user