Commit dd585882 authored by Chen Jiping's avatar Chen Jiping

完善

parent bff9d52f
...@@ -700,7 +700,12 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -700,7 +700,12 @@ export class PlayComponent implements OnInit, OnDestroy {
if(ropeIndex == 5){ if(ropeIndex == 5){
ropeImgKey = ropeImgKey + "5_l"; ropeImgKey = ropeImgKey + "5_l";
} }
else if(ropeIndex == 4){ else{
ropeImgKey = ropeImgKey + ropeIndex;
}
}
else if(this.data.exercises.length == 5){
if(ropeIndex == 4){
ropeImgKey = ropeImgKey + "4_l"; ropeImgKey = ropeImgKey + "4_l";
} }
else{ else{
...@@ -755,7 +760,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -755,7 +760,7 @@ export class PlayComponent implements OnInit, OnDestroy {
cardBaseboard.setSize(cardBack.getBoundingBox().width, cardBack.getBoundingBox().height); cardBaseboard.setSize(cardBack.getBoundingBox().width, cardBack.getBoundingBox().height);
cardBaseboard.alpha = 0; cardBaseboard.alpha = 0;
cardBaseboard.x = floor.cardX - cardBaseboard.getBoundingBox().width / 2; cardBaseboard.x = floor.cardX - cardBaseboard.getBoundingBox().width / 2;
cardBaseboard.y = floor.startY - 10 * this.mapScale; cardBaseboard.y = floor.startY - 7 * this.mapScale;
cardObj.baseboard = cardBaseboard; cardObj.baseboard = cardBaseboard;
//卡片发光 //卡片发光
...@@ -1086,6 +1091,18 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1086,6 +1091,18 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
else { else {
//停止所有的音效
for(let i = 0; i < this.exercisesArr.length; ++ i){
let card = this.exercisesArr[i];
let audio = this.audioObj[card.audioUrl];
audio.pause();
audio.currentTime = 0;
}
this.playAudio(card.audioUrl); this.playAudio(card.audioUrl);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment