wuwangdong 4 anos atrás
pai
commit
d98064c693
1 arquivos alterados com 20 adições e 0 exclusões
  1. 20 0
      assets/script/game/data/GameData.ts

+ 20 - 0
assets/script/game/data/GameData.ts

@@ -979,6 +979,13 @@ export class GameData {
         return this._productTypeMap.get(type);
     }
 
+    //根据tab获取最大id的数据
+    public getMaxProductDataByType(type: ProductType){
+        let arr = this._productTypeMap.get(type);
+        let len = arr.length;
+        return arr[len - 1];
+    }
+
     /** 产品生产/种植次数 服务器数据 */
     private _productMakeTimesData: any = {};
     /** 产品生产/种植次数 */
@@ -1126,6 +1133,19 @@ export class GameData {
         }
     }
 
+    //判断前面解锁需要数值大于后面解锁数值的情况
+    public judgeAddExtraUnlockMaxId()
+    {
+        if(this._productMakeTimesData.productUnlockMaxId)
+        {
+            let data = this._productMakeTimesData.productUnlockMaxId;
+
+            data.forEach(function (value, key) {
+                
+            });
+        }
+    }
+
     updateDataToSever() {
         let sss: any = {};
         sss.makeTimes = this._productMakeTimesData.makeTimes;