eraser 3 år sedan
förälder
incheckning
d19ca4fdde

+ 44 - 0
assets/Animation/Game/DialogBoxAni.anim

@@ -0,0 +1,44 @@
+{
+  "__type__": "cc.AnimationClip",
+  "_name": "DialogBoxAni",
+  "_objFlags": 0,
+  "_native": "",
+  "_duration": 0.16666666666666666,
+  "sample": 60,
+  "speed": 1,
+  "wrapMode": 1,
+  "curveData": {
+    "props": {
+      "scale": [
+        {
+          "frame": 0,
+          "value": {
+            "__type__": "cc.Vec3",
+            "x": 1,
+            "y": 1,
+            "z": 1
+          }
+        },
+        {
+          "frame": 0.08333333333333333,
+          "value": {
+            "__type__": "cc.Vec3",
+            "x": 1.2,
+            "y": 1.2,
+            "z": 1
+          }
+        },
+        {
+          "frame": 0.16666666666666666,
+          "value": {
+            "__type__": "cc.Vec3",
+            "x": 1,
+            "y": 1,
+            "z": 1
+          }
+        }
+      ]
+    }
+  },
+  "events": []
+}

+ 6 - 0
assets/Animation/Game/DialogBoxAni.anim.meta

@@ -0,0 +1,6 @@
+{
+  "ver": "2.1.2",
+  "uuid": "d94c095c-8657-4a34-b3ba-3df9a05a84fe",
+  "importer": "animation-clip",
+  "subMetas": {}
+}

+ 13 - 0
assets/Animation/Menu.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "9932172e-bd88-4e18-9688-93300ac8a215",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 29 - 0
assets/Animation/Menu/Loading.anim

@@ -0,0 +1,29 @@
+{
+  "__type__": "cc.AnimationClip",
+  "_name": "Loading",
+  "_objFlags": 0,
+  "_native": "",
+  "_duration": 0.16666666666666666,
+  "sample": 60,
+  "speed": 0.1,
+  "wrapMode": 2,
+  "curveData": {
+    "props": {
+      "angle": [
+        {
+          "frame": 0,
+          "value": 0
+        },
+        {
+          "frame": 0.08333333333333333,
+          "value": -180
+        },
+        {
+          "frame": 0.16666666666666666,
+          "value": -360
+        }
+      ]
+    }
+  },
+  "events": []
+}

+ 6 - 0
assets/Animation/Menu/Loading.anim.meta

@@ -0,0 +1,6 @@
+{
+  "ver": "2.1.2",
+  "uuid": "5cb826ee-fb61-4f03-a78d-07405741201b",
+  "importer": "animation-clip",
+  "subMetas": {}
+}

+ 113 - 79
assets/Scenes/Game.fire

@@ -26,7 +26,7 @@
         "__id__": 9
       },
       {
-        "__id__": 86
+        "__id__": 87
       }
     ],
     "_active": true,
@@ -305,7 +305,7 @@
       "__id__": 32
     },
     "ResultNode": {
-      "__id__": 56
+      "__id__": 57
     },
     "_id": "edT1+IAmFLNYxZjRcdaVkJ"
   },
@@ -318,31 +318,31 @@
     },
     "_children": [
       {
-        "__id__": 67
+        "__id__": 68
       },
       {
-        "__id__": 70
+        "__id__": 71
       },
       {
-        "__id__": 73
+        "__id__": 74
       },
       {
-        "__id__": 76
+        "__id__": 77
       },
       {
-        "__id__": 80
+        "__id__": 81
       }
     ],
     "_active": true,
     "_components": [
-      {
-        "__id__": 83
-      },
       {
         "__id__": 84
       },
       {
         "__id__": 85
+      },
+      {
+        "__id__": 86
       }
     ],
     "_prefab": null,
