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

完善

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