瀏覽代碼

Merge branch 'master' of http://150.158.33.144:3000/lalalashen/luckypot_SP

lhj 2 月之前
父節點
當前提交
0dbcdae977

+ 35 - 5
luckypot_sp/assets/Lobby/scripts/HNScenceManager.js

@@ -199,7 +199,12 @@ class HNScenceManager {
         bundle.load(url, cc.Prefab, () => {
             // this.loadBundleProgress();
         }, (err, prefab) => {
-            Global.print("创建游戏节点  strPrefabs = " + prefab);
+            if(err){
+                console.log('cuowu: ', err);
+                return;
+            }
+
+            console.log("创建游戏节点  strPrefabs = " , prefab);
             UIHelper.hideWaitNode();
             UIHelper.hideAMask();
             let gameNode = null;
@@ -237,8 +242,8 @@ class HNScenceManager {
             }
             this.setHallNodesActive(false);
             if (this._currGameNode != undefined && this._currGameNode != null) {
-                // this._currGameNode.destroy();
-                this._currGameNode.removeFromParent(true);
+                this._currGameNode.destroy();
+                // this._currGameNode.removeFromParent(true);
                 this._currGameNode = null;
             }
             if (cc.vv && cc.vv.audioMgr) {
@@ -271,9 +276,21 @@ class HNScenceManager {
         })
     }
 
+    removeSelectBundle(){
+        let curKind = cc.vv.serverListData.getCurRoomData().KindID;
+        let config = BundleLoaderManager.Instance().bundleBaseData;
+        for(let key in config){
+            if(key == curKind){
+                return config[key].bundle;
+            }
+        }
+        return null;
+    }
+
     gameBackScence() {
         cc.vv.audioMgr.stopBackMusic();
         cc.vv.audioMgr.stopAllEffects();
+
         if (this.pgContentP) {//销毁pg容器
             // this.pgContentP.destroy();
             // this.pgContentP.removeFromParent(true);
@@ -281,8 +298,21 @@ class HNScenceManager {
         }
         if (this._currGameNode != undefined && this._currGameNode != null) {
 
-            // this._currGameNode.destroy();
-            this._currGameNode.removeFromParent(true);
+            this._currGameNode.destroy();
+            // this._currGameNode.removeFromParent(true);
+           
+            
+            //移除bundle
+            let tName =this.removeSelectBundle();
+            let bundle = cc.assetManager.getBundle(tName);
+            if(bundle){
+                setTimeout(()=>{
+                    window.nowBundle = null;
+                    bundle.releaseAll();
+                    cc.assetManager.removeBundle(bundle);
+                }, 100)
+            }
+
             this._currGameNode = null;
 
             let runScene = cc.director.getScene();

+ 1 - 0
luckypot_sp/assets/SubGame/slotMousebundle/script/MouseHistoryChooseDev.js

@@ -142,6 +142,7 @@ cc.Class({
         if(this.startMonth != this.curYMD.month){
             startDays = this.getDaysInMonth(this.startYear, this.startMonth);
         }
+        let item = null;
         for(let i=0; i < startDays; i++){
             item = cc.instantiate(this.scroSItemPrefab);
             item.setParent(this.conSDay);

+ 1 - 0
luckypot_sp/assets/SubGame/slotNCowbundle/script/CowHistoryChooseDev.js

@@ -143,6 +143,7 @@ cc.Class({
         if(this.startMonth != this.curYMD.month){
             startDays = this.getDaysInMonth(this.startYear, this.startMonth);
         }
+        let item = null;
         for(let i=0; i < startDays; i++){
             item = cc.instantiate(this.scroSItemPrefab);
             item.setParent(this.conSDay);

+ 1 - 1
luckypot_sp/assets/SubGame/slotNTigerbundle/script/FortuneTigerGameFrame.ts

@@ -933,7 +933,7 @@ export default class FortuneTigerGameFrame  extends GameBase{//extends AbstractG
             topTipMsg.showTopTipMsg("gaming!!");
             return
         }
-        FortuneTigerSpineIconData.ins.destroy();
+      
         if(cc.vv.config.ReviewApk) {
             cc.game.end();
             return;

+ 1 - 0
luckypot_sp/assets/SubGame/slotNTigerbundle/script/TigerHistoryChoose.js

@@ -145,6 +145,7 @@ cc.Class({
         if(this.startMonth != this.curYMD.month){
             startDays = this.getDaysInMonth(this.startYear, this.startMonth);
         }
+        let item = null;
         for(let i=0; i < startDays; i++){
             item = cc.instantiate(this.scroSItemPrefab);
             item.setParent(this.conSDay);

+ 7 - 21
luckypot_sp/assets/SubGame/slotNTigerbundle/slotNTigerprefab/slotCardInfo.prefab

@@ -40,13 +40,10 @@
       },
       {
         "__id__": 15
-      },
-      {
-        "__id__": 16
       }
     ],
     "_prefab": {
-      "__id__": 17
+      "__id__": 16
     },
     "_opacity": 255,
     "_color": {
@@ -207,7 +204,7 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "ad29f44b--50f-1-47-79-b-652-bd6d7a678460"
     },
     "fileId": "b0vjU2wYlLHYJek2tOT5fP",
     "sync": false
@@ -291,6 +288,7 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
+    "_useOriginalSize": true,
     "_string": "3",
     "_N$string": "3",
     "_fontSize": 64,
@@ -317,7 +315,7 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "ad29f44b--50f-1-47-79-b-652-bd6d7a678460"
     },
     "fileId": "31KOxz1vxHNbYNDAF6/42h",
     "sync": false
@@ -401,6 +399,7 @@
     ],
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
+    "_useOriginalSize": true,
     "_string": "10",
     "_N$string": "10",
     "_fontSize": 64,
@@ -427,7 +426,7 @@
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "ad29f44b--50f-1-47-79-b-652-bd6d7a678460"
     },
     "fileId": "bfEHgirUtF0Ji6b2O6nGv/",
     "sync": false
@@ -577,26 +576,13 @@
     "_enabled": true,
     "_id": ""
   },
-  {
-    "__type__": "6c7facjNj1J9YXjazianALL",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 1
-    },
-    "_enabled": true,
-    "closeRelease": false,
-    "exitTime": 0,
-    "touchOutsideClose": true,
-    "_id": ""
-  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1
     },
     "asset": {
-      "__id__": 0
+      "__uuid__": "ad29f44b--50f-1-47-79-b-652-bd6d7a678460"
     },
     "fileId": "",
     "sync": false

+ 1 - 0
luckypot_sp/assets/SubGame/slotRabbitbundle/script/RabbitHistoryChooseDev.js

@@ -144,6 +144,7 @@ cc.Class({
         if(this.startMonth != this.curYMD.month){
             startDays = this.getDaysInMonth(this.startYear, this.startMonth);
         }
+        let item = null;
         for(let i=0; i < startDays; i++){
             item = cc.instantiate(this.scroSItemPrefab);
             item.setParent(this.conSDay);