diff --git a/assets/Script/Map.ts b/assets/Script/Map.ts index d382bbe..e2d986d 100644 --- a/assets/Script/Map.ts +++ b/assets/Script/Map.ts @@ -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(); } //创建方块