Commit b27e3793 authored by Chen Jiping's avatar Chen Jiping

优化

parent dd585882
......@@ -1055,6 +1055,17 @@ export class PlayComponent implements OnInit, OnDestroy {
*/
clickCard(card) {
//如果不是第一张卡片,刚判断前一张是否已经翻过来了
if(card.index != 0){
let tCard = this.exercisesArr[card.index - 1];
//未翻过来,则返回
if(tCard.curShow == '0'){
return;
}
}
//停止闪烁
card.lightShow = false;
card.light.alpha = 0;
......@@ -1746,9 +1757,7 @@ export class PlayComponent implements OnInit, OnDestroy {
const randomX = startX + Math.random() * this.bigLight.sprite.getBoundingBox().width;
petal.x = randomX;
const randomY = startY + Math.random() * this.bigLight.sprite.getBoundingBox().height;
petal.y = randomY - petal.height / 2 * petal.scaleY;
petal.y = startY - petal.height / 2 * petal.scaleY;
const randomT = 2 + Math.random() * 5;
petal['time'] = randomT;
......
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