瀏覽代碼

Merge branch 'master' of http://47.100.37.243:10080/wutt/game

# Conflicts:
#	minigame/WebContent/index.html
sunyadv 5 年之前
父節點
當前提交
69d312dc64

File diff suppressed because it is too large
+ 351 - 75
minigame/WebContent/assets.js


二進制
minigame/WebContent/images/assets_atlas_P_3.png


二進制
minigame/WebContent/images/assets_atlas_P_4.png


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

@@ -107,10 +107,10 @@ function handleComplete(evt, comp) {
         $(".select-dish-box").hide();
         $(".select-dish-box").hide();
         $(".game-box").show();
         $(".game-box").show();
         $(".cut-mode2").show();
         $(".cut-mode2").show();
-        $(".cut-mode2").on("click",function(){
+        $(".cut-mode2").on("touchend",function(){
             $(this).hide();  
             $(this).hide();  
         })
         })
-        $(".move-mode2").on("click",function(){
+        $(".move-mode2").on("touchend",function(){
             $(this).hide();
             $(this).hide();
         })
         })
 
 
@@ -555,6 +555,13 @@ function handleComplete(evt, comp) {
             materialEnterAnim(exportRoot.blackboard.material3,0.6);
             materialEnterAnim(exportRoot.blackboard.material3,0.6);
 
 
             ballAnim(exportRoot.ball1);
             ballAnim(exportRoot.ball1);
+            if(dishIndex == 0){
+                exportRoot.pot.hsr.play();
+            }else if(dishIndex == 1){
+                exportRoot.pot.qcdf.play();
+            }else{
+                exportRoot.pot.ymc.play();
+            }
         })
         })
 
 
         exportRoot.blackboard.material1.addEventListener("mousedown", function() {
         exportRoot.blackboard.material1.addEventListener("mousedown", function() {
@@ -578,7 +585,16 @@ function handleComplete(evt, comp) {
                 exportRoot.blackboard.material1.y -=180;
                 exportRoot.blackboard.material1.y -=180;
                 // $(".shake-mode").show();
                 // $(".shake-mode").show();
                 setTimeout(function(){ shakeInit(); }, 3000);
                 setTimeout(function(){ shakeInit(); }, 3000);
-
+                if(dishIndex == 0){
+                    exportRoot.pot.hsr.play();
+                }else if(dishIndex == 1){
+                    exportRoot.pot.qcdf.play();
+                }else if(dishIndex == 2){
+                    exportRoot.bowl.oil.alpha = 0;
+                    exportRoot.plate['swy_icon1'].play();
+                }else{
+                    exportRoot.pot.ymc.play();
+                }
             });
             });
         })
         })
         exportRoot.blackboard.material2.addEventListener("mousedown", function() {
         exportRoot.blackboard.material2.addEventListener("mousedown", function() {
@@ -603,6 +619,16 @@ function handleComplete(evt, comp) {
                 exportRoot.blackboard.material2.y -=180;
                 exportRoot.blackboard.material2.y -=180;
                 // $(".shake-mode").show();
                 // $(".shake-mode").show();
                 setTimeout(function(){ shakeInit(); }, 3000);
                 setTimeout(function(){ shakeInit(); }, 3000);
+                if(dishIndex == 0){
+                    exportRoot.pot.hsr.play();
+                }else if(dishIndex == 1){
+                    exportRoot.pot.qcdf.play();
+                }else if(dishIndex == 2){
+                    exportRoot.bowl.oil.alpha = 0;
+                    exportRoot.plate['swy_icon1'].play();
+                }else{
+                    exportRoot.pot.ymc.play();
+                }
             });
             });
         })
         })
         exportRoot.blackboard.material3.addEventListener("mousedown", function() {
         exportRoot.blackboard.material3.addEventListener("mousedown", function() {
@@ -627,6 +653,17 @@ function handleComplete(evt, comp) {
                 exportRoot.blackboard.material3.y -=180;
                 exportRoot.blackboard.material3.y -=180;
                 // $(".shake-mode").show();
                 // $(".shake-mode").show();
                 setTimeout(function(){ shakeInit(); }, 3000);
                 setTimeout(function(){ shakeInit(); }, 3000);
+
+                if(dishIndex == 0){
+                    exportRoot.pot.hsr.play();
+                }else if(dishIndex == 1){
+                    exportRoot.pot.qcdf.play();
+                }else if(dishIndex == 2){
+                    exportRoot.bowl.oil.alpha = 0;
+                    exportRoot.plate['swy_icon1'].play();
+                }else{
+                    exportRoot.pot.ymc.play();
+                }
             });
             });
         })
         })
     }
     }
@@ -645,7 +682,7 @@ function handleComplete(evt, comp) {
 
 
 
 
         bowlAnim(function() {
         bowlAnim(function() {
-            
+
             $(".move-mode2").show();
             $(".move-mode2").show();
             if(dishIndex == 0){
             if(dishIndex == 0){
                 dishMove(exportRoot.plate.hsr_icon1,0,0);
                 dishMove(exportRoot.plate.hsr_icon1,0,0);
@@ -731,14 +768,14 @@ function handleComplete(evt, comp) {
                         	}
                         	}
 
 
                             if(dishIndex == 0){
                             if(dishIndex == 0){
-                                exportRoot.pot.hsr.gotoAndStop(1);
+                                exportRoot.pot.hsr.gotoAndStop(3);
                             }else if(dishIndex == 1){
                             }else if(dishIndex == 1){
-                                exportRoot.pot.qcdf.gotoAndStop(1);
+                                exportRoot.pot.qcdf.gotoAndStop(3);
                             }else if(dishIndex == 2){
                             }else if(dishIndex == 2){
                                 exportRoot.bowl.oil.alpha = 0;
                                 exportRoot.bowl.oil.alpha = 0;
                                 exportRoot.plate['swy_icon1'].gotoAndStop(2);
                                 exportRoot.plate['swy_icon1'].gotoAndStop(2);
                             }else{
                             }else{
-                                exportRoot.pot.ymc.gotoAndStop(1);
+                                exportRoot.pot.ymc.gotoAndStop(3);
                             }
                             }
                             $(".shake-mode").fadeOut();
                             $(".shake-mode").fadeOut();
                             // exportRoot.btn3.removeAllEventListeners();
                             // exportRoot.btn3.removeAllEventListeners();