zhaoyu_ma пре 4 месеци
родитељ
комит
f436244611
1 измењених фајлова са 11 додато и 3 уклоњено
  1. 11 3
      luckypot_sp/assets/Lobby/scripts/homesence/homeStartDev.js

+ 11 - 3
luckypot_sp/assets/Lobby/scripts/homesence/homeStartDev.js

@@ -171,7 +171,15 @@ cc.Class({
         tnode2.getComponent(cc.Label).fontSize = 30;
         tnode2.parent = this.node;
         // */
-        this.preLoadSubGameNums = 3; //预加载的子游戏个数
+
+        let preLoadSubGameNums = 3; //预加载的子游戏个数
+        if(BaseDefine.GAME_PLATFORM === BaseDefine.WEB_H5_PLATFORM){
+            if(typeof( isIphone) != "undefined"){
+                if(isIphone()){
+                    preLoadSubGameNums = 1;
+                }
+            }
+        }
 
         let obj = [
             // {kindID: GameConstant.KIND_ID_NTIGER,  weight: 30},  //老虎
@@ -193,8 +201,8 @@ cc.Class({
         obj.sort((a, b)=>{
             return b.weight - a.weight;
         });
-        if(obj.length > this.preLoadSubGameNums){
-            let lerp = obj.length - this.preLoadSubGameNums;
+        if(obj.length > preLoadSubGameNums){
+            let lerp = obj.length - preLoadSubGameNums;
             obj.splice(-lerp, lerp);
         }