游戏开始时,道具清零 特定关卡给一个

This commit is contained in:
huanghaipeng 2025-10-11 18:28:11 +08:00
parent 4da22c93d1
commit 929e797b84

View File

@ -515,6 +515,20 @@ export default class MapConroler extends cc.Component {
this.guideItem.active = true;
}
// 开始游戏时 清空道具 如果是第 8 11 16 默认给一个道具
cc.fx.GameConfig.GM_INFO.hammerAmount = 0;
cc.fx.GameConfig.GM_INFO.freezeAmount = 0;
cc.fx.GameConfig.GM_INFO.magicAmount = 0;
if (cc.fx.GameConfig.GM_INFO.level + 1 == 8) {
cc.fx.GameConfig.GM_INFO.hammerAmount = 1;
}
if (cc.fx.GameConfig.GM_INFO.level + 1 == 11) {
cc.fx.GameConfig.GM_INFO.freezeAmount = 1;
}
if (cc.fx.GameConfig.GM_INFO.level + 1 == 16) {
cc.fx.GameConfig.GM_INFO.magicAmount = 1;
}
this.setPropNum();
}
//创建方块