Bläddra i källkod

优化动画闪动

zhoupeng 1 år sedan
förälder
incheckning
63d4bb3f27

+ 8 - 2
airPlay/assets/Scene/aniScene.fire

@@ -769,7 +769,10 @@
     "_defaultClip": null,
     "_clips": [
       {
-        "__uuid__": "5141118f-c3d9-46fc-b84d-35fd109ec7ac"
+        "__uuid__": "5d925bda-96f8-49cb-bfa1-9ed45ed05b48"
+      },
+      {
+        "__uuid__": "f1779a26-4e56-4cb6-a9eb-103632359b8c"
       }
     ],
     "playOnLoad": false,
@@ -916,7 +919,10 @@
     },
     "aniClip": [
       {
-        "__uuid__": "5141118f-c3d9-46fc-b84d-35fd109ec7ac"
+        "__uuid__": "5d925bda-96f8-49cb-bfa1-9ed45ed05b48"
+      },
+      {
+        "__uuid__": "f1779a26-4e56-4cb6-a9eb-103632359b8c"
       }
     ],
     "_id": "a49EFuIgBANYtzCAMsZ1yW"

+ 8 - 2
airPlay/assets/Script/game/nest/nestPlay.ts

@@ -208,8 +208,11 @@ export class NestPlay extends cc.Component {
                         ani.once(cc.Animation.EventType.FINISHED, ()=>{
                             cnt++;
                             if(cnt < this.aniClip.length){
-                                aniNode.angle = 0;
                                 callAni();
+                                
+                                cc.director.once(cc.Director.EVENT_AFTER_DRAW, ()=>{
+                                    aniNode.angle = 0;
+                                });
                             }
                             else{
                                 let nodeBox = aniNode.getBoundingBoxToWorld();
@@ -263,8 +266,11 @@ export class NestPlay extends cc.Component {
                     ani.once(cc.Animation.EventType.FINISHED, ()=>{
                         cnt++;
                         if(cnt < this.aniClip.length){
-                            aniNode.angle = 0;
+                            
                             callAni();
+                            cc.director.once(cc.Director.EVENT_AFTER_DRAW, ()=>{
+                                aniNode.angle = 0;
+                            });
                         }
                         else{
                             let nodeBox = aniNode.getBoundingBoxToWorld();

+ 8 - 0
airPlay/assets/resources/level/ani17.anim

@@ -43,6 +43,14 @@
         {
           "frame": 1.0833333333333333,
           "value": -90
+        },
+        {
+          "frame": 1.4166666666666667,
+          "value": -90
+        },
+        {
+          "frame": 1.5,
+          "value": -180
         }
       ]
     }

+ 10 - 22
airPlay/assets/resources/level/ani17_1.anim

@@ -56,55 +56,43 @@
       "angle": [
         {
           "frame": 0,
-          "value": 180
+          "value": -180
         },
         {
           "frame": 0.08333333333333333,
-          "value": 135
+          "value": -225
         },
         {
           "frame": 0.4166666666666667,
-          "value": 110
-        },
-        {
-          "frame": 0.5,
-          "value": 90
+          "value": -250
         },
         {
           "frame": 0.5833333333333334,
-          "value": 70
+          "value": -290
         },
         {
           "frame": 0.9166666666666666,
-          "value": 40
-        },
-        {
-          "frame": 1,
-          "value": 0
+          "value": -320
         },
         {
           "frame": 1.0833333333333333,
-          "value": -40
+          "value": -400
         },
         {
           "frame": 1.4166666666666667,
-          "value": -70
-        },
-        {
-          "frame": 1.5,
-          "value": -90
+          "value": -430
         },
         {
           "frame": 1.5833333333333333,
-          "value": -110
+          "value": -470
         },
         {
           "frame": 1.9166666666666667,
-          "value": -135
+          "value": -495
         },
         {
           "frame": 2,
-          "value": -180
+          "value": -540
         }
       ]
     }

+ 8 - 0
airPlay/assets/resources/level/ani18.anim

@@ -43,6 +43,14 @@
         {
           "frame": 1.0833333333333333,
           "value": 90
+        },
+        {
+          "frame": 1.4166666666666667,
+          "value": 90
+        },
+        {
+          "frame": 1.5,
+          "value": 0
         }
       ]
     }