@@ -423,16 +423,16 @@
         "__id__": 45
       },
       {
-        "__id__": 56
+        "__id__": 57
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 65
+        "__id__": 66
       },
       {
-        "__id__": 66
+        "__id__": 67
       }
     ],
     "_prefab": null,
@@ -2058,16 +2058,16 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 51
-      },
-      {
-        "__id__": 53
+        "__id__": 52
       },
       {
         "__id__": 54
       },
       {
         "__id__": 55
+      },
+      {
+        "__id__": 56
       }
     ],
     "_prefab": null,
@@ -2082,19 +2082,19 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 129,
-      "height": 87.6666667
+      "height": 100
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
+      "x": 0,
+      "y": 0
     },
     "_trs": {
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        -262.458,
-        591.965,
+        -326.958,
+        541.965,
         0,
         0,
         0,
@@ -2133,10 +2133,10 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 49
+        "__id__": 50
       },
       {
-        "__id__": 50
+        "__id__": 51
       }
     ],
     "_prefab": null,
@@ -2150,8 +2150,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 129,
-      "height": 87.6666667
+      "width": 100,
+      "height": 80
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2162,8 +2162,8 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        0,
-        0,
+        64.5,
+        50,
         0,
         0,
         0,
@@ -2199,6 +2199,9 @@
     "_components": [
       {
         "__id__": 48
+      },
+      {
+        "__id__": 49
       }
     ],
     "_prefab": null,
@@ -2282,6 +2285,35 @@
     "_N$cacheMode": 1,
     "_id": "9eQd2boZNO64Ebh9r0JvVU"
   },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 47
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": {
+      "__id__": 46
+    },
+    "_alignFlags": 18,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_id": "d4CV99rwBJ0ZU7kfSVewpe"
+  },
   {
     "__type__": "cc.Sprite",
     "_name": "",
@@ -2323,12 +2355,14 @@
     },
     "_enabled": true,
     "alignMode": 0,
-    "_target": null,
-    "_alignFlags": 45,
-    "_left": 0,
-    "_right": 0,
-    "_top": 0,
-    "_bottom": 0,
+    "_target": {
+      "__id__": 45
+    },
+    "_alignFlags": 18,
+    "_left": 14.5,
+    "_right": 14.5,
+    "_top": 23.833333349999997,
+    "_bottom": 23.833333349999997,
     "_verticalCenter": 0,
     "_horizontalCenter": 0,
     "_isAbsLeft": true,
@@ -2355,7 +2389,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 52
+        "__id__": 53
       }
     ],
     "_N$interactable": true,
@@ -2452,7 +2486,7 @@
     "_alignFlags": 9,
     "_left": 33.04199999999997,
     "_right": 0,
-    "_top": 4.201666649999964,
+    "_top": -1.965000000000039,
     "_bottom": 0,
     "_verticalCenter": 0,
     "_horizontalCenter": 0,
@@ -2504,19 +2538,19 @@
     },
     "_children": [
       {
-        "__id__": 57
+        "__id__": 58
       },
       {
-        "__id__": 60
+        "__id__": 61
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 63
+        "__id__": 64
       },
       {
-        "__id__": 64
+        "__id__": 65
       }
     ],
     "_prefab": null,
@@ -2572,16 +2606,16 @@
     "_name": "Fail",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 56
+      "__id__": 57
     },
     "_children": [],
     "_active": false,
     "_components": [
       {
-        "__id__": 58
+        "__id__": 59
       },
       {
-        "__id__": 59
+        "__id__": 60
       }
     ],
     "_prefab": null,
@@ -2637,7 +2671,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 57
+      "__id__": 58
     },
     "_enabled": true,
     "_materials": [
@@ -2669,7 +2703,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 57
+      "__id__": 58
     },
     "_enabled": true,
     "_defaultClip": {
@@ -2688,16 +2722,16 @@
     "_name": "Win",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 56
+      "__id__": 57
     },
     "_children": [],
     "_active": false,
     "_components": [
       {
-        "__id__": 61
+        "__id__": 62
       },
       {
-        "__id__": 62
+        "__id__": 63
       }
     ],
     "_prefab": null,
