Bläddra i källkod

关于调料加粉

351035557@qq.com 5 år sedan
förälder
incheckning
239b19a5b1

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 39 - 11
minigame/WebContent/assets.js


BIN
minigame/WebContent/images/assets_atlas_P_4.png


BIN
minigame/WebContent/images/assets_atlas_P_5.png


BIN
minigame/WebContent/img/powder.png


+ 14 - 5
minigame/WebContent/js/main.js

@@ -190,11 +190,17 @@ function handleComplete(evt, comp) {
 
     function materialAnim(dom, x, y, callback) {
         var anim = new TimelineMax({ onComplete: callback });
-        anim.to(dom, 0.5, { x: "+=" + x, y: "+=" + y, ease: Power0.easeIn })
-            .to(dom, 0.3, { rotation: "-=25", ease: Power0.easeIn })
-            .to(dom, 0.3, { rotation: "+=25", ease: Power0.easeIn })
-            .to(dom, 0.3, { rotation: "-=25", ease: Power0.easeIn })
-            .to(dom, 0.3, { rotation: "+=25", ease: Power0.easeIn });
+        anim.to(dom, 0.5, { x: "+=" + x, y: "+=" + y,scale:1.1, ease: Power0.easeIn })
+        .to(dom, 0.3, { rotation: "-=25", ease: Power0.easeIn })
+        .to(exportRoot.pot.powder, 0.1, { alpha: 1, ease: Power0.easeIn },"-=0.1")
+        .to(exportRoot.pot.powder, 0.3, { x: "-=15",y:"+=55",alpha:0, ease: Power0.easeIn },'-=0.2')
+        .to(dom, 0.3, { rotation: "+=25", ease: Power0.easeIn })
+        .to(exportRoot.pot.powder, 0.01, { x: "+=15",y:"-=55",alpha:0, ease: Power0.easeIn })
+        .to(dom, 0.3, { rotation: "-=25", ease: Power0.easeIn })
+        .to(exportRoot.pot.powder, 0.1, { alpha: 1, ease: Power0.easeIn },"-=0.1")
+        .to(exportRoot.pot.powder, 0.3, { x: "-=15",y:"+=55",alpha:0, ease: Power0.easeIn },'-=0.2')
+        .to(dom, 0.3, { rotation: "+=25", ease: Power0.easeIn })
+        .to(exportRoot.pot.powder, 0.1, { alpha:0, ease: Power0.easeIn });
         return anim;
     }
 
@@ -614,6 +620,7 @@ function handleComplete(evt, comp) {
             materialAnim(exportRoot.blackboard.material1, 300, 180, function() {
                 exportRoot.blackboard.material1.x -=300;
                 exportRoot.blackboard.material1.y -=180;
+                exportRoot.blackboard.material1.scale = 1;
                 // $(".shake-mode").show();
                 setTimeout(function(){ shakeInit(); }, 2000);
                 if(dishIndex == 0){
@@ -648,6 +655,7 @@ function handleComplete(evt, comp) {
             materialAnim(exportRoot.blackboard.material2, 120, 180, function() {
                 exportRoot.blackboard.material2.x -=120;
                 exportRoot.blackboard.material2.y -=180;
+                exportRoot.blackboard.material2.scale = 1;
                 // $(".shake-mode").show();
                 setTimeout(function(){ shakeInit(); }, 2000);
                 if(dishIndex == 0){
@@ -682,6 +690,7 @@ function handleComplete(evt, comp) {
             materialAnim(exportRoot.blackboard.material3, -30, 180, function() {
                 exportRoot.blackboard.material3.x +=30;
                 exportRoot.blackboard.material3.y -=180;
+                exportRoot.blackboard.material3.scale = 1;
                 // $(".shake-mode").show();
                 setTimeout(function(){ shakeInit(); }, 2000);