Преглед на файлове

pg游戏,适配横竖容器

lhj преди 2 месеца
родител
ревизия
ea200432c9
променени са 2 файла, в които са добавени 21 реда и са изтрити 28 реда
  1. 12 2
      luckypot_sp/assets/Lobby/scripts/HNScenceManager.js
  2. 9 26
      luckypot_sp/assets/SubGame/slotMousebundle/slotMouseprefab/slotMouse.prefab

+ 12 - 2
luckypot_sp/assets/Lobby/scripts/HNScenceManager.js

@@ -22,6 +22,8 @@ let filter_home_assets = [
 ];
 
 class HNScenceManager {
+    PORTRAIT = 0
+    LANDSCAPE = 1
     constructor() {
         this._rootComponent = null;
         this._currGameNode = null;
@@ -225,8 +227,16 @@ class HNScenceManager {
                     pgContentP = this.pgContentP = new cc.Node("pgContentP")
                     runScene.addChild(pgContentP);
                 }
-                pgContentP.angle = 90
-                pgContentP.setContentSize(runScene.getContentSize().height,runScene.getContentSize().width)//因为旋转了,宽高对调了
+
+                let direct = 1//PG游戏横着放
+                if (direct == this.PORTRAIT) {                    
+                    pgContentP.angle = 90
+                    pgContentP.setContentSize(runScene.getContentSize().height,runScene.getContentSize().width)//因为旋转了,宽高对调了
+                } else {                    
+                    pgContentP.setContentSize(750,1334);
+                    let scale = runScene.getContentSize().height/1334;
+                    pgContentP.setScale(scale);
+                }
                 gameNode.parent = pgContentP
                 pgContentP.setAnchorPoint(0.5, 0.5);
                 pgContentP.setPosition(cc.v2(0,0))

+ 9 - 26
luckypot_sp/assets/SubGame/slotMousebundle/slotMouseprefab/slotMouse.prefab

@@ -103,8 +103,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 750,
-      "height": 1334
+      "width": 1624,
+      "height": 750
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -115,8 +115,8 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
+        812,
         375,
-        667,
         0,
         0,
         0,
@@ -367,7 +367,7 @@
       "ctor": "Float64Array",
       "array": [
         0,
-        0,
+        -292,
         0,
         0,
         0,
@@ -38528,8 +38528,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 750,
-      "height": 1334
+      "width": 1624,
+      "height": 750
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -38837,8 +38837,8 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        353,
-        647.1,
+        790,
+        355.1,
         0,
         0,
         0,
@@ -39177,23 +39177,6 @@
       "__id__": 1
     },
     "_enabled": true,
-    "m_Players": [],
-    "m_SelfPlayer": null,
-    "_infoPrivateRoom": null,
-    "_gamePersonCnt": 0,
-    "_roomNum": 0,
-    "_ruleIdex": 0,
-    "_cellScore": 0,
-    "_GPSInfo": [],
-    "_GpsInfoNode": null,
-    "_leaveChairID": [],
-    "_gameServerItem": null,
-    "_changeTableLimit": 3,
-    "_gpsRecord": [],
-    "marqueueArr": [],
-    "delayMarqueueTime": 0,
-    "_bChangeRoomNotClose": false,
-    "_recommandServerItem": null,
     "_id": ""
   },
   {
@@ -39270,7 +39253,7 @@
     "node": {
       "__id__": 1
     },
-    "_enabled": false,
+    "_enabled": true,
     "_materials": [
       {
         "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"