|
@@ -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);
|
|
|
}
|
|
|
|