@@ -2753,7 +2787,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 60
+      "__id__": 61
     },
     "_enabled": true,
     "_materials": [
@@ -2785,7 +2819,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 60
+      "__id__": 61
     },
     "_enabled": true,
     "_defaultClip": {
@@ -2804,7 +2838,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 56
+      "__id__": 57
     },
     "_enabled": true,
     "alignMode": 1,
@@ -2833,7 +2867,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 56
+      "__id__": 57
     },
     "_enabled": true,
     "BG": {
@@ -2848,10 +2882,10 @@
       }
     ],
     "WinNode": {
-      "__id__": 60
+      "__id__": 61
     },
     "FailNode": {
-      "__id__": 57
+      "__id__": 58
     },
     "_id": "84RrOVUDBDKZTuumEebPPJ"
   },
@@ -2910,10 +2944,10 @@
     "_active": false,
     "_components": [
       {
-        "__id__": 68
+        "__id__": 69
       },
       {
-        "__id__": 69
+        "__id__": 70
       }
     ],
     "_prefab": null,
@@ -2969,7 +3003,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 67
+      "__id__": 68
     },
     "_enabled": true,
     "_materials": [
@@ -3001,7 +3035,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 67
+      "__id__": 68
     },
     "_enabled": true,
     "alignMode": 1,
@@ -3034,10 +3068,10 @@
     "_active": false,
     "_components": [
       {
-        "__id__": 71
+        "__id__": 72
       },
       {
-        "__id__": 72
+        "__id__": 73
       }
     ],
     "_prefab": null,
@@ -3093,7 +3127,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 70
+      "__id__": 71
     },
     "_enabled": true,
     "_materials": [
@@ -3125,7 +3159,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 70
+      "__id__": 71
     },
     "_enabled": true,
     "alignMode": 1,
@@ -3160,10 +3194,10 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 74
+        "__id__": 75
       },
       {
-        "__id__": 75
+        "__id__": 76
       }
     ],
     "_prefab": null,
@@ -3219,7 +3253,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 73
+      "__id__": 74
     },
     "_enabled": true,
     "_materials": [
@@ -3251,7 +3285,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 73
+      "__id__": 74
     },
     "_enabled": true,
     "alignMode": 1,
@@ -3284,13 +3318,13 @@
     },
     "_children": [
       {
-        "__id__": 77
+        "__id__": 78
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 79
+        "__id__": 80
       }
     ],
     "_prefab": null,
@@ -3346,13 +3380,13 @@
     "_name": "label",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 76
+      "__id__": 77
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 78
+        "__id__": 79
       }
     ],
     "_prefab": null,
@@ -3408,7 +3442,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 77
+      "__id__": 78
     },
     "_enabled": true,
     "_materials": [
@@ -3441,7 +3475,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 76
+      "__id__": 77
     },
     "_enabled": true,
     "_materials": [
@@ -3479,10 +3513,10 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 81
+        "__id__": 82
       },
       {
-        "__id__": 82
+        "__id__": 83
       }
     ],
     "_prefab": null,
@@ -3538,7 +3572,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 80
+      "__id__": 81
     },
     "_enabled": true,
     "_materials": [
@@ -3578,7 +3612,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 80
+      "__id__": 81
     },
     "_enabled": true,
     "alignMode": 1,
@@ -3647,7 +3681,7 @@
       "__id__": 2
     },
     "TalkingLabelNode": {
-      "__id__": 77
+      "__id__": 78
     },
     "_id": "caXyIBeGJPE7FCZrKmzQdw"
   },
@@ -3691,7 +3725,7 @@
     "_active": false,
     "_components": [
       {
-        "__id__": 87
+        "__id__": 88
       }
     ],
     "_prefab": null,
