sunyadv 5 年 前
コミット
b97867c448
2 ファイル変更7 行追加5 行削除
  1. 7 5
      minigame/WebContent/js/main.js
  2. BIN
      minigame/WebContent/sound/cut.mp3

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

@@ -184,20 +184,22 @@ function handleComplete(evt, comp) {
     }
     function oilIconAnim() {
         oilAnim();
-
+        var video = "";
         if(dishIndex == 0){
             createjs.Sound.play("hsr");//播放
-            createjs.Sound.play("oil");//播放
+            video = createjs.Sound.play("oil");//播放
         }else if(dishIndex == 1){
             createjs.Sound.play("qcdf");//播放
-            createjs.Sound.play("soup");//播放
+            video = createjs.Sound.play("soup");//播放
         }else if(dishIndex == 2){
             createjs.Sound.play("swy");//播放
         }else{
             createjs.Sound.play("ymc");//播放
-            createjs.Sound.play("oil");//播放
+            video = createjs.Sound.play("oil");//播放
         }
 
+        setTimeout(function(){ video.paused = true; }, 5000);
+
         var anim = new TimelineMax({ repeat:10,delay:1});
         anim.to(exportRoot.pro.oil_icon2, 0.3, {y:"+=100",alpha:0})
         return anim;
@@ -396,6 +398,7 @@ function handleComplete(evt, comp) {
             y: event.stageY,
         };
         lineArr.push(obj);
+        createjs.Sound.play("cut");//播放
     })
     exportRoot.addEventListener("pressmove", function(event) {
         if (lineArr.length >= 15) {
@@ -406,7 +409,6 @@ function handleComplete(evt, comp) {
             y: event.stageY,
         };
         lineArr.push(obj);
-        createjs.Sound.play("cut");//播放
     })
     exportRoot.addEventListener("pressup", function(event) {
         playbowlAnim();

BIN
minigame/WebContent/sound/cut.mp3