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

+ 3 - 3
luckypot_sp/assets/Lobby/scripts/HNScenceManager.js

@@ -218,11 +218,11 @@ class HNScenceManager {
                     pgContentP = this.pgContentP
                 }else{
                     pgContentP = this.pgContentP = new cc.Node("pgContentP")
+                    runScene.addChild(pgContentP);
                 }
                 pgContentP.angle = 90
                 pgContentP.setContentSize(runScene.getContentSize().height,runScene.getContentSize().width)//因为旋转了,宽高对调了
                 gameNode.parent = pgContentP
-                runScene.addChild(pgContentP);
                 pgContentP.setAnchorPoint(0.5, 0.5);
                 pgContentP.setPosition(cc.v2(0,0))
                 // let widget = pgContentP.addComponent(cc.Widget);
@@ -276,8 +276,8 @@ class HNScenceManager {
         cc.vv.audioMgr.stopAllEffects();
         if (this.pgContentP) {//销毁pg容器
             // this.pgContentP.destroy();
-            this.pgContentP.removeFromParent(true);
-            this.pgContentP = null;
+            // this.pgContentP.removeFromParent(true);
+            // this.pgContentP = null;
         }
         if (this._currGameNode != undefined && this._currGameNode != null) {