@@ -3747,7 +3781,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 86
+      "__id__": 87
     },
     "_enabled": true,
     "_id": "5d/U7O/7pG76GRKcR/pPBP"

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 139 - 234
assets/Scenes/Menu.fire


+ 43 - 50
assets/Scripts/Game/GameMode.js

@@ -51,14 +51,10 @@ cc.Class({
 
         //初始化
         this.bTimerStart = false;//0停止 1开始 
-        this.bRunScene = true;
-        this.bPunchCD = true;
+        this.bRunScene = false;
+        this.bPunchCD = false;
         this.btnCD = false;
 
-        this.AudioControllerScp.playBGM('Game/Audios/BGM/Funny.wav',1,()=>{
-            this.bRunScene = false;
-        });
-
         switch (aGameInstance.sceneIdx) {
             case 0:
                 this.aGameStates.targetTime.second = 3;
@@ -89,55 +85,29 @@ cc.Class({
     },
     start()
     {
-        this.scheduleOnce(function(){
-            this.bPunchCD = false;
-        },2);
-        
-        if(aGameInstance.bInit)
-        {
-            webView.register(this.node);
-            webView.onBindHitBoxingPost();
-            self.node.on('onBoxingPostHit',this.onBoxingPostHit,this);
-            return;
-        }
-        
-        aGameInstance.bInit =false;
+        //是否在pC
+        if(!lib.isMobile()) return;
+
         let self = this;
-        webView.init(this.node, ()=>{
+
+        self.bPunchCD = true;
+        self.scheduleOnce(()=>{
+            self.bPunchCD = false;
+        },2);
+
+        self.bRunScene = true;
+        self.AudioControllerScp.playBGM('Game/Audios/BGM/Funny.wav',1,()=>{
+            self.bRunScene = false;
+        });
+
+        webView.init(self.node, ()=>{
             webView.onBindHitBoxingPost();
             self.node.on('onBoxingPostHit',self.onBoxingPostHit,self);
         });
-       
-
-        // if(cc.sys.isMobile)
-        // {
-        //     let self = this;
-        //     //init web sdk
-        //     if (lib.openInWebview())
-        //     {
-        //         // 在app内Webview打开
-        //         webView.init(this.node,()=>{
-        //                 webView.onBindHitBoxingPost();
-        //                 webView.onAddQuitModalListener();//添加退出事件
-        //                 self.node.on('onBoxingPostHit',self.onBoxingPostHit,self);
-        //                 self.node.on('onQuit',self.onQuit,self);
-        //                 self.node.on('onQuitModal',self.onQuitModal,self);           
-        //         });
-        //     }
-        // }
     },
     onBoxingPostHit(data)
     {
-        if(this.bPunchCD)
-        {
-            this.scheduleOnce(function(){
-                this.bPunchCD = false;
-            },2);
-
-            return;
-        }
         this.Punch();
-        this.bPunchCD = true;
     },
     //页面退出回调
     onQuit(data)
@@ -163,7 +133,13 @@ cc.Class({
         this.AudioControllerScp.stopAll();
         //取消这个组件得所有计时器
         this.unscheduleAllCallbacks();
-        webView.unRegister(this.node);
+
+         //是否在pC
+         if(lib.isMobile()){
+            webView.onUnbindHitBoxingPost();
+            webView.unRegister(this.node);
+         }
+        
 
         this.scheduleOnce(()=>{
             cc.director.loadScene("Menu");
@@ -175,6 +151,10 @@ cc.Class({
     },
     Punch()
     {
+        if(this.bPunchCD) return;
+        
+        this.bPunchCD = true;
+
         let target = this.StartOrStopButton;
         switch (aGameInstance.sceneIdx) {
             case 0:
@@ -193,6 +173,7 @@ cc.Class({
                             target.active = true;
                             this.ResultScp.ShutDown();
                             this.TrumpAnimScp.StartAnim();
+                            this.bPunchCD = false;
                         }.bind(this));
                     }
                     else
@@ -202,6 +183,7 @@ cc.Class({
                             target.active = true;
                             this.ResultScp.ShutDown();
                             this.TrumpAnimScp.StartAnim();
+                            this.bPunchCD = false;
                         }.bind(this));
                     }
                 }
@@ -233,6 +215,7 @@ cc.Class({
                             target.active = true;
                             this.ResultScp.ShutDown();
                             this.TrumpAnimScp.StartAnim();
+                            this.bPunchCD = false;
                         }.bind(this));
                     }
                     else
@@ -242,6 +225,7 @@ cc.Class({
                             target.active = true;
                             this.ResultScp.ShutDown();
                             this.TrumpAnimScp.StartAnim();
+                            this.bPunchCD = false;
                         }.bind(this));
                     }
                 }
@@ -283,6 +267,7 @@ cc.Class({
                                 this.ResultScp.ShutDown();
                                 this.TrumpAnimScp.StartAnim();
                                 this.TargetTimeLabel.string = '';
+                                this.bPunchCD = false;
                             }.bind(this));
                         }
                         else
@@ -305,6 +290,7 @@ cc.Class({
                             this.ResultScp.ShutDown();
                             this.TrumpAnimScp.StartAnim();
                             this.TargetTimeLabel.string = '';
+                            this.bPunchCD = false;
                         }.bind(this));
                     }
                 }
@@ -348,6 +334,7 @@ cc.Class({
                                 this.ResultScp.ShutDown();
                                 this.TrumpAnimScp.StartAnim();
                                 this.TargetTimeLabel.string = '';
+                                this.bPunchCD = false;
                             }.bind(this));
                         }
                         else
@@ -370,6 +357,7 @@ cc.Class({
                             this.ResultScp.ShutDown();
                             this.TrumpAnimScp.StartAnim();
                             this.TargetTimeLabel.string = '';
+                            this.bPunchCD = false;
                         }.bind(this));
                     }
                 }
@@ -394,7 +382,10 @@ cc.Class({
         this.AudioControllerScp.playBGM('Game/Audios/BGM/CountTime.wav',0.5,()=>{
             this.bRunScene = false;
         });
-        //this.TrumpAnimScp.StartAnim();
+
+        this.scheduleOnce(function(){
+            this.bPunchCD = false;
+        },1);
 
         this.aGameStates.curtTime.second = 0;
         this.aGameStates.curtTime.millisecond = 0;
@@ -513,6 +504,7 @@ cc.Class({
     },
     TimeUp()
     {
+        this.bPunchCD = true;
         this.StartOrStopButton.active = false;
         this.StopTimer();
         this.TrumpAnimScp.StopAnim();
@@ -523,8 +515,9 @@ cc.Class({
             this.bTimerStart = false;//0停止 1开始 
             this.StartOrStopButton.active = true;
             this.ResultScp.ShutDown();
-this.TrumpAnimScp.StartAnim();
+            this.TrumpAnimScp.StartAnim();
             this.StartOrStopButton.getChildByName("Background").getChildByName("Label").getComponent(cc.Label).string = 'RESTART';
+            this.bPunchCD = false;
         }.bind(this)); 
     },
     StopTimer()

+ 1 - 21
assets/Scripts/Game/TrumpAnim.js

@@ -94,26 +94,6 @@ cc.Class({
             self.AudioControllerScp.playAudio('Game/Audios/China.mp3',function () {
                 self.TalkChinaFinished(self);
             });
-        },Math.floor(Math.random()*20+1))
-
-        // let rate = Math.floor(Math.random()*10);
-        // console.log(rate)
-        // //if(Boolean(Math.round(Math.random())))
-        // if(rate<3)
-        // {
-        //     self.scheduleOnce(function() {
-        //         self.AudioControllerScp.playAudio('Game/Audios/BelieveMe.mp3',function () {
-        //             self.TalkChinaFinished(self);
-        //         });
-        //     },Math.floor(Math.random()*10+1))
-        // }
-        // else
-        // {
-        //     self.scheduleOnce(function() {
-        //         self.AudioControllerScp.playAudio('Game/Audios/China.mp3',function () {
-        //             self.TalkChinaFinished(self);
-        //         });
-        //     },Math.floor(Math.random()*10+1))
-        // }
+        },Math.floor(Math.random()*20+1));
     }
 });

