import User, { UserGameData } from "../../FrameWork/User/User"; import Common5 from "../../Platform/th/Common5"; // import DustbinManager from "./DustbinManager"; // import IceWorldManager from "./IceWorldManager"; // import KuaidiManager from "./KuaidiManager"; import ProbabilityManager from "./ProbabilityManager"; // import ShouLieManager from "./ShouLieManager"; import BuyShopManager from "./BuyShopManager"; // import TaoFenManager from "./TaoFenManager"; import PrefabManage, { GameType } from "../PrefabManager/PrefabManage"; import BagManager, { BagGoodsConfig, GoodsLocalProperty } from "./BagManager"; // import DiaoYuConfigManage from "../diaoyu/DiaoYuConfigManage"; // import FengWeiManager from "./FengWeiManager"; import TaskManager, { MainTaskIdEnum, SubTaskIdEnum } from "../JuQingChat/TaskManager"; import GMManager from "./GMManager"; import AppPlatform from "../../FrameWork/Util/AppPlatform"; import CommonDefine from "../../Platform/th/CommonDefine"; import UserManager from "./UserManager"; // import NewDataManage_nls from "../game_dls/NewDataManage_nls"; // import IndustryManager from "./IndustryManager"; // import ChaChangManager from "./ChaChangManager"; // import BaiCaoJiManager from "./BaiCaoJiManager"; // import JiaLiGongManager from "./JiaLiGongManager"; // import QinWangLingManager from "./QinWangLingManager"; // import XiuXianNongZhuangManager from "./XiuXianNongZhuangManager"; // import YouTingJiDiManager from "./YouTingJiDiManager"; import KuaiDiZhanManager from "../GameMethodRes/kuaidizhan/KuaiDiZhanManager"; // import ChongWuGuanManager from "../ChongWuGuan/ChongWuGuanManager"; // import CaiChaConfigManage from "../game/caicha/CaiChaConfigManage"; // import { GameSecondLevelManage_xpz } from "../XiPanZi/NewDataManage_xpz"; import EventMgr from "../../FrameWork/Event/EventMgr"; import { ryw_Event } from "../../FrameWork/Event/EventEnum"; import JiuPingHuiShouManager from "../JiuPingHuiShou/JiuPingHuiShouManager"; import IceWorldManager from "./IceWorldManager"; export default class InterfaceManager { public static initManager() { // IndustryManager.initIndustryManager() // FengWeiManager.initFengWeiManager() // GameSecondLevelManage_xpz.setStartCellData() InterfaceManager.loadAllJson() } public static loadAllJson() { // let DiaoYuConfigCallFunc = (callFunc)=>{ // DiaoYuConfigManage.loadAllJson(callFunc); // } let JiuPingHuiShouConfigCallFunc = (callFunc) => { JiuPingHuiShouManager.initManager(callFunc) } let BuyShopConfigCallFunc = (callFunc) => { BuyShopManager.initManager(callFunc) } // let ChongWuGuanConfigCallFunc = (callFunc)=>{ // ChongWuGuanManager.initManager(callFunc) // } // let DustbinConfigCallFunc = (callFunc)=>{ // DustbinManager.initManager(callFunc) // } let IceWorldConfigCallFunc = (callFunc) => { IceWorldManager.initManager(callFunc) } // let KuaidiConfigCallFunc = (callFunc)=>{ // KuaidiManager.initManager(callFunc) // } // let ShouLieConfigCallFunc = (callFunc)=>{ // ShouLieManager.initManager(callFunc) // } // let TaoFenConfigCallFunc = (callFunc)=>{ // TaoFenManager.initManager(callFunc) // } // let ChaChangConfigCallFunc = (callFunc)=>{ // ChaChangManager.initManager(callFunc) // } // let BaiCaoJiConfigCallFunc = (callFunc)=>{ // BaiCaoJiManager.initManager(callFunc) // } // let JiaLiGongConfigCallFunc = (callFunc)=>{ // JiaLiGongManager.initManager(callFunc) // } // let QinWangLingConfigCallFunc = (callFunc)=>{ // QinWangLingManager.initManager(callFunc) // } // let XiuXianNongChangConfigCallFunc = (callFunc)=>{ // XiuXianNongZhuangManager.initManager(callFunc) // } // let YouTingJiDiConfigCallFunc = (callFunc)=>{ // YouTingJiDiManager.initManager(callFunc) // } let KuaiDiZhanConfigCallFunc = (callFunc) => { KuaiDiZhanManager.initManager(callFunc) } // let CaiChaConfigCallFunc = (callFunc)=>{ // CaiChaConfigManage.initManager(callFunc) // } //这里用递归的方式加载json,处理同时加载多个json情况 let loadJsonArr = [ JiuPingHuiShouConfigCallFunc, BuyShopConfigCallFunc, KuaiDiZhanConfigCallFunc, IceWorldConfigCallFunc ] let loadIndex = 0 let loadCallFunc = (index) => { if (index >= loadJsonArr.length) { return } let time = new Date().getTime() console.log('shaoyang_mainScene页加载当前json', index, time - Common5.shiJianChuo) console.log('mainScene页loadAllJson_', index) let callFunc = () => { console.log('mainScene页单个json加载完毕,加载下一个') loadCallFunc(++loadIndex) } loadJsonArr[index](callFunc) } loadCallFunc(loadIndex) } public static getAllEarnMoneyInterface() { return 100 } // public static getAllIndustryMoneyInterface(){ // let money1 = IndustryManager.allIndustryMoney() // return money1 // } // public static getIndustryConfigByIDInterface(id){ // return IndustryManager.getIndustryConfigByID(id) // } // public static initLoadManager(){ // let wanfaList = [GameType.NiFengKuaiDi, GameType.ShouLieChang, GameType.HJHA, GameType.ShouHuoji, GameType.BingHu, GameType.FanLaji, GameType.TaoFen] // for(let i = 0; i=0){ // tempGameList[tempGameList.length] = game // } // } // let bagList = BagManager.getBagProList() // let daohuoList = [] // console.log(bagList, 'bagList+++==') // let maxBagLength = bagList.length // let goodidList = [] // if(bagList.length>0){ // if(maxBagLength>=4){ // maxBagLength = 4 // } // bagList.sort(function(){ // return 0.5 - Math.random() // }) // for(let i = 0; i4){ // for(let i = daohuoList.length; i=maxLength){ // break // } // } // } // return daohuoList // } // for(let i = 0; i=0){ // }else{ // console.log(objData, 'objData+++==') // if(goodidList.indexOf(objData.goodId)<0){ // daohuoList[daohuoList.length] = objData // if(daohuoList.length>=maxLength){ // break // } // } // } // } // } // return daohuoList // } public static setDaoyeList(gameType, index) { let daohuoList = [] for (let i = 0; i < BagGoodsConfig.length; i++) { if (gameType == BagGoodsConfig[i].gameType) { let obj = { goodId: BagGoodsConfig[i].goodId, buyNum: BagGoodsConfig[i].buyNum, buyPercent: 10, gameType: BagGoodsConfig[i].gameType } daohuoList.push(obj) } } User.setDaoyeIndex(index) User.setDaoyeGoodList(daohuoList) User.setDaoyeJiaoHuo(false) User.setMaoYiFenHongTimes(5) this.refreshChaoShiCaiDanStatus() } public static getDaoyeList() { return User.getDaoyeGoodList() } public static refreshChaoShiCaiDanStatus() { //无彩蛋状态 User.setCaiDanStatus(1, 0) let index = User.getDaoyeIndex() let rate = 0 if (index >= 1 && index <= 4) { rate = 1 } else if (index >= 5 && index <= 8) { rate = 5 } else if (index >= 9 && index <= 10) { rate = 10 } else if (index == -1) {//全部单子完成后 rate = 100 } if (GMManager.getToggleStatus_SRDD10()) { rate = 100 } console.log(`sy触发了第${index}张商人订单`) let random = Math.floor(Math.random() * 100) if (random < rate) { //有彩蛋未完成状态 User.setCaiDanStatus(1, 1) console.log('sy随机到了彩蛋11111') } else { console.log('sy未获得彩蛋22222') } EventMgr.emitEvent_custom(ryw_Event.RefreshChaoShiCaiDan) } public static getGoodInGame(goodsId) { if (goodsId >= 1000 && goodsId <= 1099) { return '售货机' } else if (goodsId >= 1200 && goodsId <= 1299) { return '长白山脉' } else if (goodsId >= 1300 && goodsId <= 1399) { return '顾氏水产' } else if (goodsId >= 1400 && goodsId <= 1499) { return '小卖部' } else if (goodsId >= 1500 && goodsId <= 1599) { return '冰雪世界' } else if (goodsId >= 1100 && goodsId <= 1199) { return '垃圾桶' } else if (goodsId >= 1600 && goodsId <= 1699) { return '顾氏环卫' } let config = BagManager.getJuQingGoodConfig(goodsId) if (config) { return config.gameType } } public static getGoodInGameE(goodsId) { if (goodsId >= 1000 && goodsId <= 1099) { return 'ShouHuoJi' } else if (goodsId >= 1200 && goodsId <= 1299) { return 'ShouLie' } else if (goodsId >= 1300 && goodsId <= 1399) { return 'Diaoyu' } else if (goodsId >= 1400 && goodsId <= 1499) { return 'ShouHuoJi' } else if (goodsId >= 1500 && goodsId <= 1599) { return 'IceWorld' } else if (goodsId >= 1100 && goodsId <= 1199) { return 'Dustbin' } else if (goodsId >= 1600 && goodsId <= 1699) { return 'TaoFen' } else if (goodsId == 1711 || goodsId == 1724 || goodsId == 2712) { return 'Diaoyu' } } public static DiTanSaleGoods(price) { //let num = 1 User.setDitanSaleGoodsIndex(price) } public static changeList(gameType, goodArray, isCanchangeList, isAD) { // let config = BagManager.getJuQingGoodConfig() //保底生效,出GM物品 if (isCanchangeList) { let goodIdTemp = 0 let gameTypeCompare = '-999' let mainTaskInfo: any = TaskManager.getCurUnLockMainTaskInfo() let mainId = mainTaskInfo.Id let configData = null //优先任务Gm let isHaveTaskGm = false if (mainId != MainTaskIdEnum.MainTask_None && mainId) { configData = TaskManager.getTaskConfigById(mainId) console.log(configData, 'config++++++++++++==') if (configData.GMGoodIdArray && (configData.GMGameType == gameType)) { // goodIdTemp = configData.GMGoodIdArray[0] for (let i = 0; i < configData.GMGoodIdArray.length; i++) { let goodId = configData.GMGoodIdArray[i] if (BagManager.getBagGoodNums(goodId) <= 0) { isHaveTaskGm = true goodIdTemp = goodId break } } //goodIdTemp = configData.GMGoodIdArray[0] gameTypeCompare = configData.GMGameType } } if (!isHaveTaskGm) { let daoYeList = InterfaceManager.getDaoyeList() if (daoYeList.length > 0) { // goodIdTemp = daoYeList[0].goodId let config = BagManager.getJuQingGoodConfig(daoYeList[0].goodId) gameTypeCompare = config.GMGameType for (let i = 0; i < daoYeList.length; i++) { let goodId = daoYeList[i].goodId if (BagManager.getBagGoodNums(goodId) <= 0) { goodIdTemp = goodId break } } } } console.log(goodIdTemp, gameTypeCompare, 'gameTypeCompare+++++++++++=====') if (gameTypeCompare == gameType) { console.log('正是这个玩法') let goodId = goodIdTemp let goodsNum = BagManager.getBagGoodNums(goodId) if (goodsNum <= 0) { let isHave = false for (let i = 0; i < goodArray.length; i++) { if (goodArray[i].goodId == goodIdTemp || goodIdTemp == 0) { isHave = true break } } if (isHave) { console.log('列表有任务物品不需要变换') return goodArray } else { //商人收购单某些物品不能免费刷出,只能广告刷出 let juQingGoodConfig = BagManager.getJuQingGoodConfig(goodId) let isCanOut = true if (!isAD) { if (juQingGoodConfig && !juQingGoodConfig.isCanFreeOut) { isCanOut = false } } if (isCanOut) { for (let i = 0; i < goodArray.length; i++) { goodArray[i].goodId = goodId break } } console.log('商人收购单某些物品不能免费刷出,只能广告刷出', goodId, isCanOut) console.log('背包没有任务物品,变换完成', goodArray) return goodArray } } else { console.log('背包有任务物品不需要变换') return goodArray } } else if (gameTypeCompare == '-999') { console.log('不是这个玩法') let daoyeGoodList = User.getDaoyeGoodList() //判断倒爷的道具是这个玩法的并且数量不足的情况 console.log(daoyeGoodList, 'daoyeGoodList+++判断倒爷的道具是这个玩法的并且数量不足的情况++++++++=====') // let daoyeJiaohuo = User.getDaoyeJiaoHuo() if (daoyeGoodList.length == 0) { // console.log(goodArray, '倒爷已经提交货单了') return goodArray } else { let tempList = [] for (let i = 0; i < daoyeGoodList.length; i++) { let gameTypeGet = this.getGoodInGameE(daoyeGoodList[i].goodId) if (gameTypeGet == gameType) { tempList[tempList.length] = BagManager.getGoodsProperty(daoyeGoodList[i].goodId) } } if (tempList.length == 0) { console.log(goodArray, '提货单没有这个玩法的道具') return goodArray } else { let goodIdTemp = 0 for (let i = 0; i < tempList.length; i++) { let buyNum = tempList[i].buyNum || 0 let haveNum = BagManager.getBagGoodNums(tempList[i].goodId) if (haveNum < buyNum) { goodIdTemp = tempList[i].goodId break } } console.log(goodIdTemp, '替换这个道具') // 开始改变list let isHave = false for (let i = 0; i < goodArray.length; i++) { if (goodArray[i].goodId == goodIdTemp || goodIdTemp == 0) { isHave = true break } } if (isHave) { console.log(goodIdTemp, '正准备给了这个道具') return goodArray } else { if (goodIdTemp == 0) { console.log(goodArray, '没有匹配的goodId') return goodArray } else { for (let i = 0; i < goodArray.length; i++) { goodArray[i].goodId = goodIdTemp break } console.log(goodIdTemp, '切换道具') return goodArray } } } } } else { // console.log('不需要变换') return goodArray } } else { return goodArray } } public static changeList2(gameType, goodArray, isAD, AdRandomNum?) { let goodsIdIndex = []; let goodIdTemp = []; let gameTypeCompare = '-999'; let isHaveTaskGm = false; //先将所有可以出的放到数组中记录 let taskInfo: any = TaskManager.getCurUnLockMainTaskInfo(); if (taskInfo.Id != MainTaskIdEnum.MainTask_None && taskInfo.Id) { let configData = TaskManager.getTaskConfigById(taskInfo.Id); if (configData.GMGoodIdArray && (configData.GMGameType == gameType)) { for (let i = 0; i < configData.GMGoodIdArray.length; i++) { let goodId = configData.GMGoodIdArray[i]; if (BagManager.getBagGoodNums(goodId) <= 0) { goodIdTemp.push(goodId); goodsIdIndex.push(i); } } isHaveTaskGm = true; gameTypeCompare = configData.GMGameType; } } if (!isHaveTaskGm) { let daoYeList = InterfaceManager.getDaoyeList() if (daoYeList.length > 0) { let config = BagManager.getJuQingGoodConfig(daoYeList[0].goodId) gameTypeCompare = config.GMGameType; for (let i = 0; i < daoYeList.length; i++) { let goodId = daoYeList[i].goodId; if (BagManager.getBagGoodNums(goodId) <= 0) { goodIdTemp.push(goodId); goodsIdIndex.push(i); } } } } if (goodIdTemp.length > 0) { if (gameTypeCompare == gameType) { console.log('正是这个玩法'); let isHave = false; for (let i = 0; i < goodArray.length; i++) { if (goodIdTemp.indexOf(goodArray[i].goodId) >= 0 || goodIdTemp.length == 0) { isHave = true; break; } } if (isHave) { console.log('列表有任务物品不需要变换'); return goodArray; } else { let arr = [] for (let i = 0; i < goodIdTemp.length; i++) { let isCanOut = isAD; let juQingGoodConfig = BagManager.getJuQingGoodConfig(goodIdTemp[i]); if (!juQingGoodConfig || juQingGoodConfig.isCanFreeOut) { if (ProbabilityManager.getCanChangeList_FreeGoods(gameType, goodsIdIndex[i])) { isCanOut = true; } } if (isCanOut) { arr.push(goodIdTemp[i]) // goodArray[index].goodId = goodIdTemp[i]; // index++ } } //随机出个数 let num = arr.length if (isAD && AdRandomNum) { num = AdRandomNum } else { if (arr.length > goodArray.length) { num = goodArray.length } if (num > 1) { num = Math.floor(Math.random() * num) + 1 console.log('随机数量==', num) } } for (let i = 0; i < num; i++) { goodArray[i].goodId = arr[i] } // console.log('商人收购单某些物品不能免费刷出,只能广告刷出', goodIdTemp, isCanOut); console.log('背包没有任务物品,变换完成', goodArray); return goodArray; } } else if (gameTypeCompare == '-999') { console.log('不是这个玩法') return goodArray let daoyeGoodList = User.getDaoyeGoodList() //判断倒爷的道具是这个玩法的并且数量不足的情况 console.log(daoyeGoodList, 'daoyeGoodList+++判断倒爷的道具是这个玩法的并且数量不足的情况++++++++=====') // let daoyeJiaohuo = User.getDaoyeJiaoHuo() if (daoyeGoodList.length == 0) { console.log(goodArray, '倒爷已经提交货单了') return goodArray } else { let tempList = [] for (let i = 0; i < daoyeGoodList.length; i++) { let gameTypeGet = this.getGoodInGameE(daoyeGoodList[i].goodId) if (gameTypeGet == gameType) { tempList[tempList.length] = BagManager.getGoodsProperty(daoyeGoodList[i].goodId) } } if (tempList.length == 0) { console.log(goodArray, '提货单没有这个玩法的道具') return goodArray } else { let goodIdTemp = 0 for (let i = 0; i < tempList.length; i++) { let buyNum = tempList[i].buyNum || 0 let haveNum = BagManager.getBagGoodNums(tempList[i].goodId) if (haveNum < buyNum) { goodIdTemp = tempList[i].goodId break } } console.log(goodIdTemp, '替换这个道具') // 开始改变list let isHave = false for (let i = 0; i < goodArray.length; i++) { if (goodArray[i].goodId == goodIdTemp || goodIdTemp == 0) { isHave = true break } } if (isHave) { console.log(goodIdTemp, '正准备给了这个道具') return goodArray } else { if (goodIdTemp == 0) { console.log(goodArray, '没有匹配的goodId') return goodArray } else { for (let i = 0; i < goodArray.length; i++) { goodArray[i].goodId = goodIdTemp break } console.log(goodIdTemp, '切换道具') return goodArray } } } } } else { console.log('不需要变换'); return goodArray; } } else { console.log('没有道具,不需要变换!'); return goodArray; } } public static getMangheGoodsListByType(gameType, goodsNum = 1, isAD = false, probabilityType = 'common') { //根据游戏类型和是否广告获取配置的概率 let pro = ProbabilityManager.getMangHeProbability(gameType, goodsNum, isAD, probabilityType) console.log(pro, 'pro+++++++++===') let mainTaskInfo: any = TaskManager.getCurUnLockMainTaskInfo() let mainId = mainTaskInfo.Id console.log('getMangheGoodsListByType==', gameType, goodsNum, isAD, probabilityType) //根据保底逻辑判断是否GM保底生效 let isCanchangeList = ProbabilityManager.getCanChangeList(gameType) if (gameType == 'KuaiDiZhan') { let list_ = KuaiDiZhanManager.getCurGoodList() let goodArray = [] let goodIndex = [] while (goodArray.length < goodsNum) { let index_ = Common5.getProbabilityResultIndex(pro) let goods = list_[index_] if (goodIndex.indexOf(index_) >= 0) { } else { goodIndex[goodIndex.length] = index_ let objData = { goodId: goods.goodId, goodNum: 1 } goodArray[goodArray.length] = objData } } console.log(goodArray, '快递站goodArray++++=====') let goodArrayNew = this.changeList2(gameType, goodArray, isAD, 1); return goodArrayNew } else if (gameType == 'JiuPingHuiShou') { let list_ = JiuPingHuiShouManager.getCurGoodList() let goodArray = [] let goodIndex = [] while (goodArray.length < goodsNum) { let index_ = Common5.getProbabilityResultIndex(pro) let goods = list_[index_] if (goodIndex.indexOf(index_) >= 0) { } else { goodIndex[goodIndex.length] = index_ let objData = { goodId: goods.goodId, goodNum: 1 } goodArray[goodArray.length] = objData } } console.log(goodArray, '废瓶回收goodArray++++=====') let goodArrayNew = this.changeList2(gameType, goodArray, isAD); return goodArrayNew } else if (gameType == 'ShouHuoJi') { let list_ = BuyShopManager.getCurGoodList() let goodArray = [] let goodIndex = [] while (goodArray.length < goodsNum) { let index_ = Common5.getProbabilityResultIndex(pro) let goods = list_[index_] if (goodIndex.indexOf(index_) >= 0) { } else { goodIndex[goodIndex.length] = index_ let objData = { "saveNum": 15, "buyNum": 14, "goodId": 1401, "descStr": "鸡蛋", "goodName": "鸡蛋", "priceNum": 2 } objData.saveNum = goods.saveNum objData.buyNum = goods.buyNum objData.goodId = goods.goodId objData.descStr = goods.descStr objData.goodName = goods.goodName objData.priceNum = goods.priceNum goodArray[goodArray.length] = objData } } console.log(goodArray, '售货机goodArray++++=====') let goodArrayNew = this.changeList(gameType, goodArray, isCanchangeList, isAD) goodArrayNew.sort(function () { return 0.5 - Math.random() }) return goodArrayNew } else if (gameType == 'IceWorld') { let goodArray = [] let list_ = IceWorldManager.getCurGoodList() for (let i = 0; i < goodsNum; i++) { let index_ = Common5.getProbabilityResultIndex(pro) // if(i == goodsNum-1){ // if(GMManager.getToggleStatus_YANHU()){ // index_ = 1 // } // } let goods = list_[index_] let data_ = { goodId: 0, goodNum: 1, goodIndex: 0 } data_.goodId = goods.goodId data_.goodIndex = index_ let isHaveData = false for (let value of goodArray) { if (value.goodId == data_.goodId && value.goodIndex == data_.goodIndex) { isHaveData = true value.goodNum++ break } } if (!isHaveData) { goodArray.push(data_) } } let goodArrayNew = this.changeList(gameType, goodArray, isCanchangeList, isAD) return goodArrayNew } } public static getFixGoodListByIndex() { let goodList = BuyShopManager.getCurGoodList() return goodList } public static getXiaoMaibuConfigs(gameType, goodsNum = 1, isAD = false, probabilityType = 'common') { let pro = ProbabilityManager.getMangHeProbability(gameType, goodsNum, isAD, probabilityType) let isCanchangeList = ProbabilityManager.getCanChangeList(gameType) let list_ = BuyShopManager.getCurGoodList() let goodList = [] let goodIndex = [] while (goodList.length < goodsNum) { let index_ = Common5.getProbabilityResultIndex(pro) let goods = list_[index_] if (goodIndex.indexOf(index_) >= 0) { } else { goodIndex[goodIndex.length] = index_ let objData = { "saveNum": 15, "buyNum": 14, "goodId": 1401, "descStr": "鸡蛋", "goodName": "鸡蛋", "priceNum": 2 } objData.saveNum = goods.saveNum objData.buyNum = goods.buyNum objData.goodId = goods.goodId objData.descStr = goods.descStr objData.goodName = goods.goodName objData.priceNum = goods.priceNum goodList[goodList.length] = objData } } console.log(goodList, 'goodList++++=====') let goodArrayNew = this.changeListXMB(gameType, goodList, isCanchangeList) goodArrayNew.sort(function () { return 0.5 - Math.random() }) console.log('goodArrayNew==', goodArrayNew) return goodArrayNew } public static changeListXMB(gameType, goodArray, isCanchangeList) { if (isCanchangeList) { //完成任务107 let mainTaskInfo: any = TaskManager.getCurUnLockMainTaskInfo() let mainId = mainTaskInfo.Id let configData = null if (mainId != MainTaskIdEnum.MainTask_None && mainId) { configData = TaskManager.getTaskConfigById(mainId) console.log(configData, 'config++++++++++++==') } let goodIdTemp = 0 let gameTypeCompare = '-999' if (configData) { if (configData.GMGoodIdArray && configData.GMGameType) { goodIdTemp = configData.GMGoodIdArray[0] gameTypeCompare = configData.GMGameType } } console.log(goodIdTemp, gameTypeCompare, 'gameTypeCompare+++++++++++=====') if (gameTypeCompare == gameType) { console.log('正是这个玩法') //这里有问题,等待时间处理 // let curTaskIdTemp = MainTaskIdEnum.MainTask_109 // if(gameType == 'XiaoMaibu' && curTaskIdTemp == mainId){ // let isHave = false // let insertGoodid = 0 // let insertGoodid2 = 0 // //goodArray 小卖部的购买列表 // // 找出是否需要插入物品 // let isAllHave = true // for(let i = 0; i { Common5.saveTime = 30 console.log('保存数据成功') if (isShow) { PrefabManage.showTextTips('保存数据成功') } }, () => { console.log('保存数据失败') }) } else { //PrefabManage.showTextTips('保存数据过于频繁请稍后再试') console.log('保存数据过于频繁') } } } }