Forráskód Böngészése

【修改】 第四册 第四集 游戏4;
1.恢复发布任务的音频和音效;

youhaitao 2 éve
szülő
commit
152c491f10
1 módosított fájl, 17 hozzáadás és 17 törlés
  1. 17 17
      assets/game/b04_u04/b04_u04_g04/src/Game_b04_u04_g04.ts

+ 17 - 17
assets/game/b04_u04/b04_u04_g04/src/Game_b04_u04_g04.ts

@@ -135,23 +135,23 @@ export default class Game_b04_u04_g04 extends GameBase {
     /** 开始游戏 */
     async startGame() {
         // 角色动作
-        // let heroId = 0;
-        // let dataHero = this.dataQues.dataHero[heroId];
-        // let skeHero1 = this.nodeHero.getChildByName('spine' + heroId).getComponent(sp.Skeleton);
-        // Tools.playAniArray(skeHero1, [dataHero.task_0, dataHero.task_1, dataHero.idle]);
-        // // 音频播放
-        // await Tools.playEffect(this.arrAudioTask[0]);
-        // // 提示
-        // let script = this.nodeTip.getComponent(TipHand);
-        // cc.tween(this.node).call(() => {
-        //     let pStart = Tools.getLocalPos(this.nodeTotal.getChildByName("pStart"), script.nodeTip.parent);
-        //     script.touchCycleByTimes(pStart, 2);
-        // }).delay(2.0).call(() => {
-        //     let pStart = Tools.getLocalPos(this.nodeTotal.getChildByName("pFinish"), script.nodeTip.parent);
-        //     script.touchCycleByTimes(pStart, 2);
-        // }).start();
-        // // 音频播放
-        // await Tools.playEffect(this.arrAudioTask[1]);
+        let heroId = 0;
+        let dataHero = this.dataQues.dataHero[heroId];
+        let skeHero1 = this.nodeHero.getChildByName('spine' + heroId).getComponent(sp.Skeleton);
+        Tools.playAniArray(skeHero1, [dataHero.task_0, dataHero.task_1, dataHero.idle]);
+        // 音频播放
+        await Tools.playEffect(this.arrAudioTask[0]);
+        // 提示
+        let script = this.nodeTip.getComponent(TipHand);
+        cc.tween(this.node).call(() => {
+            let pStart = Tools.getLocalPos(this.nodeTotal.getChildByName("pStart"), script.nodeTip.parent);
+            script.touchCycleByTimes(pStart, 2);
+        }).delay(2.0).call(() => {
+            let pStart = Tools.getLocalPos(this.nodeTotal.getChildByName("pFinish"), script.nodeTip.parent);
+            script.touchCycleByTimes(pStart, 2);
+        }).start();
+        // 音频播放
+        await Tools.playEffect(this.arrAudioTask[1]);
         this.tipCycleShow();
         this.countLunch();
         this.nextQuestion();