+ 11 - 13
assets/Scripts/Library.js

@@ -41,8 +41,6 @@ let library ={
     insert(arr,index, item) {
         arr.splice(index, 0, item);
     },
-
-
     //数组元素位置替换
     swapArray: function(arr, index1, index2) {
         arr[index1] = arr.splice(index2, 1, arr[index1])[0];
@@ -88,19 +86,19 @@ let library ={
     },
     isMobile()
     {
-        let ua = navigator.userAgent.toLowerCase()
-        if (ua.match(/Android/i) != null) 
-        {
-            return true;
-        } 
-        else if (ua.match(/iPhone/i) != null) 
-        {
-            return true;
-        } 
-        else 
-        {
+        let isChrome;
+        if(isChrome == window.google && window.chrome){
             return false;
         }
+        else{
+            return true;
+        }
+        // console.log('11111')
+        // if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
+        //     return true;
+        // } else {
+        //     return false;
+        // }
     },
     remove(arr, item) {
         let index = arr.indexOf(item);

+ 20 - 5
assets/Scripts/Menu/MenuGameMode.js

@@ -4,11 +4,21 @@ cc.Class({
     extends: cc.Component,
 
     properties: {
+        LoadingBG: {
+            default: null, 
+            type: cc.Node, 
+            serializable: true, 
+        },
         TalkingLabel: {
             default: null, 
             type: cc.Label, 
             serializable: true, 
         },
+        TalkingSpNode: {
+            default: null, 
+            type: cc.Node, 
+            serializable: true, 
+        },
         AudioControllerNode: {
             default: null, 
             type: cc.Node, 
@@ -17,11 +27,14 @@ cc.Class({
     },
     onLoad () {
         this.bRunScene = true;
-
+        
         this.AudioControllerScp = this.AudioControllerNode.getComponent('AudioController');
         this.AudioControllerScp.playBGM('Game/Audios/BGM/Funny.wav',1,()=>{
             this.bRunScene = false;
+            this.LoadingBG.active = false;
         });  
+
+        this.TalkingSpNodeScp = this.TalkingSpNode.getComponent('TalkingSp');
     },
     Menu(event, param) {
         
@@ -44,21 +57,23 @@ cc.Class({
     },
     Help(event, param)
     {
+        this.TalkingSpNodeScp.PlayScaleAni();
+        
         switch (parseInt(param)) {
             case 0:
-                this.TalkingLabel.string = '时间到三秒正好打中沙袋获胜';
+                this.TalkingLabel.string = '三秒正好打中沙袋获胜';
                 break;
         
             case 1:
-                this.TalkingLabel.string = '时间流速加快正好打十秒获胜';
+                this.TalkingLabel.string = '十秒时正好打中沙袋获胜,小心时间流速变快了哦!';
                 break;
 
             case 2:
-                this.TalkingLabel.string = '连续三次随机生成目标时间打中目标时间三次获胜';
+                this.TalkingLabel.string = '连续三次随机生成目标时间打中三次获胜!哈哈,难度越来越高了!';
                 break;
 
             case 3:
-                this.TalkingLabel.string = '连续三次随机生成目标时间打中三次获胜时间随正/逆流';
+                this.TalkingLabel.string = '连续“三次”随机生成目标时间,打中三次获胜。小心!这次时间可不一定正着流动哦!';
                 break;
 
             default:

+ 15 - 0
assets/Scripts/Menu/TalkingSp.js

@@ -0,0 +1,15 @@
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+       
+    },
+    start () {
+        this.animation = this.node.getComponent(cc.Animation);
+        
+    },
+    PlayScaleAni()
+    {
+        this.animation.play();
+    }
+});

+ 10 - 0
assets/Scripts/Menu/TalkingSp.js.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "65651de3-1cab-4b03-8a04-e95d6167a12c",
+  "importer": "javascript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 7 - 28
assets/Scripts/WebView.js

@@ -147,31 +147,17 @@ let webView = {
     {
         //TODO
         // 要判断对象是否已经注册过,如果存在不注册
-        // for(let i=0;i<this.listenerArr.length;i++)
-        // {
-        //     let alistener = this.listenerArr[i];
-        //     if(listener == alistener)
-        //     {
-        //         return;
-        //     }
-        // }
+        if(this.indexOf(this.listenerArr, listener) != -1) return;
+
         this.listenerArr.push(listener);
-        console.log('listenerArr=',this.listenerArr)
     },
     unRegister(listener) {
         //TODO
         // 要判断对象是否已经注册过,如果存在才可以删除
-        // for(let i=0;i<this.listenerArr.length;i++)
-        // {
-        //     let alistener = this.listenerArr[i];
-        //     if(listener == alistener)
-        //     {
-        //         this.remove(this.listenerArr, listener);
-        //         return;
-        //     }
-        // }
-
-        this.remove(this.listenerArr, listener);
+        if(this.indexOf(this.listenerArr, listener) != -1)
+        {
+            this.remove(this.listenerArr, listener);
+        }
     },
     dispatchEvent(eventName, data)//把所有的监听事件分发给所有接收到回调的节点
     {
@@ -180,14 +166,7 @@ let webView = {
         }
     },
     init(listener,callback) {
-        // for(let i=0;i<this.listenerArr.length;i++)
-        // {
-        //     let alistener = this.listenerArr[i];
-        //     if(listener == alistener)
-        //     {
-        //         return;
-        //     }
-        // }
+        if(this.indexOf(this.listenerArr, listener) != -1) return;
 
         this.callback = callback;
         this.bValid = true;

+ 2 - 2
assets/Textures/Game/BackBG.png.meta

@@ -8,8 +8,8 @@
   "premultiplyAlpha": false,
   "genMipmaps": false,
   "packable": true,
-  "width": 323,
-  "height": 350,
+  "width": 387,
+  "height": 263,
   "platformSettings": {},
   "subMetas": {
     "BackBG": {

BIN
assets/Textures/Menu/Loading.png


+ 38 - 0
assets/Textures/Menu/Loading.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "ef137f99-b455-429b-b18f-6ac6c1b8f4e6",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 200,
+  "height": 200,
+  "platformSettings": {},
+  "subMetas": {
+    "Loading": {
+      "ver": "1.0.6",
+      "uuid": "09fbc7a1-d135-4e82-9097-7d56c8332849",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "ef137f99-b455-429b-b18f-6ac6c1b8f4e6",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 10,
+      "trimY": 15,
+      "width": 180,
+      "height": 170,
+      "rawWidth": 200,
+      "rawHeight": 200,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/Textures/Menu/splash.jpg


+ 38 - 0
assets/Textures/Menu/splash.jpg.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "bf1c1995-1f8d-4d5a-81f7-1aff221a53c9",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 720,
+  "height": 1280,
+  "platformSettings": {},
+  "subMetas": {
+    "splash": {
+      "ver": "1.0.6",
+      "uuid": "24b0c4ff-640b-4b23-ae38-3f36e836aa75",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "bf1c1995-1f8d-4d5a-81f7-1aff221a53c9",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 720,
+      "height": 1280,
+      "rawWidth": 720,
+      "rawHeight": 1280,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

Vissa filer visades inte eftersom för många filer har ändrats