future há 1 ano atrás
pai
commit
ac465edf4f
2 ficheiros alterados com 27 adições e 24 exclusões
  1. 21 21
      assets/scene/game.scene
  2. 6 3
      assets/script/sdkUtil.ts

+ 21 - 21
assets/scene/game.scene

@@ -93,7 +93,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 540,
-      "y": 960.0000000000002,
+      "y": 960,
       "z": 0
     },
     "_lrot": {
@@ -347,7 +347,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -651,7 +651,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1164,7 +1164,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2013,7 +2013,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -4187,7 +4187,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -4248,7 +4248,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": -540,
-      "y": -960.0000000000001,
+      "y": -960,
       "z": 0
     },
     "_lrot": {
@@ -4287,7 +4287,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -5129,7 +5129,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 860.0000000000001,
+      "y": 860,
       "z": 0
     },
     "_lrot": {
@@ -5939,7 +5939,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -6142,7 +6142,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": -540,
-      "y": -960.0000000000001,
+      "y": -960,
       "z": 0
     },
     "_lrot": {
@@ -6181,7 +6181,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -7922,7 +7922,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -9534,7 +9534,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -11315,7 +11315,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -11439,7 +11439,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -20607,7 +20607,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -20700,7 +20700,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -20869,7 +20869,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -20921,7 +20921,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -21042,7 +21042,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 6 - 3
assets/script/sdkUtil.ts

@@ -30,8 +30,9 @@ export class SdkUtil {
     private static tt_isRecording:boolean = false;  //抖音是否录制中
 
     public static init() {
-        this.ttRegisterSidebar()
-        this.ttGetSystemInfo()
+        this.ttGetSystemInfo(()=> {
+            this.ttRegisterSidebar()
+        })
     }
 
     /**
@@ -240,12 +241,14 @@ export class SdkUtil {
     /**
      * 抖音获取系统信息
      */
-    public static ttGetSystemInfo() {
+    public static ttGetSystemInfo(callback) {
         if(sys.platform == sys.Platform.BYTEDANCE_MINI_GAME) {
             tt.getSystemInfo({
                 success:(res) => {
                     // console.log('tt.getSystemInfo=',res)
+                    // appName: "Douyin" appName: "douyin_lite"
                     SdkUtil.tt_systemInfo = res
+                    callback()
                 }
             })
         }