Commit 6d421345 authored by Chen Jiping's avatar Chen Jiping

完善

parent d8d8e21a
......@@ -1169,6 +1169,8 @@ export class PlayComponent implements OnInit, OnDestroy {
this.choic_shadow_pic.alpha = 0;
this.curContent.card_choice.alpha = 0;
this.choic_shadow_pic.setScaleXY(0);
//产生转速倍数
......@@ -1176,6 +1178,8 @@ export class PlayComponent implements OnInit, OnDestroy {
//当前内容存在,则旋转回去
if(this.curContent){
//旋转
let card_rotation = this.curContent.card.rotation;
......@@ -1322,7 +1326,7 @@ export class PlayComponent implements OnInit, OnDestroy {
//转动角度
let rotation = this.rotaryTable.rotation;
let newStartAngle = rotation + content.startAngle + 180;
let newStartAngle = content.startAngle - rotation;
console.log('rotation', rotation,'content startAngle', content.startAngle, 'new content startAngle', newStartAngle);
......@@ -1347,16 +1351,9 @@ export class PlayComponent implements OnInit, OnDestroy {
this.curContent.card_choice.alpha = 1;
//this.curContent.card_show.alpha = 0;
this.playAudio('stop', false, ()=>{
this.curContent.card_choice.alpha = 0;
//this.curContent.card_show.alpha = 1;
//抽取卡片
this.drawCard();
});
})
......@@ -1394,6 +1391,8 @@ export class PlayComponent implements OnInit, OnDestroy {
*/
drawCard(){
this.playAudio('pop-up');
//新坐标
......@@ -1458,7 +1457,11 @@ export class PlayComponent implements OnInit, OnDestroy {
let residue_rotation = table_rotation % 360;
rotateItem(this.curContent.card, 360 - residue_rotation, 0.5);
rotateItem(this.curContent.card, 360 - residue_rotation, 0.5, ()=>{
this.playAudio('stop', false, ()=>{
});
});
}
/**
......
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